From aa9dae084b0ce14939c483366a687356359c5c87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDiga=20Kokelj?= Date: Wed, 27 Sep 2023 17:51:28 +0200 Subject: [PATCH 1/4] Deploy Obscuro Gateway for Sepolia testnet (#1552) --- .../workflows/manual-deploy-obscuro-gateway-database.yml | 8 ++++++++ .github/workflows/manual-deploy-obscuro-gateway.yml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/.github/workflows/manual-deploy-obscuro-gateway-database.yml b/.github/workflows/manual-deploy-obscuro-gateway-database.yml index 8ab3b8ebaa..b73b022bcf 100644 --- a/.github/workflows/manual-deploy-obscuro-gateway-database.yml +++ b/.github/workflows/manual-deploy-obscuro-gateway-database.yml @@ -14,6 +14,7 @@ on: options: - 'dev-testnet' - 'testnet' + - 'sepolia-testnet' jobs: build-and-deploy: @@ -41,6 +42,13 @@ jobs: echo "RESOURCE_STARTING_NAME=dev-testnet" >> $GITHUB_ENV echo "RESOURCE_TAG_NAME=obscurogatewaydbdevtestnetlatest" >> $GITHUB_ENV + - name: 'Set Obscuro Gateway variables for sepolia-testnet' + if: ${{ github.event.inputs.testnet_type == 'sepolia-testnet' }} + run: | + echo "OBSCURO_GATEWAY_DB_BUILD_TAG=testnetobscuronet.azurecr.io/obscuronet/obscuro_gateway_mariadb_sepolia_testnet:latest" >> $GITHUB_ENV + echo "RESOURCE_STARTING_NAME=sepolia-testnet" >> $GITHUB_ENV + echo "RESOURCE_TAG_NAME=obscurogatewaydbsepoliatestnetlatest" >> $GITHUB_ENV + - name: 'Login via Azure CLI' uses: azure/login@v1 diff --git a/.github/workflows/manual-deploy-obscuro-gateway.yml b/.github/workflows/manual-deploy-obscuro-gateway.yml index 1bba8a2182..6acb385ca6 100644 --- a/.github/workflows/manual-deploy-obscuro-gateway.yml +++ b/.github/workflows/manual-deploy-obscuro-gateway.yml @@ -14,6 +14,7 @@ on: options: - 'dev-testnet' - 'testnet' + - 'sepolia-testnet' jobs: build-and-deploy: @@ -46,6 +47,13 @@ jobs: echo "RESOURCE_STARTING_NAME=dev-testnet" >> $GITHUB_ENV echo "RESOURCE_TAG_NAME=obscurogatewaydevtestnetlatest" >> $GITHUB_ENV + - name: 'Set Obscuro Gateway variables for sepolia-testnet' + if: ${{ github.event.inputs.testnet_type == 'sepolia-testnet' }} + run: | + echo "OBSCURO_GATEWAY_BUILD_TAG=testnetobscuronet.azurecr.io/obscuronet/obscuro_gateway_sepolia_testnet:latest" >> $GITHUB_ENV + echo "OBSCURO_GATEWAY_NODE_HOST=erpc.sepolia-testnet.obscu.ro" >> $GITHUB_ENV + echo "RESOURCE_STARTING_NAME=sepolia-testnet" >> $GITHUB_ENV + echo "RESOURCE_TAG_NAME=obscurogatewaysepoliatestnetlatest" >> $GITHUB_ENV - name: 'Login to Azure docker registry' uses: azure/docker-login@v1 From a21c156d592a0cbdda725aed285514350999b8df Mon Sep 17 00:00:00 2001 From: Pedro Gomes Date: Thu, 28 Sep 2023 11:12:09 +0100 Subject: [PATCH 2/4] Fixes the relAddresses in the events debug log (#1555) * Fixes the relAddresses in the events debug log * lint * comment out test --- go/common/tracers/debug_logs.go | 38 ++-- go/enclave/storage/enclavedb/events.go | 35 ++- integration/manualtests/tx_test.go | 240 ++++++++++++++++---- integration/obscuroscan/obscuroscan_test.go | 1 + 4 files changed, 227 insertions(+), 87 deletions(-) diff --git a/go/common/tracers/debug_logs.go b/go/common/tracers/debug_logs.go index 7c9a5c9836..110e1bb828 100644 --- a/go/common/tracers/debug_logs.go +++ b/go/common/tracers/debug_logs.go @@ -11,11 +11,11 @@ import ( // DebugLogs are the logs returned when using the DebugGetLogs endpoint type DebugLogs struct { - RelAddress1 *gethcommon.Hash `json:"relAddress1"` - RelAddress2 *gethcommon.Hash `json:"relAddress2"` - RelAddress3 *gethcommon.Hash `json:"relAddress3"` - RelAddress4 *gethcommon.Hash `json:"relAddress4"` - LifecycleEvent bool `json:"lifecycleEvent"` + RelAddress1 *gethcommon.Address `json:"relAddress1"` + RelAddress2 *gethcommon.Address `json:"relAddress2"` + RelAddress3 *gethcommon.Address `json:"relAddress3"` + RelAddress4 *gethcommon.Address `json:"relAddress4"` + LifecycleEvent bool `json:"lifecycleEvent"` gethtypes.Log } @@ -24,20 +24,20 @@ type DebugLogs struct { // this holds a copy of the gethtypes.Log log marshaller func (l DebugLogs) MarshalJSON() ([]byte, error) { return json.Marshal(struct { - Address string `json:"address" gencodec:"required"` - Topics []gethcommon.Hash `json:"topics" gencodec:"required"` - Data hexutil.Bytes `json:"data" gencodec:"required"` - BlockNumber uint64 `json:"blockNumber"` - TxHash gethcommon.Hash `json:"transactionHash" gencodec:"required"` - TxIndex uint `json:"transactionIndex"` - BlockHash gethcommon.Hash `json:"blockHash"` - Index uint `json:"logIndex"` - Removed bool `json:"removed"` - LifecycleEvent bool `json:"lifecycleEvent"` - RelAddress1 *gethcommon.Hash `json:"relAddress1"` - RelAddress2 *gethcommon.Hash `json:"relAddress2"` - RelAddress3 *gethcommon.Hash `json:"relAddress3"` - RelAddress4 *gethcommon.Hash `json:"relAddress4"` + Address string `json:"address" gencodec:"required"` + Topics []gethcommon.Hash `json:"topics" gencodec:"required"` + Data hexutil.Bytes `json:"data" gencodec:"required"` + BlockNumber uint64 `json:"blockNumber"` + TxHash gethcommon.Hash `json:"transactionHash" gencodec:"required"` + TxIndex uint `json:"transactionIndex"` + BlockHash gethcommon.Hash `json:"blockHash"` + Index uint `json:"logIndex"` + Removed bool `json:"removed"` + LifecycleEvent bool `json:"lifecycleEvent"` + RelAddress1 *gethcommon.Address `json:"relAddress1"` + RelAddress2 *gethcommon.Address `json:"relAddress2"` + RelAddress3 *gethcommon.Address `json:"relAddress3"` + RelAddress4 *gethcommon.Address `json:"relAddress4"` }{ l.Address.Hex(), l.Topics, diff --git a/go/enclave/storage/enclavedb/events.go b/go/enclave/storage/enclavedb/events.go index e1b2d5d1ee..5483f4bb64 100644 --- a/go/enclave/storage/enclavedb/events.go +++ b/go/enclave/storage/enclavedb/events.go @@ -203,7 +203,7 @@ func DebugGetLogs(db *sql.DB, txHash common.TxHash) ([]*tracers.DebugLogs, error } var t0, t1, t2, t3, t4 sql.NullString - var relAddress1, relAddress2, relAddress3, relAddress4 sql.NullByte + var relAddress1, relAddress2, relAddress3, relAddress4 []byte err = rows.Scan( &relAddress1, &relAddress2, @@ -229,10 +229,10 @@ func DebugGetLogs(db *sql.DB, txHash common.TxHash) ([]*tracers.DebugLogs, error } } - l.RelAddress1 = bytesToHash(relAddress1) - l.RelAddress2 = bytesToHash(relAddress2) - l.RelAddress3 = bytesToHash(relAddress3) - l.RelAddress4 = bytesToHash(relAddress4) + l.RelAddress1 = bytesToAddress(relAddress1) + l.RelAddress2 = bytesToAddress(relAddress2) + l.RelAddress3 = bytesToAddress(relAddress3) + l.RelAddress4 = bytesToAddress(relAddress4) result = append(result, &l) } @@ -244,6 +244,14 @@ func DebugGetLogs(db *sql.DB, txHash common.TxHash) ([]*tracers.DebugLogs, error return result, nil } +func bytesToAddress(b []byte) *gethcommon.Address { + if b != nil { + addr := gethcommon.BytesToAddress(b) + return &addr + } + return nil +} + // Of the log's topics, returns those that are (potentially) user addresses. A topic is considered a user address if: // - It has at least 12 leading zero bytes (since addresses are 20 bytes long, while hashes are 32) and at most 22 leading zero bytes // - It does not have associated code (meaning it's a smart-contract address) @@ -350,23 +358,6 @@ func stringToHash(ns sql.NullString) gethcommon.Hash { return result } -func bytesToHash(b sql.NullByte) *gethcommon.Hash { - result := gethcommon.Hash{} - - if !b.Valid { - return nil - } - - value, err := b.Value() - if err != nil { - return nil - } - s := value.(string) - - result.SetBytes([]byte(s)) - return &result -} - func byteArrayToHash(b []byte) gethcommon.Hash { result := gethcommon.Hash{} result.SetBytes(b) diff --git a/integration/manualtests/tx_test.go b/integration/manualtests/tx_test.go index 9c602210bf..72d37b3a84 100644 --- a/integration/manualtests/tx_test.go +++ b/integration/manualtests/tx_test.go @@ -2,10 +2,10 @@ package manualtests import ( "context" + "encoding/json" "errors" "fmt" "math/big" - "os" "strings" "testing" "time" @@ -21,6 +21,7 @@ import ( "github.com/obscuronet/go-obscuro/go/wallet" "github.com/obscuronet/go-obscuro/integration/datagenerator" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" gethcommon "github.com/ethereum/go-ethereum/common" gethlog "github.com/ethereum/go-ethereum/log" @@ -50,34 +51,32 @@ var ( 443, gethlog.New()) l2Host = "localhost" - l2Port = 37900 + l2Port = 43900 ) func TestL1IssueContractInteractWaitReceipt(t *testing.T) { - // test is skipped by default to avoid breaking CI - set env flag in `Run Configurations` to run it in IDE - if os.Getenv(_IDEFlag) == "" { - t.Skipf("set flag %s to run this test in the IDE", _IDEFlag) - } + t.Skipf("skip manual tests") + var err error ethClient, err := ethadapter.NewEthClient(l1Host, uint(l1Port), 30*time.Second, common.L2Address{}, gethlog.New()) - assert.Nil(t, err) + require.NoError(t, err) storeContractBytecode := "0x608060405234801561001057600080fd5b5061020b806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b57806370ef6e0b14610059575b600080fd5b610043610075565b60405161005091906100ab565b60405180910390f35b610073600480360381019061006e9190610161565b61007e565b005b60008054905090565b836000819055508260008190555050505050565b6000819050919050565b6100a581610092565b82525050565b60006020820190506100c0600083018461009c565b92915050565b600080fd5b600080fd5b6100d981610092565b81146100e457600080fd5b50565b6000813590506100f6816100d0565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610121576101206100fc565b5b8235905067ffffffffffffffff81111561013e5761013d610101565b5b60208301915083600182028301111561015a57610159610106565b5b9250929050565b6000806000806060858703121561017b5761017a6100c6565b5b6000610189878288016100e7565b945050602061019a878288016100e7565b935050604085013567ffffffffffffffff8111156101bb576101ba6100cb565b5b6101c78782880161010b565b92509250509295919450925056fea2646970667358221220eda68578fb741c32f26000b6c0273945f8322dd35f536c918e3d5a6193aaf62564736f6c63430008120033" nonce, err := ethClient.Nonce(l1Wallet.Address()) - assert.Nil(t, err) + require.NoError(t, err) l1Wallet.SetNonce(nonce) estimatedTx, err := ethClient.PrepareTransactionToSend(&types.LegacyTx{ Data: gethcommon.FromHex(storeContractBytecode), }, l1Wallet.Address(), l1Wallet.GetNonceAndIncrement()) - assert.Nil(t, err) + require.NoError(t, err) signedTx, err := l1Wallet.SignTransaction(estimatedTx) - assert.Nil(t, err) + require.NoError(t, err) err = ethClient.SendTransaction(signedTx) - assert.Nil(t, err) + require.NoError(t, err) fmt.Printf("Deployed Store Contract") fmt.Printf("Created Tx: %s \n", signedTx.Hash().Hex()) @@ -99,31 +98,28 @@ func TestL1IssueContractInteractWaitReceipt(t *testing.T) { } func TestL1IssueTxWaitReceipt(t *testing.T) { - // test is skipped by default to avoid breaking CI - set env flag in `Run Configurations` to run it in IDE - if os.Getenv(_IDEFlag) == "" { - t.Skipf("set flag %s to run this test in the IDE", _IDEFlag) - } + t.Skipf("skip manual tests") var err error ethClient, err := ethadapter.NewEthClient(l1Host, uint(l1Port), 30*time.Second, common.L2Address{}, gethlog.New()) - assert.Nil(t, err) + require.NoError(t, err) toAddr := datagenerator.RandomAddress() nonce, err := ethClient.Nonce(l1Wallet.Address()) - assert.Nil(t, err) + require.NoError(t, err) l1Wallet.SetNonce(nonce) estimatedTx, err := ethClient.PrepareTransactionToSend(&types.LegacyTx{ To: &toAddr, Value: big.NewInt(100), }, l1Wallet.Address(), l1Wallet.GetNonceAndIncrement()) - assert.Nil(t, err) + require.NoError(t, err) signedTx, err := l1Wallet.SignTransaction(estimatedTx) - assert.Nil(t, err) + require.NoError(t, err) err = ethClient.SendTransaction(signedTx) - assert.Nil(t, err) + require.NoError(t, err) fmt.Printf("Created Tx: %s \n", signedTx.Hash().Hex()) fmt.Printf("Checking for tx receipt for %s \n", signedTx.Hash()) @@ -144,21 +140,18 @@ func TestL1IssueTxWaitReceipt(t *testing.T) { } func TestL2IssueContractInteractWaitReceipt(t *testing.T) { - // test is skipped by default to avoid breaking CI - set env flag in `Run Configurations` to run it in IDE - if os.Getenv(_IDEFlag) == "" { - t.Skipf("set flag %s to run this test in the IDE", _IDEFlag) - } + t.Skipf("skip manual tests") ctx := context.Background() vk, err := viewingkey.GenerateViewingKeyForWallet(l2Wallet) - assert.Nil(t, err) + require.NoError(t, err) client, err := rpc.NewEncNetworkClient(fmt.Sprintf("ws://%s:%d", l2Host, l2Port), vk, gethlog.New()) - assert.Nil(t, err) + require.NoError(t, err) authClient := obsclient.NewAuthObsClient(client) balance, err := authClient.BalanceAt(context.Background(), nil) - assert.Nil(t, err) + require.NoError(t, err) if balance.Cmp(big.NewInt(0)) <= 0 { t.Errorf("not enough balance: has %s has %s obx", l2Wallet.Address().Hex(), balance.String()) @@ -166,7 +159,7 @@ func TestL2IssueContractInteractWaitReceipt(t *testing.T) { storeContractBytecode := "0x608060405234801561001057600080fd5b506101f3806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b5780636057361d14610059575b600080fd5b610043610075565b60405161005091906100da565b60405180910390f35b610073600480360381019061006e9190610126565b61007e565b005b60008054905090565b806000819055507febfcf7c0a1b09f6499e519a8d8bb85ce33cd539ec6cbd964e116cd74943ead1a33826040516100b6929190610194565b60405180910390a150565b6000819050919050565b6100d4816100c1565b82525050565b60006020820190506100ef60008301846100cb565b92915050565b600080fd5b610103816100c1565b811461010e57600080fd5b50565b600081359050610120816100fa565b92915050565b60006020828403121561013c5761013b6100f5565b5b600061014a84828501610111565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061017e82610153565b9050919050565b61018e81610173565b82525050565b60006040820190506101a96000830185610185565b6101b660208301846100cb565b939250505056fea264697066735822122071ae4262a5da0c5c7b417d9c6cd13b57b8fcfe79c9c526b96f482ee67ff3136c64736f6c63430008120033" nonce, err := authClient.NonceAt(ctx, nil) - assert.Nil(t, err) + require.NoError(t, err) l2Wallet.SetNonce(nonce) estimatedTx := authClient.EstimateGasAndGasPrice(&types.LegacyTx{ @@ -175,7 +168,7 @@ func TestL2IssueContractInteractWaitReceipt(t *testing.T) { GasPrice: gethcommon.Big1, Data: gethcommon.FromHex(storeContractBytecode), }) - assert.Nil(t, err) + require.NoError(t, err) contract, err := authClient.CallContract(ctx, ethereum.CallMsg{ From: l2Wallet.Address(), @@ -187,10 +180,10 @@ func TestL2IssueContractInteractWaitReceipt(t *testing.T) { } signedTx, err := l2Wallet.SignTransaction(estimatedTx) - assert.Nil(t, err) + require.NoError(t, err) err = authClient.SendTransaction(ctx, signedTx) - assert.Nil(t, err) + require.NoError(t, err) fmt.Printf("Created Tx: %s \n", signedTx.Hash().Hex()) fmt.Printf("Checking for tx receipt for %s \n", signedTx.Hash()) @@ -269,7 +262,7 @@ func TestL2IssueContractInteractWaitReceipt(t *testing.T) { ]` myAbi, err := abi.JSON(strings.NewReader(abiJSONString)) - assert.Nil(t, err) + require.NoError(t, err) pack, err := myAbi.Pack("store", big.NewInt(1)) if err != nil { @@ -283,13 +276,13 @@ func TestL2IssueContractInteractWaitReceipt(t *testing.T) { GasPrice: gethcommon.Big1, Data: pack, }) - assert.Nil(t, err) + require.NoError(t, err) signedTx, err = l2Wallet.SignTransaction(estimatedTx) - assert.Nil(t, err) + require.NoError(t, err) err = authClient.SendTransaction(ctx, signedTx) - assert.Nil(t, err) + require.NoError(t, err) fmt.Printf("Created Tx: %s \n", signedTx.Hash().Hex()) fmt.Printf("Checking for tx receipt for %s \n", signedTx.Hash()) @@ -320,21 +313,18 @@ func TestL2IssueContractInteractWaitReceipt(t *testing.T) { } func TestL2IssueTxWaitReceipt(t *testing.T) { - // test is skipped by default to avoid breaking CI - set env flag in `Run Configurations` to run it in IDE - if os.Getenv(_IDEFlag) == "" { - t.Skipf("set flag %s to run this test in the IDE", _IDEFlag) - } + t.Skipf("skip manual tests") ctx := context.Background() vk, err := viewingkey.GenerateViewingKeyForWallet(l2Wallet) - assert.Nil(t, err) + require.NoError(t, err) client, err := rpc.NewEncNetworkClient(fmt.Sprintf("ws://%s:%d", l2Host, l2Port), vk, gethlog.New()) - assert.Nil(t, err) + require.NoError(t, err) authClient := obsclient.NewAuthObsClient(client) balance, err := authClient.BalanceAt(context.Background(), nil) - assert.Nil(t, err) + require.NoError(t, err) if balance.Cmp(big.NewInt(0)) <= 0 { t.Errorf("not enough balance: has %s has %s obx", l2Wallet.Address().Hex(), balance.String()) @@ -342,7 +332,7 @@ func TestL2IssueTxWaitReceipt(t *testing.T) { toAddr := datagenerator.RandomAddress() nonce, err := authClient.NonceAt(ctx, nil) - assert.Nil(t, err) + require.NoError(t, err) l2Wallet.SetNonce(nonce) estimatedTx := authClient.EstimateGasAndGasPrice(&types.LegacyTx{ @@ -352,13 +342,78 @@ func TestL2IssueTxWaitReceipt(t *testing.T) { Gas: uint64(1_000_000), GasPrice: gethcommon.Big1, }) - assert.Nil(t, err) + require.NoError(t, err) + + signedTx, err := l2Wallet.SignTransaction(estimatedTx) + require.NoError(t, err) + + err = authClient.SendTransaction(ctx, signedTx) + require.NoError(t, err) + + fmt.Printf("Created Tx: %s \n", signedTx.Hash().Hex()) + fmt.Printf("Checking for tx receipt for %s \n", signedTx.Hash()) + var receipt *types.Receipt + for start := time.Now(); time.Since(start) < time.Minute; time.Sleep(time.Second) { + receipt, err = authClient.TransactionReceipt(ctx, signedTx.Hash()) + if err == nil { + break + } + // + // Currently when a receipt is not available the obscuro node is returning nil instead of err ethereum.NotFound + // once that's fixed this commented block should be removed + //if !errors.Is(err, ethereum.NotFound) { + // t.Fatal(err) + //} + if receipt != nil && receipt.Status == 1 { + break + } + fmt.Printf("no tx receipt after %s - %s\n", time.Since(start), err) + } + + if receipt == nil { + t.Fatalf("Did not mine the transaction after %s seconds - receipt: %+v", 30*time.Second, receipt) + } + if receipt.Status == 0 { + t.Fatalf("Tx Failed") + } +} + +func TestL2IssueContractSubscribeChange(t *testing.T) { + t.Skipf("skip manual tests") + + ctx := context.Background() + + vk, err := viewingkey.GenerateViewingKeyForWallet(l2Wallet) + require.NoError(t, err) + client, err := rpc.NewEncNetworkClient(fmt.Sprintf("ws://%s:%d", l2Host, l2Port), vk, gethlog.New()) + require.NoError(t, err) + authClient := obsclient.NewAuthObsClient(client) + + balance, err := authClient.BalanceAt(context.Background(), nil) + require.NoError(t, err) + + if balance.Cmp(big.NewInt(0)) <= 0 { + t.Errorf("not enough balance: has %s has %s obx", l2Wallet.Address().Hex(), balance.String()) + } + + storeContractBytecode := "608060405234801561001057600080fd5b506101d7806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80630f2723ea14610030575b600080fd5b61004a60048036038101906100459190610137565b61004c565b005b8173ffffffffffffffffffffffffffffffffffffffff167fe86bd59ccd77aa1a9fbc46604e341e1dcc72f2a6e6637d5422736d645a71625e826040516100929190610186565b60405180910390a25050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100ce826100a3565b9050919050565b6100de816100c3565b81146100e957600080fd5b50565b6000813590506100fb816100d5565b92915050565b6000819050919050565b61011481610101565b811461011f57600080fd5b50565b6000813590506101318161010b565b92915050565b6000806040838503121561014e5761014d61009e565b5b600061015c858286016100ec565b925050602061016d85828601610122565b9150509250929050565b61018081610101565b82525050565b600060208201905061019b6000830184610177565b9291505056fea2646970667358221220d45d57b217a07cfd4ceecc8f5d2a9194a098e5fe1de98bc56c24cc400e21c96064736f6c63430008120033" + nonce, err := authClient.NonceAt(ctx, nil) + require.NoError(t, err) + + l2Wallet.SetNonce(nonce) + estimatedTx := authClient.EstimateGasAndGasPrice(&types.LegacyTx{ + Nonce: l2Wallet.GetNonceAndIncrement(), + Gas: uint64(1_000_000), + GasPrice: gethcommon.Big1, + Data: gethcommon.FromHex(storeContractBytecode), + }) + require.NoError(t, err) signedTx, err := l2Wallet.SignTransaction(estimatedTx) - assert.Nil(t, err) + require.NoError(t, err) err = authClient.SendTransaction(ctx, signedTx) - assert.Nil(t, err) + require.NoError(t, err) fmt.Printf("Created Tx: %s \n", signedTx.Hash().Hex()) fmt.Printf("Checking for tx receipt for %s \n", signedTx.Hash()) @@ -386,4 +441,97 @@ func TestL2IssueTxWaitReceipt(t *testing.T) { if receipt.Status == 0 { t.Fatalf("Tx Failed") } + + abiJSONString := `[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "IndexedAddressAndNumber", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_addr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "echo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]` + + myAbi, err := abi.JSON(strings.NewReader(abiJSONString)) + require.NoError(t, err) + + pack, err := myAbi.Pack("echo", l2Wallet.Address(), big.NewInt(42)) + require.NoError(t, err) + + estimatedTx = authClient.EstimateGasAndGasPrice(&types.LegacyTx{ + Nonce: l2Wallet.GetNonceAndIncrement(), + To: &receipt.ContractAddress, + Gas: uint64(1_000_000), + GasPrice: gethcommon.Big1, + Data: pack, + }) + require.NoError(t, err) + + signedTx, err = l2Wallet.SignTransaction(estimatedTx) + require.NoError(t, err) + + err = authClient.SendTransaction(ctx, signedTx) + require.NoError(t, err) + + fmt.Printf("Created Tx: %s \n", signedTx.Hash().Hex()) + fmt.Printf("Checking for tx receipt for %s \n", signedTx.Hash()) + receipt = nil + for start := time.Now(); time.Since(start) < time.Minute; time.Sleep(time.Second) { + receipt, err = authClient.TransactionReceipt(ctx, signedTx.Hash()) + if err == nil { + break + } + // + // Currently when a receipt is not available the obscuro node is returning nil instead of err ethereum.NotFound + // once that's fixed this commented block should be removed + //if !errors.Is(err, ethereum.NotFound) { + // t.Fatal(err) + //} + if receipt != nil && receipt.Status == 1 { + break + } + fmt.Printf("no tx receipt after %s - %s\n", time.Since(start), err) + } + + if receipt == nil { + t.Fatalf("Did not mine the transaction after %s seconds - receipt: %+v", 30*time.Second, receipt) + } + if receipt.Status == 0 { + t.Fatalf("Tx Failed") + } + + result := json.RawMessage{} + err = client.Call(&result, "debug_eventLogRelevancy", signedTx.Hash()) + assert.NoError(t, err) + fmt.Println(err) } diff --git a/integration/obscuroscan/obscuroscan_test.go b/integration/obscuroscan/obscuroscan_test.go index 765bfd2ea6..d17d735539 100644 --- a/integration/obscuroscan/obscuroscan_test.go +++ b/integration/obscuroscan/obscuroscan_test.go @@ -178,6 +178,7 @@ func TestObscuroscan(t *testing.T) { 100, ) + fmt.Println("Running for 1 hour...") time.Sleep(time.Hour) // Gracefully shutdown err = obsScanContainer.Stop() From 7b2ef03e2a9aa59ca9fa921b68d538b56a6e9110 Mon Sep 17 00:00:00 2001 From: Pedro Gomes Date: Thu, 28 Sep 2023 11:18:15 +0100 Subject: [PATCH 3/4] Adding version displays to OG and OScan (#1560) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adding version displays to OG and OScan * Update tools/walletextension/main/cli.go Co-authored-by: Žiga Kokelj * add commit hash --------- Co-authored-by: Žiga Kokelj --- .../manual-deploy-obscuro-gateway.yml | 1 + .../manual-deploy-obscuro-scan-2.yml | 2 +- .../frontend/src/components/BotBarItem.vue | 16 ++++++++++-- .../frontend/src/lib/config.dev.js | 1 + .../obscuroscan_v2/frontend/src/lib/config.js | 1 + .../frontend/src/lib/config.prod.js | 1 + tools/walletextension/api/routes.go | 19 ++++++++++++++ tools/walletextension/api/staticOG/index.html | 1 + .../api/staticOG/javascript.js | 25 +++++++++++++++++++ tools/walletextension/common/constants.go | 1 + .../container/walletextension_container.go | 9 ++++++- tools/walletextension/main/cli.go | 4 +-- tools/walletextension/wallet_extension.go | 7 ++++++ 13 files changed, 82 insertions(+), 6 deletions(-) diff --git a/.github/workflows/manual-deploy-obscuro-gateway.yml b/.github/workflows/manual-deploy-obscuro-gateway.yml index 6acb385ca6..94a7f1ec2f 100644 --- a/.github/workflows/manual-deploy-obscuro-gateway.yml +++ b/.github/workflows/manual-deploy-obscuro-gateway.yml @@ -138,6 +138,7 @@ jobs: datadog/agent:latest \ && cd /home/obscuro/go-obscuro/ \ && docker run -d -p 80:80 -p 81:81 --name ${{env.RESOURCE_STARTING_NAME}}-OG-${{ GITHUB.RUN_NUMBER }} \ + -e OBSCURO_GATEWAY_VERSION="${{ GITHUB.RUN_NUMBER }}-${{ GITHUB.SHA }}" \ ${{ env.OBSCURO_GATEWAY_BUILD_TAG }} \ ./wallet_extension_linux -host=0.0.0.0 -port=80 -portWS=81 -nodeHost=${{ env.OBSCURO_GATEWAY_NODE_HOST }} \ -logPath=sys_out -dbType=mariaDB -dbConnectionURL="obscurouser:${{ secrets.OBSCURO_GATEWAY_MARIADB_USER_PWD }}@tcp(obscurogateway-mariadb-${{ github.event.inputs.testnet_type }}.uksouth.cloudapp.azure.com:3306)/ogdb"' diff --git a/.github/workflows/manual-deploy-obscuro-scan-2.yml b/.github/workflows/manual-deploy-obscuro-scan-2.yml index 71da379b93..cba7a74b98 100644 --- a/.github/workflows/manual-deploy-obscuro-scan-2.yml +++ b/.github/workflows/manual-deploy-obscuro-scan-2.yml @@ -69,7 +69,7 @@ jobs: name: ${{ github.event.inputs.testnet_type }}-fe-obscuro-scan location: 'uksouth' restart-policy: 'Never' - environment-variables: VITE_APIHOSTADDRESS=http://${{ github.event.inputs.testnet_type }}-api-obscuro-scan.uksouth.azurecontainer.io + environment-variables: VITE_APIHOSTADDRESS=http://${{ github.event.inputs.testnet_type }}-api-obscuro-scan.uksouth.azurecontainer.io VITE_FE_VERSION=${{ GITHUB.RUN_NUMBER }}-${{ GITHUB.SHA }} command-line: npm run serve-prod ports: '80' cpu: 2 diff --git a/tools/obscuroscan_v2/frontend/src/components/BotBarItem.vue b/tools/obscuroscan_v2/frontend/src/components/BotBarItem.vue index ef38f6a32f..80288f49eb 100644 --- a/tools/obscuroscan_v2/frontend/src/components/BotBarItem.vue +++ b/tools/obscuroscan_v2/frontend/src/components/BotBarItem.vue @@ -5,15 +5,27 @@ obscu.ro + +
version: {{ version }}
+
\ No newline at end of file diff --git a/tools/obscuroscan_v2/frontend/src/lib/config.dev.js b/tools/obscuroscan_v2/frontend/src/lib/config.dev.js index 40decc06b5..d3ee7ef092 100644 --- a/tools/obscuroscan_v2/frontend/src/lib/config.dev.js +++ b/tools/obscuroscan_v2/frontend/src/lib/config.dev.js @@ -2,6 +2,7 @@ class Config { static backendServerAddress = "http://127.0.0.1:43910" static pollingInterval = 1000 static pricePollingInterval = 10000*10000 + static version = "dev" } export default Config \ No newline at end of file diff --git a/tools/obscuroscan_v2/frontend/src/lib/config.js b/tools/obscuroscan_v2/frontend/src/lib/config.js index 40decc06b5..d3ee7ef092 100644 --- a/tools/obscuroscan_v2/frontend/src/lib/config.js +++ b/tools/obscuroscan_v2/frontend/src/lib/config.js @@ -2,6 +2,7 @@ class Config { static backendServerAddress = "http://127.0.0.1:43910" static pollingInterval = 1000 static pricePollingInterval = 10000*10000 + static version = "dev" } export default Config \ No newline at end of file diff --git a/tools/obscuroscan_v2/frontend/src/lib/config.prod.js b/tools/obscuroscan_v2/frontend/src/lib/config.prod.js index 954f287c87..99f6467308 100644 --- a/tools/obscuroscan_v2/frontend/src/lib/config.prod.js +++ b/tools/obscuroscan_v2/frontend/src/lib/config.prod.js @@ -3,6 +3,7 @@ class Config { static backendServerAddress = import.meta.env.VITE_APIHOSTADDRESS static pollingInterval = 1000 static pricePollingInterval = 10*this.pollingInterval + static version = import.meta.env.VITE_FE_VERSION } export default Config \ No newline at end of file diff --git a/tools/walletextension/api/routes.go b/tools/walletextension/api/routes.go index df8cc091ea..d3244622f2 100644 --- a/tools/walletextension/api/routes.go +++ b/tools/walletextension/api/routes.go @@ -62,6 +62,10 @@ func NewHTTPRoutes(walletExt *walletextension.WalletExtension) []Route { Name: common.PathHealth, Func: httpHandler(walletExt, healthRequestHandler), }, + { + Name: common.PathVersion, + Func: httpHandler(walletExt, versionRequestHandler), + }, } } @@ -440,3 +444,18 @@ func healthRequestHandler(walletExt *walletextension.WalletExtension, userConn u walletExt.Logger().Error(fmt.Errorf("error writing success response, %w", err).Error()) } } + +// Handles request to /version endpoint. +func versionRequestHandler(walletExt *walletextension.WalletExtension, userConn userconn.UserConn) { + // read the request + _, err := userConn.ReadRequest() + if err != nil { + walletExt.Logger().Error(fmt.Errorf("error reading request: %w", err).Error()) + return + } + + err = userConn.WriteResponse([]byte(walletExt.Version())) + if err != nil { + walletExt.Logger().Error(fmt.Errorf("error writing success response, %w", err).Error()) + } +} diff --git a/tools/walletextension/api/staticOG/index.html b/tools/walletextension/api/staticOG/index.html index 716e07416a..06a749118a 100644 --- a/tools/walletextension/api/staticOG/index.html +++ b/tools/walletextension/api/staticOG/index.html @@ -33,5 +33,6 @@

◠. Obscuro Gateway Demo! ◠.

+
\ No newline at end of file diff --git a/tools/walletextension/api/staticOG/javascript.js b/tools/walletextension/api/staticOG/javascript.js index ed8381b046..44a0419b4e 100644 --- a/tools/walletextension/api/staticOG/javascript.js +++ b/tools/walletextension/api/staticOG/javascript.js @@ -10,6 +10,7 @@ const pathJoin = obscuroGatewayVersion + "/join/"; const pathAuthenticate = obscuroGatewayVersion + "/authenticate/"; const pathQuery = obscuroGatewayVersion + "/query/"; const pathRevoke = obscuroGatewayVersion + "/revoke/"; +const pathVersion = "/version/"; const obscuroChainIDDecimal = 443; const methodPost = "post"; const methodGet = "get"; @@ -28,6 +29,26 @@ let obscuroGatewayAddress = window.location.protocol + "//" + window.location.ho let provider = null; +async function fetchAndDisplayVersion() { + try { + const versionResp = await fetch( + pathVersion, { + method: methodGet, + headers: jsonHeaders, + } + ); + if (!versionResp.ok) { + throw new Error("Failed to fetch the version"); + } + + let response = await versionResp.text(); + + const versionDiv = document.getElementById("versionDisplay"); + versionDiv.textContent = "Version: " + response; + } catch (error) { + console.error("Error fetching the version:", error); + } +} async function addNetworkToMetaMask(ethereum, userID, chainIDDecimal) { // add network to MetaMask @@ -200,6 +221,10 @@ const initialize = async () => { // getUserID from the gateway with getStorageAt method let userID = await getUserID() + + // load the current version + await fetchAndDisplayVersion(); + // check if userID exists and has a correct type and length (is valid) and display either // option to join or to add a new account to existing user if (isValidUserIDFormat(userID)) { diff --git a/tools/walletextension/common/constants.go b/tools/walletextension/common/constants.go index 4243aea462..6c51c03202 100644 --- a/tools/walletextension/common/constants.go +++ b/tools/walletextension/common/constants.go @@ -50,6 +50,7 @@ const ( GetStorageAtUserIDRequestMethodName = "getUserID" SuccessMsg = "success" APIVersion1 = "/v1" + PathVersion = "/version/" ) var ( diff --git a/tools/walletextension/container/walletextension_container.go b/tools/walletextension/container/walletextension_container.go index 335fabcec4..cdda627405 100644 --- a/tools/walletextension/container/walletextension_container.go +++ b/tools/walletextension/container/walletextension_container.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" "net/http" + "os" "github.com/ethereum/go-ethereum/common" "github.com/obscuronet/go-obscuro/go/common/log" @@ -78,8 +79,14 @@ func NewWalletExtensionContainerFromConfig(config config.Config, logger gethlog. } } + // captures version in the env vars + version := os.Getenv("OBSCURO_GATEWAY_VERSION") + if version == "" { + version = "dev" + } + stopControl := stopcontrol.New() - walletExt := walletextension.New(hostRPCBindAddr, &userAccountManager, databaseStorage, stopControl, logger) + walletExt := walletextension.New(hostRPCBindAddr, &userAccountManager, databaseStorage, stopControl, version, logger) httpRoutes := api.NewHTTPRoutes(walletExt) httpServer := api.NewHTTPServer(fmt.Sprintf("%s:%d", config.WalletExtensionHost, config.WalletExtensionPortHTTP), httpRoutes) diff --git a/tools/walletextension/main/cli.go b/tools/walletextension/main/cli.go index 5e932251a4..f0e35a3fda 100644 --- a/tools/walletextension/main/cli.go +++ b/tools/walletextension/main/cli.go @@ -21,8 +21,8 @@ const ( walletExtensionPortWSUsage = "The port on which to serve websocket JSON RPC requests. Default: 3001." nodeHostName = "nodeHost" - nodeHostDefault = "testnet.obscu.ro" - nodeHostUsage = "The host on which to connect to the Obscuro node. Default: `testnet.obscu.ro`." + nodeHostDefault = "erpc.testnet.obscu.ro" + nodeHostUsage = "The host on which to connect to the Obscuro node. Default: `erpc.testnet.obscu.ro`." nodeHTTPPortName = "nodePortHTTP" nodeHTTPPortDefault = 80 diff --git a/tools/walletextension/wallet_extension.go b/tools/walletextension/wallet_extension.go index 87b30635a3..4b219207ef 100644 --- a/tools/walletextension/wallet_extension.go +++ b/tools/walletextension/wallet_extension.go @@ -37,6 +37,7 @@ type WalletExtension struct { storage storage.Storage logger gethlog.Logger stopControl *stopcontrol.StopControl + version string } func New( @@ -44,6 +45,7 @@ func New( userAccountManager *useraccountmanager.UserAccountManager, storage storage.Storage, stopControl *stopcontrol.StopControl, + version string, logger gethlog.Logger, ) *WalletExtension { return &WalletExtension{ @@ -53,6 +55,7 @@ func New( storage: storage, logger: logger, stopControl: stopControl, + version: version, } } @@ -414,3 +417,7 @@ func (w *WalletExtension) checkParametersForInterceptedGetStorageAt(params []int } return false } + +func (w *WalletExtension) Version() string { + return w.version +} From 1eb404cdfeaa82a84d7d068cd4d0530f208d2354 Mon Sep 17 00:00:00 2001 From: Matt <98158711+BedrockSquirrel@users.noreply.github.com> Date: Thu, 28 Sep 2023 11:50:12 +0100 Subject: [PATCH 4/4] Add retrieve all funds method to bridge (#1557) --- .../ConstantSupplyERC20.go | 802 ++++++++++++++++++ .../CrossChainMessenger.go | 2 +- .../EthereumBridge/EthereumBridge.go | 2 +- .../GasConsumerBalance/GasConsumerBalance.go | 276 ++++++ .../ManagementContract/ManagementContract.go | 251 +++++- contracts/generated/MessageBus/MessageBus.go | 25 +- contracts/generated/ObsERC20/ObsERC20.go | 2 +- .../generated/ObscuroBridge/ObscuroBridge.go | 2 +- .../generated/WrappedERC20/WrappedERC20.go | 2 +- .../src/management/ManagementContract.sol | 8 +- contracts/src/messaging/IMessageBus.sol | 3 + contracts/src/messaging/MessageBus.sol | 7 + contracts/test/bridge-test.ts | 20 + go/enclave/enclave_test.go | 2 +- 14 files changed, 1393 insertions(+), 11 deletions(-) create mode 100644 contracts/generated/ConstantSupplyERC20/ConstantSupplyERC20.go create mode 100644 contracts/generated/GasConsumerBalance/GasConsumerBalance.go diff --git a/contracts/generated/ConstantSupplyERC20/ConstantSupplyERC20.go b/contracts/generated/ConstantSupplyERC20/ConstantSupplyERC20.go new file mode 100644 index 0000000000..b936e0128b --- /dev/null +++ b/contracts/generated/ConstantSupplyERC20/ConstantSupplyERC20.go @@ -0,0 +1,802 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package ConstantSupplyERC20 + +import ( + "errors" + "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 ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// ConstantSupplyERC20MetaData contains all meta data concerning the ConstantSupplyERC20 contract. +var ConstantSupplyERC20MetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"initialSupply\",\"type\":\"uint256\"}],\"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\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60806040523480156200001157600080fd5b5060405162000d4638038062000d468339810160408190526200003491620002dc565b8251839083906200004d90600390602085019062000169565b5080516200006390600490602084019062000169565b5050506200007833826200008160201b60201c565b505050620003b3565b6001600160a01b038216620000dc5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b8060026000828254620000f091906200034f565b90915550506001600160a01b038216600090815260208190526040812080548392906200011f9084906200034f565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b828054620001779062000376565b90600052602060002090601f0160209004810192826200019b5760008555620001e6565b82601f10620001b657805160ff1916838001178555620001e6565b82800160010185558215620001e6579182015b82811115620001e6578251825591602001919060010190620001c9565b50620001f4929150620001f8565b5090565b5b80821115620001f45760008155600101620001f9565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023757600080fd5b81516001600160401b03808211156200025457620002546200020f565b604051601f8301601f19908116603f011681019082821181831017156200027f576200027f6200020f565b816040528381526020925086838588010111156200029c57600080fd5b600091505b83821015620002c05785820183015181830184015290820190620002a1565b83821115620002d25760008385830101525b9695505050505050565b600080600060608486031215620002f257600080fd5b83516001600160401b03808211156200030a57600080fd5b620003188783880162000225565b945060208601519150808211156200032f57600080fd5b506200033e8682870162000225565b925050604084015190509250925092565b600082198211156200037157634e487b7160e01b600052601160045260246000fd5b500190565b600181811c908216806200038b57607f821691505b60208210811415620003ad57634e487b7160e01b600052602260045260246000fd5b50919050565b61098380620003c36000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80633950935111610081578063a457c2d71161005b578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b8063395093511461014357806370a082311461015657806395d89b411461017f57600080fd5b806318160ddd116100b257806318160ddd1461010f57806323b872dd14610121578063313ce5671461013457600080fd5b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d66101e6565b6040516100e391906107c0565b60405180910390f35b6100ff6100fa366004610831565b610278565b60405190151581526020016100e3565b6002545b6040519081526020016100e3565b6100ff61012f36600461085b565b610290565b604051601281526020016100e3565b6100ff610151366004610831565b6102b4565b610113610164366004610897565b6001600160a01b031660009081526020819052604090205490565b6100d66102f3565b6100ff610195366004610831565b610302565b6100ff6101a8366004610831565b6103b1565b6101136101bb3660046108b9565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101f5906108ec565b80601f0160208091040260200160405190810160405280929190818152602001828054610221906108ec565b801561026e5780601f106102435761010080835404028352916020019161026e565b820191906000526020600020905b81548152906001019060200180831161025157829003601f168201915b5050505050905090565b6000336102868185856103bf565b5060019392505050565b60003361029e858285610517565b6102a98585856105a9565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061028690829086906102ee908790610927565b6103bf565b6060600480546101f5906108ec565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156103a45760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6102a982868684036103bf565b6000336102868185856105a9565b6001600160a01b03831661043a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161039b565b6001600160a01b0382166104b65760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161039b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981146105a357818110156105965760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161039b565b6105a384848484036103bf565b50505050565b6001600160a01b0383166106255760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161039b565b6001600160a01b0382166106a15760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161039b565b6001600160a01b038316600090815260208190526040902054818110156107305760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161039b565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610767908490610927565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516107b391815260200190565b60405180910390a36105a3565b600060208083528351808285015260005b818110156107ed578581018301518582016040015282016107d1565b818111156107ff576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461082c57600080fd5b919050565b6000806040838503121561084457600080fd5b61084d83610815565b946020939093013593505050565b60008060006060848603121561087057600080fd5b61087984610815565b925061088760208501610815565b9150604084013590509250925092565b6000602082840312156108a957600080fd5b6108b282610815565b9392505050565b600080604083850312156108cc57600080fd5b6108d583610815565b91506108e360208401610815565b90509250929050565b600181811c9082168061090057607f821691505b6020821081141561092157634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561094857634e487b7160e01b600052601160045260246000fd5b50019056fea264697066735822122045e33060b04ab9b33e2204ef10fd16fc4792ded9f8466343740f87d57b51cfbd64736f6c63430008090033", +} + +// ConstantSupplyERC20ABI is the input ABI used to generate the binding from. +// Deprecated: Use ConstantSupplyERC20MetaData.ABI instead. +var ConstantSupplyERC20ABI = ConstantSupplyERC20MetaData.ABI + +// ConstantSupplyERC20Bin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use ConstantSupplyERC20MetaData.Bin instead. +var ConstantSupplyERC20Bin = ConstantSupplyERC20MetaData.Bin + +// DeployConstantSupplyERC20 deploys a new Ethereum contract, binding an instance of ConstantSupplyERC20 to it. +func DeployConstantSupplyERC20(auth *bind.TransactOpts, backend bind.ContractBackend, name string, symbol string, initialSupply *big.Int) (common.Address, *types.Transaction, *ConstantSupplyERC20, error) { + parsed, err := ConstantSupplyERC20MetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(ConstantSupplyERC20Bin), backend, name, symbol, initialSupply) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &ConstantSupplyERC20{ConstantSupplyERC20Caller: ConstantSupplyERC20Caller{contract: contract}, ConstantSupplyERC20Transactor: ConstantSupplyERC20Transactor{contract: contract}, ConstantSupplyERC20Filterer: ConstantSupplyERC20Filterer{contract: contract}}, nil +} + +// ConstantSupplyERC20 is an auto generated Go binding around an Ethereum contract. +type ConstantSupplyERC20 struct { + ConstantSupplyERC20Caller // Read-only binding to the contract + ConstantSupplyERC20Transactor // Write-only binding to the contract + ConstantSupplyERC20Filterer // Log filterer for contract events +} + +// ConstantSupplyERC20Caller is an auto generated read-only Go binding around an Ethereum contract. +type ConstantSupplyERC20Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ConstantSupplyERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. +type ConstantSupplyERC20Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ConstantSupplyERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ConstantSupplyERC20Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ConstantSupplyERC20Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ConstantSupplyERC20Session struct { + Contract *ConstantSupplyERC20 // 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 +} + +// ConstantSupplyERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ConstantSupplyERC20CallerSession struct { + Contract *ConstantSupplyERC20Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ConstantSupplyERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ConstantSupplyERC20TransactorSession struct { + Contract *ConstantSupplyERC20Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ConstantSupplyERC20Raw is an auto generated low-level Go binding around an Ethereum contract. +type ConstantSupplyERC20Raw struct { + Contract *ConstantSupplyERC20 // Generic contract binding to access the raw methods on +} + +// ConstantSupplyERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ConstantSupplyERC20CallerRaw struct { + Contract *ConstantSupplyERC20Caller // Generic read-only contract binding to access the raw methods on +} + +// ConstantSupplyERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ConstantSupplyERC20TransactorRaw struct { + Contract *ConstantSupplyERC20Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewConstantSupplyERC20 creates a new instance of ConstantSupplyERC20, bound to a specific deployed contract. +func NewConstantSupplyERC20(address common.Address, backend bind.ContractBackend) (*ConstantSupplyERC20, error) { + contract, err := bindConstantSupplyERC20(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ConstantSupplyERC20{ConstantSupplyERC20Caller: ConstantSupplyERC20Caller{contract: contract}, ConstantSupplyERC20Transactor: ConstantSupplyERC20Transactor{contract: contract}, ConstantSupplyERC20Filterer: ConstantSupplyERC20Filterer{contract: contract}}, nil +} + +// NewConstantSupplyERC20Caller creates a new read-only instance of ConstantSupplyERC20, bound to a specific deployed contract. +func NewConstantSupplyERC20Caller(address common.Address, caller bind.ContractCaller) (*ConstantSupplyERC20Caller, error) { + contract, err := bindConstantSupplyERC20(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ConstantSupplyERC20Caller{contract: contract}, nil +} + +// NewConstantSupplyERC20Transactor creates a new write-only instance of ConstantSupplyERC20, bound to a specific deployed contract. +func NewConstantSupplyERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*ConstantSupplyERC20Transactor, error) { + contract, err := bindConstantSupplyERC20(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ConstantSupplyERC20Transactor{contract: contract}, nil +} + +// NewConstantSupplyERC20Filterer creates a new log filterer instance of ConstantSupplyERC20, bound to a specific deployed contract. +func NewConstantSupplyERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*ConstantSupplyERC20Filterer, error) { + contract, err := bindConstantSupplyERC20(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ConstantSupplyERC20Filterer{contract: contract}, nil +} + +// bindConstantSupplyERC20 binds a generic wrapper to an already deployed contract. +func bindConstantSupplyERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ConstantSupplyERC20MetaData.GetAbi() + 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 (_ConstantSupplyERC20 *ConstantSupplyERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ConstantSupplyERC20.Contract.ConstantSupplyERC20Caller.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 (_ConstantSupplyERC20 *ConstantSupplyERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ConstantSupplyERC20.Contract.ConstantSupplyERC20Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ConstantSupplyERC20 *ConstantSupplyERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ConstantSupplyERC20.Contract.ConstantSupplyERC20Transactor.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 (_ConstantSupplyERC20 *ConstantSupplyERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ConstantSupplyERC20.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 (_ConstantSupplyERC20 *ConstantSupplyERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ConstantSupplyERC20.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ConstantSupplyERC20 *ConstantSupplyERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ConstantSupplyERC20.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 (_ConstantSupplyERC20 *ConstantSupplyERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { + var out []interface{} + err := _ConstantSupplyERC20.contract.Call(opts, &out, "allowance", owner, spender) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_ConstantSupplyERC20 *ConstantSupplyERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _ConstantSupplyERC20.Contract.Allowance(&_ConstantSupplyERC20.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 (_ConstantSupplyERC20 *ConstantSupplyERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _ConstantSupplyERC20.Contract.Allowance(&_ConstantSupplyERC20.CallOpts, owner, spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_ConstantSupplyERC20 *ConstantSupplyERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { + var out []interface{} + err := _ConstantSupplyERC20.contract.Call(opts, &out, "balanceOf", account) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_ConstantSupplyERC20 *ConstantSupplyERC20Session) BalanceOf(account common.Address) (*big.Int, error) { + return _ConstantSupplyERC20.Contract.BalanceOf(&_ConstantSupplyERC20.CallOpts, account) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_ConstantSupplyERC20 *ConstantSupplyERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { + return _ConstantSupplyERC20.Contract.BalanceOf(&_ConstantSupplyERC20.CallOpts, account) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_ConstantSupplyERC20 *ConstantSupplyERC20Caller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _ConstantSupplyERC20.contract.Call(opts, &out, "decimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_ConstantSupplyERC20 *ConstantSupplyERC20Session) Decimals() (uint8, error) { + return _ConstantSupplyERC20.Contract.Decimals(&_ConstantSupplyERC20.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_ConstantSupplyERC20 *ConstantSupplyERC20CallerSession) Decimals() (uint8, error) { + return _ConstantSupplyERC20.Contract.Decimals(&_ConstantSupplyERC20.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_ConstantSupplyERC20 *ConstantSupplyERC20Caller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _ConstantSupplyERC20.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_ConstantSupplyERC20 *ConstantSupplyERC20Session) Name() (string, error) { + return _ConstantSupplyERC20.Contract.Name(&_ConstantSupplyERC20.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_ConstantSupplyERC20 *ConstantSupplyERC20CallerSession) Name() (string, error) { + return _ConstantSupplyERC20.Contract.Name(&_ConstantSupplyERC20.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_ConstantSupplyERC20 *ConstantSupplyERC20Caller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _ConstantSupplyERC20.contract.Call(opts, &out, "symbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_ConstantSupplyERC20 *ConstantSupplyERC20Session) Symbol() (string, error) { + return _ConstantSupplyERC20.Contract.Symbol(&_ConstantSupplyERC20.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_ConstantSupplyERC20 *ConstantSupplyERC20CallerSession) Symbol() (string, error) { + return _ConstantSupplyERC20.Contract.Symbol(&_ConstantSupplyERC20.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_ConstantSupplyERC20 *ConstantSupplyERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ConstantSupplyERC20.contract.Call(opts, &out, "totalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_ConstantSupplyERC20 *ConstantSupplyERC20Session) TotalSupply() (*big.Int, error) { + return _ConstantSupplyERC20.Contract.TotalSupply(&_ConstantSupplyERC20.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_ConstantSupplyERC20 *ConstantSupplyERC20CallerSession) TotalSupply() (*big.Int, error) { + return _ConstantSupplyERC20.Contract.TotalSupply(&_ConstantSupplyERC20.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 amount) returns(bool) +func (_ConstantSupplyERC20 *ConstantSupplyERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { + return _ConstantSupplyERC20.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 (_ConstantSupplyERC20 *ConstantSupplyERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { + return _ConstantSupplyERC20.Contract.Approve(&_ConstantSupplyERC20.TransactOpts, spender, amount) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 amount) returns(bool) +func (_ConstantSupplyERC20 *ConstantSupplyERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { + return _ConstantSupplyERC20.Contract.Approve(&_ConstantSupplyERC20.TransactOpts, spender, amount) +} + +// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. +// +// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) +func (_ConstantSupplyERC20 *ConstantSupplyERC20Transactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { + return _ConstantSupplyERC20.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 (_ConstantSupplyERC20 *ConstantSupplyERC20Session) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { + return _ConstantSupplyERC20.Contract.DecreaseAllowance(&_ConstantSupplyERC20.TransactOpts, spender, subtractedValue) +} + +// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. +// +// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) +func (_ConstantSupplyERC20 *ConstantSupplyERC20TransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { + return _ConstantSupplyERC20.Contract.DecreaseAllowance(&_ConstantSupplyERC20.TransactOpts, spender, subtractedValue) +} + +// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. +// +// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) +func (_ConstantSupplyERC20 *ConstantSupplyERC20Transactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { + return _ConstantSupplyERC20.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 (_ConstantSupplyERC20 *ConstantSupplyERC20Session) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { + return _ConstantSupplyERC20.Contract.IncreaseAllowance(&_ConstantSupplyERC20.TransactOpts, spender, addedValue) +} + +// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. +// +// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) +func (_ConstantSupplyERC20 *ConstantSupplyERC20TransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { + return _ConstantSupplyERC20.Contract.IncreaseAllowance(&_ConstantSupplyERC20.TransactOpts, spender, addedValue) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 amount) returns(bool) +func (_ConstantSupplyERC20 *ConstantSupplyERC20Transactor) Transfer(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _ConstantSupplyERC20.contract.Transact(opts, "transfer", to, amount) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 amount) returns(bool) +func (_ConstantSupplyERC20 *ConstantSupplyERC20Session) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _ConstantSupplyERC20.Contract.Transfer(&_ConstantSupplyERC20.TransactOpts, to, amount) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 amount) returns(bool) +func (_ConstantSupplyERC20 *ConstantSupplyERC20TransactorSession) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _ConstantSupplyERC20.Contract.Transfer(&_ConstantSupplyERC20.TransactOpts, to, amount) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool) +func (_ConstantSupplyERC20 *ConstantSupplyERC20Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _ConstantSupplyERC20.contract.Transact(opts, "transferFrom", from, to, amount) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool) +func (_ConstantSupplyERC20 *ConstantSupplyERC20Session) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _ConstantSupplyERC20.Contract.TransferFrom(&_ConstantSupplyERC20.TransactOpts, from, to, amount) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool) +func (_ConstantSupplyERC20 *ConstantSupplyERC20TransactorSession) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _ConstantSupplyERC20.Contract.TransferFrom(&_ConstantSupplyERC20.TransactOpts, from, to, amount) +} + +// ConstantSupplyERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ConstantSupplyERC20 contract. +type ConstantSupplyERC20ApprovalIterator struct { + Event *ConstantSupplyERC20Approval // 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 *ConstantSupplyERC20ApprovalIterator) 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(ConstantSupplyERC20Approval) + 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(ConstantSupplyERC20Approval) + 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 *ConstantSupplyERC20ApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ConstantSupplyERC20ApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ConstantSupplyERC20Approval represents a Approval event raised by the ConstantSupplyERC20 contract. +type ConstantSupplyERC20Approval 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 (_ConstantSupplyERC20 *ConstantSupplyERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ConstantSupplyERC20ApprovalIterator, 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 := _ConstantSupplyERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &ConstantSupplyERC20ApprovalIterator{contract: _ConstantSupplyERC20.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 (_ConstantSupplyERC20 *ConstantSupplyERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ConstantSupplyERC20Approval, 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 := _ConstantSupplyERC20.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(ConstantSupplyERC20Approval) + if err := _ConstantSupplyERC20.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 (_ConstantSupplyERC20 *ConstantSupplyERC20Filterer) ParseApproval(log types.Log) (*ConstantSupplyERC20Approval, error) { + event := new(ConstantSupplyERC20Approval) + if err := _ConstantSupplyERC20.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ConstantSupplyERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ConstantSupplyERC20 contract. +type ConstantSupplyERC20TransferIterator struct { + Event *ConstantSupplyERC20Transfer // 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 *ConstantSupplyERC20TransferIterator) 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(ConstantSupplyERC20Transfer) + 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(ConstantSupplyERC20Transfer) + 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 *ConstantSupplyERC20TransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ConstantSupplyERC20TransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ConstantSupplyERC20Transfer represents a Transfer event raised by the ConstantSupplyERC20 contract. +type ConstantSupplyERC20Transfer 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 (_ConstantSupplyERC20 *ConstantSupplyERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ConstantSupplyERC20TransferIterator, 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 := _ConstantSupplyERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &ConstantSupplyERC20TransferIterator{contract: _ConstantSupplyERC20.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 (_ConstantSupplyERC20 *ConstantSupplyERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ConstantSupplyERC20Transfer, 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 := _ConstantSupplyERC20.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(ConstantSupplyERC20Transfer) + if err := _ConstantSupplyERC20.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 (_ConstantSupplyERC20 *ConstantSupplyERC20Filterer) ParseTransfer(log types.Log) (*ConstantSupplyERC20Transfer, error) { + event := new(ConstantSupplyERC20Transfer) + if err := _ConstantSupplyERC20.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contracts/generated/CrossChainMessenger/CrossChainMessenger.go b/contracts/generated/CrossChainMessenger/CrossChainMessenger.go index 0af3876ecd..d11e6976d5 100644 --- a/contracts/generated/CrossChainMessenger/CrossChainMessenger.go +++ b/contracts/generated/CrossChainMessenger/CrossChainMessenger.go @@ -42,7 +42,7 @@ type StructsCrossChainMessage struct { // CrossChainMessengerMetaData contains all meta data concerning the CrossChainMessenger contract. var CrossChainMessengerMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"messageBusAddr\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"error\",\"type\":\"bytes\"}],\"name\":\"CallFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"crossChainSender\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"encodeCall\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageBus\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"relayMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6080604052600180546001600160a01b031916905534801561002057600080fd5b506040516109ad3803806109ad83398101604081905261003f91610064565b600080546001600160a01b0319166001600160a01b0392909216919091179055610094565b60006020828403121561007657600080fd5b81516001600160a01b038116811461008d57600080fd5b9392505050565b61090a806100a36000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80635b76f28b1461005157806363012de51461007a5780639b7cf1ee146100a5578063a1a227fa146100ba575b600080fd5b61006461005f366004610425565b6100cb565b6040516100719190610504565b60405180910390f35b60015461008d906001600160a01b031681565b6040516001600160a01b039091168152602001610071565b6100b86100b336600461051e565b61014b565b005b6000546001600160a01b031661008d565b60606040518060600160405280856001600160a01b0316815260200184848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250938552505050602091820152604051610133929101610559565b60405160208183030381529060405290509392505050565b6101548161027d565b610161602082018261059e565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055600061019d60808301836105b9565b8101906101aa9190610690565b905060008082600001516001600160a01b03165a84602001516040516101d09190610764565b60006040518083038160008787f1925050503d806000811461020e576040519150601f19603f3d011682016040523d82523d6000602084013e610213565b606091505b50915091508161025a57806040517fa5fa8d2b0000000000000000000000000000000000000000000000000000000081526004016102519190610504565b60405180910390fd5b50506001805473ffffffffffffffffffffffffffffffffffffffff191690555050565b6000546040517f33a88c720000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906333a88c72906102c69084906004016107ce565b60206040518083038186803b1580156102de57600080fd5b505afa1580156102f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031691906108b2565b6103625760405162461bcd60e51b815260206004820152601f60248201527f4d657373616765206e6f7420666f756e64206f722066696e616c697a65642e006044820152606401610251565b60008160405160200161037591906107ce565b60408051601f1981840301815291815281516020928301206000818152600290935291205490915060ff16156103ed5760405162461bcd60e51b815260206004820152601960248201527f4d65737361676520616c726561647920636f6e73756d65642e000000000000006044820152606401610251565b6000908152600260205260409020805460ff1916600117905550565b80356001600160a01b038116811461042057600080fd5b919050565b60008060006040848603121561043a57600080fd5b61044384610409565b9250602084013567ffffffffffffffff8082111561046057600080fd5b818601915086601f83011261047457600080fd5b81358181111561048357600080fd5b87602082850101111561049557600080fd5b6020830194508093505050509250925092565b60005b838110156104c35781810151838201526020016104ab565b838111156104d2576000848401525b50505050565b600081518084526104f08160208601602086016104a8565b601f01601f19169290920160200192915050565b60208152600061051760208301846104d8565b9392505050565b60006020828403121561053057600080fd5b813567ffffffffffffffff81111561054757600080fd5b820160c0818503121561051757600080fd5b602081526001600160a01b038251166020820152600060208301516060604084015261058860808401826104d8565b9050604084015160608401528091505092915050565b6000602082840312156105b057600080fd5b61051782610409565b6000808335601e198436030181126105d057600080fd5b83018035915067ffffffffffffffff8211156105eb57600080fd5b60200191503681900382131561060057600080fd5b9250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff8111828210171561065957610659610607565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561068857610688610607565b604052919050565b600060208083850312156106a357600080fd5b823567ffffffffffffffff808211156106bb57600080fd5b90840190606082870312156106cf57600080fd5b6106d7610636565b6106e083610409565b815283830135828111156106f357600080fd5b8301601f8101881361070457600080fd5b80358381111561071657610716610607565b610728601f8201601f1916870161065f565b9350808452888682840101111561073e57600080fd5b808683018786013760009084018601525092830152604090810135908201529392505050565b600082516107768184602087016104a8565b9190910192915050565b803563ffffffff8116811461042057600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff8116811461042057600080fd5b602081526001600160a01b036107e383610409565b1660208201526000602083013567ffffffffffffffff80821680831461080857600080fd5b8060408601525061081b60408601610780565b915063ffffffff80831660608601528061083760608801610780565b1660808601525060808501359150601e1985360301821261085757600080fd5b9084019081358181111561086a57600080fd5b80360386131561087957600080fd5b60c060a086015261089160e086018260208601610794565b925050506108a160a085016107bd565b60ff811660c0850152509392505050565b6000602082840312156108c457600080fd5b8151801515811461051757600080fdfea26469706673582212200acc607690386a002676eb2cb59eb38fb8dded8b683c5c2b9237a9f2c7ae948b64736f6c63430008090033", + Bin: "0x6080604052600180546001600160a01b031916905534801561002057600080fd5b506040516109ad3803806109ad83398101604081905261003f91610064565b600080546001600160a01b0319166001600160a01b0392909216919091179055610094565b60006020828403121561007657600080fd5b81516001600160a01b038116811461008d57600080fd5b9392505050565b61090a806100a36000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80635b76f28b1461005157806363012de51461007a5780639b7cf1ee146100a5578063a1a227fa146100ba575b600080fd5b61006461005f366004610425565b6100cb565b6040516100719190610504565b60405180910390f35b60015461008d906001600160a01b031681565b6040516001600160a01b039091168152602001610071565b6100b86100b336600461051e565b61014b565b005b6000546001600160a01b031661008d565b60606040518060600160405280856001600160a01b0316815260200184848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250938552505050602091820152604051610133929101610559565b60405160208183030381529060405290509392505050565b6101548161027d565b610161602082018261059e565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055600061019d60808301836105b9565b8101906101aa9190610690565b905060008082600001516001600160a01b03165a84602001516040516101d09190610764565b60006040518083038160008787f1925050503d806000811461020e576040519150601f19603f3d011682016040523d82523d6000602084013e610213565b606091505b50915091508161025a57806040517fa5fa8d2b0000000000000000000000000000000000000000000000000000000081526004016102519190610504565b60405180910390fd5b50506001805473ffffffffffffffffffffffffffffffffffffffff191690555050565b6000546040517f33a88c720000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906333a88c72906102c69084906004016107ce565b60206040518083038186803b1580156102de57600080fd5b505afa1580156102f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031691906108b2565b6103625760405162461bcd60e51b815260206004820152601f60248201527f4d657373616765206e6f7420666f756e64206f722066696e616c697a65642e006044820152606401610251565b60008160405160200161037591906107ce565b60408051601f1981840301815291815281516020928301206000818152600290935291205490915060ff16156103ed5760405162461bcd60e51b815260206004820152601960248201527f4d65737361676520616c726561647920636f6e73756d65642e000000000000006044820152606401610251565b6000908152600260205260409020805460ff1916600117905550565b80356001600160a01b038116811461042057600080fd5b919050565b60008060006040848603121561043a57600080fd5b61044384610409565b9250602084013567ffffffffffffffff8082111561046057600080fd5b818601915086601f83011261047457600080fd5b81358181111561048357600080fd5b87602082850101111561049557600080fd5b6020830194508093505050509250925092565b60005b838110156104c35781810151838201526020016104ab565b838111156104d2576000848401525b50505050565b600081518084526104f08160208601602086016104a8565b601f01601f19169290920160200192915050565b60208152600061051760208301846104d8565b9392505050565b60006020828403121561053057600080fd5b813567ffffffffffffffff81111561054757600080fd5b820160c0818503121561051757600080fd5b602081526001600160a01b038251166020820152600060208301516060604084015261058860808401826104d8565b9050604084015160608401528091505092915050565b6000602082840312156105b057600080fd5b61051782610409565b6000808335601e198436030181126105d057600080fd5b83018035915067ffffffffffffffff8211156105eb57600080fd5b60200191503681900382131561060057600080fd5b9250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff8111828210171561065957610659610607565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561068857610688610607565b604052919050565b600060208083850312156106a357600080fd5b823567ffffffffffffffff808211156106bb57600080fd5b90840190606082870312156106cf57600080fd5b6106d7610636565b6106e083610409565b815283830135828111156106f357600080fd5b8301601f8101881361070457600080fd5b80358381111561071657610716610607565b610728601f8201601f1916870161065f565b9350808452888682840101111561073e57600080fd5b808683018786013760009084018601525092830152604090810135908201529392505050565b600082516107768184602087016104a8565b9190910192915050565b803563ffffffff8116811461042057600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff8116811461042057600080fd5b602081526001600160a01b036107e383610409565b1660208201526000602083013567ffffffffffffffff80821680831461080857600080fd5b8060408601525061081b60408601610780565b915063ffffffff80831660608601528061083760608801610780565b1660808601525060808501359150601e1985360301821261085757600080fd5b9084019081358181111561086a57600080fd5b80360386131561087957600080fd5b60c060a086015261089160e086018260208601610794565b925050506108a160a085016107bd565b60ff811660c0850152509392505050565b6000602082840312156108c457600080fd5b8151801515811461051757600080fdfea26469706673582212202090fa14d405733eeb20c7bd72003a0427e54bafa4f122140f5a19df921d92ea64736f6c63430008090033", } // CrossChainMessengerABI is the input ABI used to generate the binding from. diff --git a/contracts/generated/EthereumBridge/EthereumBridge.go b/contracts/generated/EthereumBridge/EthereumBridge.go index 1ba1afaa04..e2d39edf5b 100644 --- a/contracts/generated/EthereumBridge/EthereumBridge.go +++ b/contracts/generated/EthereumBridge/EthereumBridge.go @@ -32,7 +32,7 @@ var ( // EthereumBridgeMetaData contains all meta data concerning the EthereumBridge contract. var EthereumBridgeMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"messenger\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"remoteBridge\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"remoteAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"localAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"name\":\"CreatedWrappedToken\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"wrappedToken\",\"type\":\"address\"}],\"name\":\"hasTokenMapping\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"localToRemoteToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"crossChainAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"name\":\"onCreateTokenCommand\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"receiveAssets\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"remoteToLocalToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"sendERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"sendNative\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"wrappedTokens\",\"outputs\":[{\"internalType\":\"contractWrappedERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162002b7f38038062002b7f83398101604081905262000044916200012c565b600080546001600160a01b0319166001600160a01b038416908117909155604080516350d113fd60e11b8152905184929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d6919062000164565b600180546001600160a01b039283166001600160a01b031991821617909155600580549490921693169290921790915550620001899050565b80516001600160a01b03811681146200012757600080fd5b919050565b600080604083850312156200014057600080fd5b6200014b836200010f565b91506200015b602084016200010f565b90509250929050565b6000602082840312156200017757600080fd5b62000182826200010f565b9392505050565b6129e680620001996000396000f3fe6080604052600436106200008a5760003560e01c80639813c7b211620000555780639813c7b214620002065780639e405b711462000256578063a381c8e21462000290578063d5c6b50414620002b55762000103565b80628d48e3146200014c5780631888d71214620001a3578063458ffd6314620001bc57806383bece4d14620001e15762000103565b36620001035760405162461bcd60e51b815260206004820152602360248201527f436f6e747261637420646f6573206e6f7420737570706f72742072656365697660448201527f652829000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152601d60248201527f66616c6c6261636b2829206d6574686f6420756e737570706f727465640000006044820152606401620000fa565b3480156200015957600080fd5b50620001866200016b36600462000c75565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b620001ba620001b436600462000c75565b620002ef565b005b348015620001c957600080fd5b50620001ba620001db36600462000ce8565b620004a0565b348015620001ee57600080fd5b50620001ba6200020036600462000d74565b620006be565b3480156200021357600080fd5b50620002456200022536600462000c75565b6001600160a01b0390811660009081526002602052604090205416151590565b60405190151581526020016200019a565b3480156200026357600080fd5b50620001866200027536600462000c75565b6003602052600090815260409020546001600160a01b031681565b3480156200029d57600080fd5b50620001ba620002af36600462000d74565b62000901565b348015620002c257600080fd5b5062000186620002d436600462000c75565b6002602052600090815260409020546001600160a01b031681565b60003411620003415760405162461bcd60e51b815260206004820152600d60248201527f4e6f7468696e672073656e742e000000000000000000000000000000000000006044820152606401620000fa565b6000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b546001600160a01b0316620003c35760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b600080805260036020527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff546040516001600160a01b03918216602482015234604482015290831660648201526383bece4d60e01b9060840160408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526005549091506200049c906001600160a01b03168260005b60008062000a90565b5050565b6005546000546001600160a01b0391821691163314620005295760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200053d62000bbe565b6001600160a01b031614620005bb5760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b600085858585604051620005cf9062000c4e565b620005de949392919062000de4565b604051809103906000f080158015620005fb573d6000803e3d6000fd5b506001600160a01b03808216600081815260026020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168617909155600383528184208054968f169682168717905594835260049091529081902080549093169091179091555190915081907f30c05779f384e0ae9d43bbf7ec4417f28bdc53d02a35551b6eb270a9c4c71dca90620006ac908a9084908b908b908b908b9062000e1a565b60405180910390a15050505050505050565b6005546000546001600160a01b0391821691163314620007475760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200075b62000bbe565b6001600160a01b031614620007d95760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6001600160a01b038085166000908152600460209081526040808320548416808452600290925290912054909116806200087c5760405162461bcd60e51b815260206004820152602b60248201527f526563656976696e672061737365747320666f7220756e6b6e6f776e2077726160448201527f7070656420746f6b656e210000000000000000000000000000000000000000006064820152608401620000fa565b6040517f979005ad0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526024820187905282169063979005ad90604401600060405180830381600087803b158015620008e057600080fd5b505af1158015620008f5573d6000803e3d6000fd5b50505050505050505050565b6001600160a01b03808416600090815260026020526040902054166200096a5760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b6001600160a01b03838116600090815260026020526040908190205490517f1dd319cb000000000000000000000000000000000000000000000000000000008152336004820152602481018590529116908190631dd319cb90604401600060405180830381600087803b158015620009e157600080fd5b505af1158015620009f6573d6000803e3d6000fd5b505050506001600160a01b03848116600090815260036020908152604080832054815190851660248201526044810188905286851660648083019190915282518083039091018152608490910190915290810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b179052600554909262000a8992911690839062000493565b5050505050565b60006040518060600160405280876001600160a01b031681526020018681526020018481525060405160200162000ac8919062000ebb565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff1690601462000b1d8362000f02565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b815260040162000b5f949392919062000f4e565b602060405180830381600087803b15801562000b7a57600080fd5b505af115801562000b8f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bb5919062000f8d565b50505050505050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b15801562000c0e57600080fd5b505afa15801562000c23573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c49919062000fb9565b905090565b6119d78062000fda83390190565b6001600160a01b038116811462000c7257600080fd5b50565b60006020828403121562000c8857600080fd5b813562000c958162000c5c565b9392505050565b60008083601f84011262000caf57600080fd5b50813567ffffffffffffffff81111562000cc857600080fd5b60208301915083602082850101111562000ce157600080fd5b9250929050565b60008060008060006060868803121562000d0157600080fd5b853562000d0e8162000c5c565b9450602086013567ffffffffffffffff8082111562000d2c57600080fd5b62000d3a89838a0162000c9c565b9096509450604088013591508082111562000d5457600080fd5b5062000d638882890162000c9c565b969995985093965092949392505050565b60008060006060848603121562000d8a57600080fd5b833562000d978162000c5c565b925060208401359150604084013562000db08162000c5c565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152600062000dfa60408301868862000dbb565b828103602084015262000e0f81858762000dbb565b979650505050505050565b60006001600160a01b0380891683528088166020840152506080604083015262000e4960808301868862000dbb565b828103606084015262000e5e81858762000dbb565b9998505050505050505050565b6000815180845260005b8181101562000e935760208185018101518683018201520162000e75565b8181111562000ea6576000602083870101525b50601f01601f19169290920160200192915050565b602081526001600160a01b038251166020820152600060208301516060604084015262000eec608084018262000e6b565b9050604084015160608401528091505092915050565b600063ffffffff8083168181141562000f44577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001019392505050565b600063ffffffff80871683528086166020840152506080604083015262000f79608083018562000e6b565b905060ff8316606083015295945050505050565b60006020828403121562000fa057600080fd5b815167ffffffffffffffff8116811462000c9557600080fd5b60006020828403121562000fcc57600080fd5b815162000c958162000c5c56fe6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea2646970667358221220848f35fdc28f22577d7d393858f44350cbde245dc770487cf991c8a21210b53864736f6c63430008090033a26469706673582212201cb68080b09cb661012c058defbf9bd2a3be17a1afc6d3912fd82b970de25b5d64736f6c63430008090033", + Bin: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162002b7f38038062002b7f83398101604081905262000044916200012c565b600080546001600160a01b0319166001600160a01b038416908117909155604080516350d113fd60e11b8152905184929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d6919062000164565b600180546001600160a01b039283166001600160a01b031991821617909155600580549490921693169290921790915550620001899050565b80516001600160a01b03811681146200012757600080fd5b919050565b600080604083850312156200014057600080fd5b6200014b836200010f565b91506200015b602084016200010f565b90509250929050565b6000602082840312156200017757600080fd5b62000182826200010f565b9392505050565b6129e680620001996000396000f3fe6080604052600436106200008a5760003560e01c80639813c7b211620000555780639813c7b214620002065780639e405b711462000256578063a381c8e21462000290578063d5c6b50414620002b55762000103565b80628d48e3146200014c5780631888d71214620001a3578063458ffd6314620001bc57806383bece4d14620001e15762000103565b36620001035760405162461bcd60e51b815260206004820152602360248201527f436f6e747261637420646f6573206e6f7420737570706f72742072656365697660448201527f652829000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152601d60248201527f66616c6c6261636b2829206d6574686f6420756e737570706f727465640000006044820152606401620000fa565b3480156200015957600080fd5b50620001866200016b36600462000c75565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b620001ba620001b436600462000c75565b620002ef565b005b348015620001c957600080fd5b50620001ba620001db36600462000ce8565b620004a0565b348015620001ee57600080fd5b50620001ba6200020036600462000d74565b620006be565b3480156200021357600080fd5b50620002456200022536600462000c75565b6001600160a01b0390811660009081526002602052604090205416151590565b60405190151581526020016200019a565b3480156200026357600080fd5b50620001866200027536600462000c75565b6003602052600090815260409020546001600160a01b031681565b3480156200029d57600080fd5b50620001ba620002af36600462000d74565b62000901565b348015620002c257600080fd5b5062000186620002d436600462000c75565b6002602052600090815260409020546001600160a01b031681565b60003411620003415760405162461bcd60e51b815260206004820152600d60248201527f4e6f7468696e672073656e742e000000000000000000000000000000000000006044820152606401620000fa565b6000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b546001600160a01b0316620003c35760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b600080805260036020527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff546040516001600160a01b03918216602482015234604482015290831660648201526383bece4d60e01b9060840160408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526005549091506200049c906001600160a01b03168260005b60008062000a90565b5050565b6005546000546001600160a01b0391821691163314620005295760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200053d62000bbe565b6001600160a01b031614620005bb5760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b600085858585604051620005cf9062000c4e565b620005de949392919062000de4565b604051809103906000f080158015620005fb573d6000803e3d6000fd5b506001600160a01b03808216600081815260026020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168617909155600383528184208054968f169682168717905594835260049091529081902080549093169091179091555190915081907f30c05779f384e0ae9d43bbf7ec4417f28bdc53d02a35551b6eb270a9c4c71dca90620006ac908a9084908b908b908b908b9062000e1a565b60405180910390a15050505050505050565b6005546000546001600160a01b0391821691163314620007475760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401620000fa565b806001600160a01b03166200075b62000bbe565b6001600160a01b031614620007d95760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401620000fa565b6001600160a01b038085166000908152600460209081526040808320548416808452600290925290912054909116806200087c5760405162461bcd60e51b815260206004820152602b60248201527f526563656976696e672061737365747320666f7220756e6b6e6f776e2077726160448201527f7070656420746f6b656e210000000000000000000000000000000000000000006064820152608401620000fa565b6040517f979005ad0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526024820187905282169063979005ad90604401600060405180830381600087803b158015620008e057600080fd5b505af1158015620008f5573d6000803e3d6000fd5b50505050505050505050565b6001600160a01b03808416600090815260026020526040902054166200096a5760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e00000000000000000000006044820152606401620000fa565b6001600160a01b03838116600090815260026020526040908190205490517f1dd319cb000000000000000000000000000000000000000000000000000000008152336004820152602481018590529116908190631dd319cb90604401600060405180830381600087803b158015620009e157600080fd5b505af1158015620009f6573d6000803e3d6000fd5b505050506001600160a01b03848116600090815260036020908152604080832054815190851660248201526044810188905286851660648083019190915282518083039091018152608490910190915290810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b179052600554909262000a8992911690839062000493565b5050505050565b60006040518060600160405280876001600160a01b031681526020018681526020018481525060405160200162000ac8919062000ebb565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff1690601462000b1d8362000f02565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b815260040162000b5f949392919062000f4e565b602060405180830381600087803b15801562000b7a57600080fd5b505af115801562000b8f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bb5919062000f8d565b50505050505050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b15801562000c0e57600080fd5b505afa15801562000c23573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c49919062000fb9565b905090565b6119d78062000fda83390190565b6001600160a01b038116811462000c7257600080fd5b50565b60006020828403121562000c8857600080fd5b813562000c958162000c5c565b9392505050565b60008083601f84011262000caf57600080fd5b50813567ffffffffffffffff81111562000cc857600080fd5b60208301915083602082850101111562000ce157600080fd5b9250929050565b60008060008060006060868803121562000d0157600080fd5b853562000d0e8162000c5c565b9450602086013567ffffffffffffffff8082111562000d2c57600080fd5b62000d3a89838a0162000c9c565b9096509450604088013591508082111562000d5457600080fd5b5062000d638882890162000c9c565b969995985093965092949392505050565b60008060006060848603121562000d8a57600080fd5b833562000d978162000c5c565b925060208401359150604084013562000db08162000c5c565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152600062000dfa60408301868862000dbb565b828103602084015262000e0f81858762000dbb565b979650505050505050565b60006001600160a01b0380891683528088166020840152506080604083015262000e4960808301868862000dbb565b828103606084015262000e5e81858762000dbb565b9998505050505050505050565b6000815180845260005b8181101562000e935760208185018101518683018201520162000e75565b8181111562000ea6576000602083870101525b50601f01601f19169290920160200192915050565b602081526001600160a01b038251166020820152600060208301516060604084015262000eec608084018262000e6b565b9050604084015160608401528091505092915050565b600063ffffffff8083168181141562000f44577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001019392505050565b600063ffffffff80871683528086166020840152506080604083015262000f79608083018562000e6b565b905060ff8316606083015295945050505050565b60006020828403121562000fa057600080fd5b815167ffffffffffffffff8116811462000c9557600080fd5b60006020828403121562000fcc57600080fd5b815162000c958162000c5c56fe6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea26469706673582212201c0c3a851d2bc9f4f94393362a160e99651c656d627113abd657cce4d7d8770964736f6c63430008090033a2646970667358221220f9825dd91174a15483717354b811471c21735f94eeeab98508c31c1e389d5d7164736f6c63430008090033", } // EthereumBridgeABI is the input ABI used to generate the binding from. diff --git a/contracts/generated/GasConsumerBalance/GasConsumerBalance.go b/contracts/generated/GasConsumerBalance/GasConsumerBalance.go new file mode 100644 index 0000000000..b64b2e7efa --- /dev/null +++ b/contracts/generated/GasConsumerBalance/GasConsumerBalance.go @@ -0,0 +1,276 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package GasConsumerBalance + +import ( + "errors" + "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 ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// GasConsumerBalanceMetaData contains all meta data concerning the GasConsumerBalance contract. +var GasConsumerBalanceMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"destroy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"get_balance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610157806100326000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806383197ef0146100465780638da5cb5b14610050578063c1cfb99a1461004e575b600080fd5b61004e610099565b005b6000546100709073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b60005473ffffffffffffffffffffffffffffffffffffffff16331461011e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f596f7520617265206e6f7420746865206f776e65720000000000000000000000604482015260640160405180910390fd5b30fffea2646970667358221220b9b74e1c04efc1de448844b2b225f377bd3e408744e0d2845012f40f2c20396c64736f6c63430008090033", +} + +// GasConsumerBalanceABI is the input ABI used to generate the binding from. +// Deprecated: Use GasConsumerBalanceMetaData.ABI instead. +var GasConsumerBalanceABI = GasConsumerBalanceMetaData.ABI + +// GasConsumerBalanceBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use GasConsumerBalanceMetaData.Bin instead. +var GasConsumerBalanceBin = GasConsumerBalanceMetaData.Bin + +// DeployGasConsumerBalance deploys a new Ethereum contract, binding an instance of GasConsumerBalance to it. +func DeployGasConsumerBalance(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *GasConsumerBalance, error) { + parsed, err := GasConsumerBalanceMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(GasConsumerBalanceBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &GasConsumerBalance{GasConsumerBalanceCaller: GasConsumerBalanceCaller{contract: contract}, GasConsumerBalanceTransactor: GasConsumerBalanceTransactor{contract: contract}, GasConsumerBalanceFilterer: GasConsumerBalanceFilterer{contract: contract}}, nil +} + +// GasConsumerBalance is an auto generated Go binding around an Ethereum contract. +type GasConsumerBalance struct { + GasConsumerBalanceCaller // Read-only binding to the contract + GasConsumerBalanceTransactor // Write-only binding to the contract + GasConsumerBalanceFilterer // Log filterer for contract events +} + +// GasConsumerBalanceCaller is an auto generated read-only Go binding around an Ethereum contract. +type GasConsumerBalanceCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GasConsumerBalanceTransactor is an auto generated write-only Go binding around an Ethereum contract. +type GasConsumerBalanceTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GasConsumerBalanceFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type GasConsumerBalanceFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GasConsumerBalanceSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type GasConsumerBalanceSession struct { + Contract *GasConsumerBalance // 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 +} + +// GasConsumerBalanceCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type GasConsumerBalanceCallerSession struct { + Contract *GasConsumerBalanceCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// GasConsumerBalanceTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type GasConsumerBalanceTransactorSession struct { + Contract *GasConsumerBalanceTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// GasConsumerBalanceRaw is an auto generated low-level Go binding around an Ethereum contract. +type GasConsumerBalanceRaw struct { + Contract *GasConsumerBalance // Generic contract binding to access the raw methods on +} + +// GasConsumerBalanceCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type GasConsumerBalanceCallerRaw struct { + Contract *GasConsumerBalanceCaller // Generic read-only contract binding to access the raw methods on +} + +// GasConsumerBalanceTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type GasConsumerBalanceTransactorRaw struct { + Contract *GasConsumerBalanceTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewGasConsumerBalance creates a new instance of GasConsumerBalance, bound to a specific deployed contract. +func NewGasConsumerBalance(address common.Address, backend bind.ContractBackend) (*GasConsumerBalance, error) { + contract, err := bindGasConsumerBalance(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &GasConsumerBalance{GasConsumerBalanceCaller: GasConsumerBalanceCaller{contract: contract}, GasConsumerBalanceTransactor: GasConsumerBalanceTransactor{contract: contract}, GasConsumerBalanceFilterer: GasConsumerBalanceFilterer{contract: contract}}, nil +} + +// NewGasConsumerBalanceCaller creates a new read-only instance of GasConsumerBalance, bound to a specific deployed contract. +func NewGasConsumerBalanceCaller(address common.Address, caller bind.ContractCaller) (*GasConsumerBalanceCaller, error) { + contract, err := bindGasConsumerBalance(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &GasConsumerBalanceCaller{contract: contract}, nil +} + +// NewGasConsumerBalanceTransactor creates a new write-only instance of GasConsumerBalance, bound to a specific deployed contract. +func NewGasConsumerBalanceTransactor(address common.Address, transactor bind.ContractTransactor) (*GasConsumerBalanceTransactor, error) { + contract, err := bindGasConsumerBalance(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &GasConsumerBalanceTransactor{contract: contract}, nil +} + +// NewGasConsumerBalanceFilterer creates a new log filterer instance of GasConsumerBalance, bound to a specific deployed contract. +func NewGasConsumerBalanceFilterer(address common.Address, filterer bind.ContractFilterer) (*GasConsumerBalanceFilterer, error) { + contract, err := bindGasConsumerBalance(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &GasConsumerBalanceFilterer{contract: contract}, nil +} + +// bindGasConsumerBalance binds a generic wrapper to an already deployed contract. +func bindGasConsumerBalance(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := GasConsumerBalanceMetaData.GetAbi() + 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 (_GasConsumerBalance *GasConsumerBalanceRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _GasConsumerBalance.Contract.GasConsumerBalanceCaller.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 (_GasConsumerBalance *GasConsumerBalanceRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GasConsumerBalance.Contract.GasConsumerBalanceTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_GasConsumerBalance *GasConsumerBalanceRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _GasConsumerBalance.Contract.GasConsumerBalanceTransactor.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 (_GasConsumerBalance *GasConsumerBalanceCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _GasConsumerBalance.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 (_GasConsumerBalance *GasConsumerBalanceTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GasConsumerBalance.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_GasConsumerBalance *GasConsumerBalanceTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _GasConsumerBalance.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 (_GasConsumerBalance *GasConsumerBalanceCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _GasConsumerBalance.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_GasConsumerBalance *GasConsumerBalanceSession) Owner() (common.Address, error) { + return _GasConsumerBalance.Contract.Owner(&_GasConsumerBalance.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_GasConsumerBalance *GasConsumerBalanceCallerSession) Owner() (common.Address, error) { + return _GasConsumerBalance.Contract.Owner(&_GasConsumerBalance.CallOpts) +} + +// Destroy is a paid mutator transaction binding the contract method 0x83197ef0. +// +// Solidity: function destroy() returns() +func (_GasConsumerBalance *GasConsumerBalanceTransactor) Destroy(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GasConsumerBalance.contract.Transact(opts, "destroy") +} + +// Destroy is a paid mutator transaction binding the contract method 0x83197ef0. +// +// Solidity: function destroy() returns() +func (_GasConsumerBalance *GasConsumerBalanceSession) Destroy() (*types.Transaction, error) { + return _GasConsumerBalance.Contract.Destroy(&_GasConsumerBalance.TransactOpts) +} + +// Destroy is a paid mutator transaction binding the contract method 0x83197ef0. +// +// Solidity: function destroy() returns() +func (_GasConsumerBalance *GasConsumerBalanceTransactorSession) Destroy() (*types.Transaction, error) { + return _GasConsumerBalance.Contract.Destroy(&_GasConsumerBalance.TransactOpts) +} + +// GetBalance is a paid mutator transaction binding the contract method 0xc1cfb99a. +// +// Solidity: function get_balance() returns() +func (_GasConsumerBalance *GasConsumerBalanceTransactor) GetBalance(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GasConsumerBalance.contract.Transact(opts, "get_balance") +} + +// GetBalance is a paid mutator transaction binding the contract method 0xc1cfb99a. +// +// Solidity: function get_balance() returns() +func (_GasConsumerBalance *GasConsumerBalanceSession) GetBalance() (*types.Transaction, error) { + return _GasConsumerBalance.Contract.GetBalance(&_GasConsumerBalance.TransactOpts) +} + +// GetBalance is a paid mutator transaction binding the contract method 0xc1cfb99a. +// +// Solidity: function get_balance() returns() +func (_GasConsumerBalance *GasConsumerBalanceTransactorSession) GetBalance() (*types.Transaction, error) { + return _GasConsumerBalance.Contract.GetBalance(&_GasConsumerBalance.TransactOpts) +} diff --git a/contracts/generated/ManagementContract/ManagementContract.go b/contracts/generated/ManagementContract/ManagementContract.go index 55ce77e434..6f51872731 100644 --- a/contracts/generated/ManagementContract/ManagementContract.go +++ b/contracts/generated/ManagementContract/ManagementContract.go @@ -53,8 +53,8 @@ type StructsMetaRollup struct { // ManagementContractMetaData contains all meta data concerning the ManagementContract contract. var ManagementContractMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"messageBusAddress\",\"type\":\"address\"}],\"name\":\"LogManagementContractCreated\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"AggregatorID\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"r\",\"type\":\"tuple\"},{\"internalType\":\"string\",\"name\":\"_rollupData\",\"type\":\"string\"},{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage[]\",\"name\":\"messages\",\"type\":\"tuple[]\"}],\"internalType\":\"structStructs.HeaderCrossChainData\",\"name\":\"crossChainData\",\"type\":\"tuple\"}],\"name\":\"AddRollup\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"Attested\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GetHostAddresses\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rollupHash\",\"type\":\"bytes32\"}],\"name\":\"GetRollupByHash\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"AggregatorID\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_aggregatorID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_initSecret\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_hostAddress\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_genesisAttestation\",\"type\":\"string\"}],\"name\":\"InitializeNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"IsWithdrawalAvailable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"requestReport\",\"type\":\"string\"}],\"name\":\"RequestNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attesterID\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"requesterID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"attesterSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"responseSecret\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"hostAddress\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"verifyAttester\",\"type\":\"bool\"}],\"name\":\"RespondNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBatchSeqNo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageBus\",\"outputs\":[{\"internalType\":\"contractIMessageBus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x6080604052600060045534801561001557600080fd5b5060405161002290610096565b604051809103906000f08015801561003e573d6000803e3d6000fd5b50600680546001600160a01b0319166001600160a01b039290921691821790556040519081527fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf9060200160405180910390a16100a3565b6110df8061159f83390190565b6114ed806100b26000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80638fa0d05311610076578063a52f433c1161005b578063a52f433c14610222578063bbd79e1514610232578063e34fbfc81461024557600080fd5b80638fa0d053146101e4578063a1a227fa146101f757600080fd5b8063440c953b116100a7578063440c953b1461011d57806359a90071146101345780638236a7ba1461014957600080fd5b8063324ff866146100c357806343348b2f146100e1575b600080fd5b6100cb610258565b6040516100d89190610d03565b60405180910390f35b61010d6100ef366004610d92565b6001600160a01b031660009081526001602052604090205460ff1690565b60405190151581526020016100d8565b61012660045481565b6040519081526020016100d8565b610147610142366004610e9b565b610331565b005b6101b1610157366004610f42565b6040805160608082018352600080835260208084018290529284018190528481526005835283902083519182018452805480835260018201546001600160a01b031693830193909352600201549281019290925290911491565b60408051921515835281516020808501919091528201516001600160a01b031683820152015160608201526080016100d8565b6101476101f2366004610f5b565b6103b9565b60065461020a906001600160a01b031681565b6040516001600160a01b0390911681526020016100d8565b600354610100900460ff1661010d565b610147610240366004610fe2565b610453565b6101476102533660046110a8565b6105b6565b60606002805480602002602001604051908101604052809291908181526020016000905b8282101561032857838290600052602060002001805461029b906110ea565b80601f01602080910402602001604051908101604052809291908181526020018280546102c7906110ea565b80156103145780601f106102e957610100808354040283529160200191610314565b820191906000526020600020905b8154815290600101906020018083116102f757829003601f168201915b50505050508152602001906001019061027c565b50505050905090565b60035460ff161561034157600080fd5b60038054600160ff1991821681179092556001600160a01b038816600090815260208381526040822080549093168417909255600280549384018155905284516103b0927f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0191860190610bca565b50505050505050565b600160006103cd6040870160208801610d92565b6001600160a01b0316815260208101919091526040016000205460ff1661043b5760405162461bcd60e51b815260206004820152601760248201527f61676772656761746f72206e6f7420617474657374656400000000000000000060448201526064015b60405180910390fd5b610444846105d5565b61044d8161060d565b50505050565b6001600160a01b03861660009081526001602052604090205460ff168061047957600080fd5b81156105495760006104af8888868860405160200161049b9493929190611125565b6040516020818303038152906040526106c7565b905060006104bd8288610702565b9050886001600160a01b0316816001600160a01b0316146105465760405162461bcd60e51b815260206004820152602c60248201527f63616c63756c61746564206164647265737320616e642061747465737465724960448201527f4420646f6e74206d6174636800000000000000000000000000000000000000006064820152608401610432565b50505b6001600160a01b03861660009081526001602081815260408320805460ff19168317905560028054928301815590925284516105ac927f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90920191860190610bca565b5050505050505050565b3360009081526020819052604090206105d0908383610c4e565b505050565b8035600090815260056020526040902081906105f18282611181565b50506004546040820135111561060a5760408101356004555b50565b600061061982806111d8565b9050905060005b818110156105d0576006546001600160a01b0316639730886d61064385806111d8565b8481811061065357610653611222565b90506020028101906106659190611238565b60016040518363ffffffff1660e01b81526004016106849291906112f1565b600060405180830381600087803b15801561069e57600080fd5b505af11580156106b2573d6000803e3d6000fd5b50505050806106c0906113be565b9050610620565b60006106d38251610726565b826040516020016106e59291906113d9565b604051602081830303815290604052805190602001209050919050565b60008060006107118585610860565b9150915061071e816108d0565b509392505050565b60608161076657505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115610790578061077a816113be565b91506107899050600a8361144a565b915061076a565b60008167ffffffffffffffff8111156107ab576107ab610df8565b6040519080825280601f01601f1916602001820160405280156107d5576020820181803683370190505b5090505b8415610858576107ea60018361145e565b91506107f7600a86611475565b610802906030611489565b60f81b81838151811061081757610817611222565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350610851600a8661144a565b94506107d9565b949350505050565b6000808251604114156108975760208301516040840151606085015160001a61088b87828585610a8b565b945094505050506108c9565b8251604014156108c157602083015160408401516108b6868383610b78565b9350935050506108c9565b506000905060025b9250929050565b60008160048111156108e4576108e46114a1565b14156108ed5750565b6001816004811115610901576109016114a1565b141561094f5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610432565b6002816004811115610963576109636114a1565b14156109b15760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610432565b60038160048111156109c5576109c56114a1565b1415610a1e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610432565b6004816004811115610a3257610a326114a1565b141561060a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610432565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610ac25750600090506003610b6f565b8460ff16601b14158015610ada57508460ff16601c14155b15610aeb5750600090506004610b6f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610b3f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b6857600060019250925050610b6f565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831681610bae60ff86901c601b611489565b9050610bbc87828885610a8b565b935093505050935093915050565b828054610bd6906110ea565b90600052602060002090601f016020900481019282610bf85760008555610c3e565b82601f10610c1157805160ff1916838001178555610c3e565b82800160010185558215610c3e579182015b82811115610c3e578251825591602001919060010190610c23565b50610c4a929150610cc2565b5090565b828054610c5a906110ea565b90600052602060002090601f016020900481019282610c7c5760008555610c3e565b82601f10610c955782800160ff19823516178555610c3e565b82800160010185558215610c3e579182015b82811115610c3e578235825591602001919060010190610ca7565b5b80821115610c4a5760008155600101610cc3565b60005b83811015610cf2578181015183820152602001610cda565b8381111561044d5750506000910152565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015610d7057878503603f1901845281518051808752610d51818989018a8501610cd7565b601f01601f191695909501860194509285019290850190600101610d2a565b5092979650505050505050565b6001600160a01b038116811461060a57600080fd5b600060208284031215610da457600080fd5b8135610daf81610d7d565b9392505050565b60008083601f840112610dc857600080fd5b50813567ffffffffffffffff811115610de057600080fd5b6020830191508360208285010111156108c957600080fd5b634e487b7160e01b600052604160045260246000fd5b600082601f830112610e1f57600080fd5b813567ffffffffffffffff80821115610e3a57610e3a610df8565b604051601f8301601f19908116603f01168101908282118183101715610e6257610e62610df8565b81604052838152866020858801011115610e7b57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060808789031215610eb457600080fd5b8635610ebf81610d7d565b9550602087013567ffffffffffffffff80821115610edc57600080fd5b610ee88a838b01610db6565b90975095506040890135915080821115610f0157600080fd5b610f0d8a838b01610e0e565b94506060890135915080821115610f2357600080fd5b50610f3089828a01610db6565b979a9699509497509295939492505050565b600060208284031215610f5457600080fd5b5035919050565b60008060008084860360a0811215610f7257600080fd5b6060811215610f8057600080fd5b50849350606085013567ffffffffffffffff80821115610f9f57600080fd5b610fab88838901610db6565b90955093506080870135915080821115610fc457600080fd5b50850160208188031215610fd757600080fd5b939692955090935050565b60008060008060008060c08789031215610ffb57600080fd5b863561100681610d7d565b9550602087013561101681610d7d565b9450604087013567ffffffffffffffff8082111561103357600080fd5b61103f8a838b01610e0e565b9550606089013591508082111561105557600080fd5b6110618a838b01610e0e565b9450608089013591508082111561107757600080fd5b5061108489828a01610e0e565b92505060a0870135801515811461109a57600080fd5b809150509295509295509295565b600080602083850312156110bb57600080fd5b823567ffffffffffffffff8111156110d257600080fd5b6110de85828601610db6565b90969095509350505050565b600181811c908216806110fe57607f821691505b6020821081141561111f57634e487b7160e01b600052602260045260246000fd5b50919050565b60006bffffffffffffffffffffffff19808760601b168352808660601b16601484015250835161115c816028850160208801610cd7565b835190830190611173816028840160208801610cd7565b016028019695505050505050565b8135815560018101602083013561119781610d7d565b6001600160a01b0381167fffffffffffffffffffffffff00000000000000000000000000000000000000008354161782555050604082013560028201555050565b6000808335601e198436030181126111ef57600080fd5b83018035915067ffffffffffffffff82111561120a57600080fd5b6020019150600581901b36038213156108c957600080fd5b634e487b7160e01b600052603260045260246000fd5b6000823560be1983360301811261124e57600080fd5b9190910192915050565b803563ffffffff8116811461126c57600080fd5b919050565b6000808335601e1984360301811261128857600080fd5b830160208101925035905067ffffffffffffffff8111156112a857600080fd5b8036038313156108c957600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff8116811461126c57600080fd5b604081526000833561130281610d7d565b6001600160a01b03166040830152602084013567ffffffffffffffff811680821461132c57600080fd5b60608401525061133e60408501611258565b63ffffffff16608083015261135560608501611258565b63ffffffff1660a083015261136d6080850185611271565b60c080850152611382610100850182846112b7565b91505061139160a086016112e0565b60ff1660e084015260209092019290925292915050565b634e487b7160e01b600052601160045260246000fd5b60006000198214156113d2576113d26113a8565b5060010190565b7f19457468657265756d205369676e6564204d6573736167653a0a00000000000081526000835161141181601a850160208801610cd7565b83519083019061142881601a840160208801610cd7565b01601a01949350505050565b634e487b7160e01b600052601260045260246000fd5b60008261145957611459611434565b500490565b600082821015611470576114706113a8565b500390565b60008261148457611484611434565b500690565b6000821982111561149c5761149c6113a8565b500190565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220ebb5984de7c4f9d730ed0ba5cd008fbe0c4de0db6b9a6bcf972fc7009a467c0764736f6c63430008090033608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6110618061007e6000396000f3fe60806040526004361061009a5760003560e01c80638da5cb5b1161006957806399a3ad211161004e57806399a3ad211461022f578063b1454caa1461024f578063f2fde38b1461028857610112565b80638da5cb5b146101e75780639730886d1461020f57610112565b80630fcfbd111461015a57806333a88c721461018d578063346633fb146101bd578063715018a6146101d257610112565b366101125760405162461bcd60e51b815260206004820152602c60248201527f74686520576f726d686f6c6520636f6e747261637420646f6573206e6f74206160448201527f636365707420617373657473000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f727465640000000000000000000000000000000000000000006044820152606401610109565b34801561016657600080fd5b5061017a610175366004610997565b6102a8565b6040519081526020015b60405180910390f35b34801561019957600080fd5b506101ad6101a8366004610997565b61035e565b6040519015158152602001610184565b6101d06101cb3660046109e1565b6103b1565b005b3480156101de57600080fd5b506101d061047d565b3480156101f357600080fd5b506000546040516001600160a01b039091168152602001610184565b34801561021b57600080fd5b506101d061022a366004610a0d565b6104e3565b34801561023b57600080fd5b506101d061024a3660046109e1565b610687565b34801561025b57600080fd5b5061026f61026a366004610a83565b610789565b60405167ffffffffffffffff9091168152602001610184565b34801561029457600080fd5b506101d06102a3366004610b30565b6107e2565b600080826040516020016102bc9190610b8c565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103575760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d697474656460448201527f2e000000000000000000000000000000000000000000000000000000000000006064820152608401610109565b9392505050565b600080826040516020016103729190610b8c565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906103a95750428111155b949350505050565b6000341180156103c057508034145b6104325760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e67204574686572000000000000000000000000000000006064820152608401610109565b604080513381526001600160a01b0384166020820152348183015290517ff1365f826a788d6c1a955db0eed5ba8642674219c4771f8c65918617511a15609181900360600190a15050565b6000546001600160a01b031633146104d75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6104e160006108c4565b565b6000546001600160a01b0316331461053d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b60006105498242610c8c565b905060008360405160200161055e9190610b8c565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156105f95760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f21000000000000000000000000000000000000000000000000000000000000006064820152608401610109565b600081815260016020908152604082208490556002919061061c90870187610b30565b6001600160a01b0316815260208101919091526040016000908120906106486080870160608801610ca4565b63ffffffff1681526020808201929092526040016000908120805460018101825590825291902085916004020161067f8282610e81565b505050505050565b6000546001600160a01b031633146106e15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461072e576040519150601f19603f3d011682016040523d82523d6000602084013e610733565b606091505b50509050806107845760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610109565b505050565b600061079433610921565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef775937338288888888886040516107d19796959493929190610f9f565b60405180910390a195945050505050565b6000546001600160a01b0316331461083c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6001600160a01b0381166108b85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610109565b6108c1816108c4565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff1691600191906109548385610fff565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600060c0828403121561099157600080fd5b50919050565b6000602082840312156109a957600080fd5b813567ffffffffffffffff8111156109c057600080fd5b6103a98482850161097f565b6001600160a01b03811681146108c157600080fd5b600080604083850312156109f457600080fd5b82356109ff816109cc565b946020939093013593505050565b60008060408385031215610a2057600080fd5b823567ffffffffffffffff811115610a3757600080fd5b610a438582860161097f565b95602094909401359450505050565b63ffffffff811681146108c157600080fd5b60ff811681146108c157600080fd5b8035610a7e81610a64565b919050565b600080600080600060808688031215610a9b57600080fd5b8535610aa681610a52565b94506020860135610ab681610a52565b9350604086013567ffffffffffffffff80821115610ad357600080fd5b818801915088601f830112610ae757600080fd5b813581811115610af657600080fd5b896020828501011115610b0857600080fd5b6020830195508094505050506060860135610b2281610a64565b809150509295509295909350565b600060208284031215610b4257600080fd5b8135610357816109cc565b67ffffffffffffffff811681146108c157600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260008235610b9d816109cc565b6001600160a01b0381166020840152506020830135610bbb81610b4d565b67ffffffffffffffff808216604085015260408501359150610bdc82610a52565b63ffffffff808316606086015260608601359250610bf983610a52565b80831660808601525060808501359150601e19853603018212610c1b57600080fd5b90840190813581811115610c2e57600080fd5b803603861315610c3d57600080fd5b60c060a0860152610c5560e086018260208601610b63565b92505050610c6560a08501610a73565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610c9f57610c9f610c76565b500190565b600060208284031215610cb657600080fd5b813561035781610a52565b60008135610cce81610a52565b92915050565b6000808335601e19843603018112610ceb57600080fd5b83018035915067ffffffffffffffff821115610d0657600080fd5b602001915036819003821315610d1b57600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610d4c57607f821691505b6020821081141561099157634e487b7160e01b600052602260045260246000fd5b601f82111561078457600081815260208120601f850160051c81016020861015610d945750805b601f850160051c820191505b8181101561067f57828155600101610da0565b67ffffffffffffffff831115610dcb57610dcb610d22565b610ddf83610dd98354610d38565b83610d6d565b6000601f841160018114610e135760008515610dfb5750838201355b600019600387901b1c1916600186901b178355610e6d565b600083815260209020601f19861690835b82811015610e445786850135825560209485019460019092019101610e24565b5086821015610e615760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60008135610cce81610a64565b8135610e8c816109cc565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff1982161783556020840135610ec481610b4d565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff0000000000000000000000000000000000000000000000000000000081848285161717855560408601359250610f2283610a52565b921760e09190911b909116178155610f5a610f3f60608401610cc1565b6001830163ffffffff821663ffffffff198254161781555050565b610f676080830183610cd4565b610f75818360028601610db3565b5050610f9b610f8660a08401610e74565b6003830160ff821660ff198254161781555050565b5050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c06080830152610fe860c083018587610b63565b905060ff831660a083015298975050505050505050565b600067ffffffffffffffff80831681851680830382111561102257611022610c76565b0194935050505056fea264697066735822122063109a6cdc9bbd5b431dfdf74254f19660b33a9cf39810db7a8fd6169622f75364736f6c63430008090033", + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"messageBusAddress\",\"type\":\"address\"}],\"name\":\"LogManagementContractCreated\",\"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\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"AggregatorID\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"r\",\"type\":\"tuple\"},{\"internalType\":\"string\",\"name\":\"_rollupData\",\"type\":\"string\"},{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage[]\",\"name\":\"messages\",\"type\":\"tuple[]\"}],\"internalType\":\"structStructs.HeaderCrossChainData\",\"name\":\"crossChainData\",\"type\":\"tuple\"}],\"name\":\"AddRollup\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"Attested\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GetHostAddresses\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rollupHash\",\"type\":\"bytes32\"}],\"name\":\"GetRollupByHash\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"AggregatorID\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_aggregatorID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_initSecret\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_hostAddress\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_genesisAttestation\",\"type\":\"string\"}],\"name\":\"InitializeNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"IsWithdrawalAvailable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"requestReport\",\"type\":\"string\"}],\"name\":\"RequestNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attesterID\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"requesterID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"attesterSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"responseSecret\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"hostAddress\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"verifyAttester\",\"type\":\"bool\"}],\"name\":\"RespondNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RetrieveAllBridgeFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBatchSeqNo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageBus\",\"outputs\":[{\"internalType\":\"contractIMessageBus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6080604052600060055534801561001557600080fd5b5061001f3361009f565b60405161002b906100ef565b604051809103906000f080158015610047573d6000803e3d6000fd5b50600780546001600160a01b0319166001600160a01b039290921691821790556040519081527fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf9060200160405180910390a16100fc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611217806118bb83390190565b6117b08061010b6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063a52f433c11610066578063a52f433c1461026b578063bbd79e151461027b578063e34fbfc81461028e578063f2fde38b146102a157600080fd5b80638da5cb5b146102205780638fa0d05314610245578063a1a227fa1461025857600080fd5b806359a90071116100c857806359a9007114610160578063715018a614610175578063728109961461017d5780638236a7ba1461018557600080fd5b8063324ff866146100ef57806343348b2f1461010d578063440c953b14610149575b600080fd5b6100f76102b4565b6040516101049190610fd1565b60405180910390f35b61013961011b366004611060565b6001600160a01b031660009081526002602052604090205460ff1690565b6040519015158152602001610104565b61015260055481565b604051908152602001610104565b61017361016e366004611169565b61038d565b005b610173610417565b610173610482565b6101ed610193366004611210565b6040805160608082018352600080835260208084018290529284018190528481526006835283902083519182018452805480835260018201546001600160a01b031693830193909352600201549281019290925290911491565b60408051921515835281516020808501919091528201516001600160a01b03168382015201516060820152608001610104565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610104565b610173610253366004611229565b610554565b60075461022d906001600160a01b031681565b600454610100900460ff16610139565b6101736102893660046112b0565b6105e3565b61017361029c366004611376565b610748565b6101736102af366004611060565b610767565b60606003805480602002602001604051908101604052809291908181526020016000905b828210156103845783829060005260206000200180546102f7906113b8565b80601f0160208091040260200160405190810160405280929190818152602001828054610323906113b8565b80156103705780601f1061034557610100808354040283529160200191610370565b820191906000526020600020905b81548152906001019060200180831161035357829003601f168201915b5050505050815260200190600101906102d8565b50505050905090565b60045460ff161561039d57600080fd5b60048054600160ff1991821681179092556001600160a01b03881660009081526002602090815260408220805490931684179092556003805493840181559052845161040e927fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0191860190610e98565b50505050505050565b6000546001600160a01b031633146104765760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6104806000610849565b565b6000546001600160a01b031633146104dc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161046d565b6007546040517f36d2da900000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03909116906336d2da9090602401600060405180830381600087803b15801561053a57600080fd5b505af115801561054e573d6000803e3d6000fd5b50505050565b600260006105686040870160208801611060565b6001600160a01b0316815260208101919091526040016000205460ff166105d15760405162461bcd60e51b815260206004820152601760248201527f61676772656761746f72206e6f74206174746573746564000000000000000000604482015260640161046d565b6105da846108a6565b61054e816108db565b6001600160a01b03861660009081526002602052604090205460ff168061060957600080fd5b81156106d957600061063f8888868860405160200161062b94939291906113f3565b604051602081830303815290604052610995565b9050600061064d82886109d0565b9050886001600160a01b0316816001600160a01b0316146106d65760405162461bcd60e51b815260206004820152602c60248201527f63616c63756c61746564206164647265737320616e642061747465737465724960448201527f4420646f6e74206d617463680000000000000000000000000000000000000000606482015260840161046d565b50505b6001600160a01b03861660009081526002602090815260408220805460ff19166001908117909155600380549182018155909252845161073e927fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0191860190610e98565b5050505050505050565b336000908152600160205260409020610762908383610f1c565b505050565b6000546001600160a01b031633146107c15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161046d565b6001600160a01b03811661083d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161046d565b61084681610849565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8035600090815260066020526040902081906108c2828261144f565b5050600554604082013511156108465760400135600555565b60006108e7828061149b565b9050905060005b81811015610762576007546001600160a01b0316639730886d610911858061149b565b84818110610921576109216114e5565b905060200281019061093391906114fb565b60016040518363ffffffff1660e01b81526004016109529291906115b4565b600060405180830381600087803b15801561096c57600080fd5b505af1158015610980573d6000803e3d6000fd5b505050508061098e90611681565b90506108ee565b60006109a182516109f4565b826040516020016109b392919061169c565b604051602081830303815290604052805190602001209050919050565b60008060006109df8585610b2e565b915091506109ec81610b9e565b509392505050565b606081610a3457505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115610a5e5780610a4881611681565b9150610a579050600a8361170d565b9150610a38565b60008167ffffffffffffffff811115610a7957610a796110c6565b6040519080825280601f01601f191660200182016040528015610aa3576020820181803683370190505b5090505b8415610b2657610ab8600183611721565b9150610ac5600a86611738565b610ad090603061174c565b60f81b818381518110610ae557610ae56114e5565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350610b1f600a8661170d565b9450610aa7565b949350505050565b600080825160411415610b655760208301516040840151606085015160001a610b5987828585610d59565b94509450505050610b97565b825160401415610b8f5760208301516040840151610b84868383610e46565b935093505050610b97565b506000905060025b9250929050565b6000816004811115610bb257610bb2611764565b1415610bbb5750565b6001816004811115610bcf57610bcf611764565b1415610c1d5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161046d565b6002816004811115610c3157610c31611764565b1415610c7f5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161046d565b6003816004811115610c9357610c93611764565b1415610cec5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161046d565b6004816004811115610d0057610d00611764565b14156108465760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161046d565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610d905750600090506003610e3d565b8460ff16601b14158015610da857508460ff16601c14155b15610db95750600090506004610e3d565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610e0d573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610e3657600060019250925050610e3d565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831681610e7c60ff86901c601b61174c565b9050610e8a87828885610d59565b935093505050935093915050565b828054610ea4906113b8565b90600052602060002090601f016020900481019282610ec65760008555610f0c565b82601f10610edf57805160ff1916838001178555610f0c565b82800160010185558215610f0c579182015b82811115610f0c578251825591602001919060010190610ef1565b50610f18929150610f90565b5090565b828054610f28906113b8565b90600052602060002090601f016020900481019282610f4a5760008555610f0c565b82601f10610f635782800160ff19823516178555610f0c565b82800160010185558215610f0c579182015b82811115610f0c578235825591602001919060010190610f75565b5b80821115610f185760008155600101610f91565b60005b83811015610fc0578181015183820152602001610fa8565b8381111561054e5750506000910152565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561103e57878503603f190184528151805180875261101f818989018a8501610fa5565b601f01601f191695909501860194509285019290850190600101610ff8565b5092979650505050505050565b6001600160a01b038116811461084657600080fd5b60006020828403121561107257600080fd5b813561107d8161104b565b9392505050565b60008083601f84011261109657600080fd5b50813567ffffffffffffffff8111156110ae57600080fd5b602083019150836020828501011115610b9757600080fd5b634e487b7160e01b600052604160045260246000fd5b600082601f8301126110ed57600080fd5b813567ffffffffffffffff80821115611108576111086110c6565b604051601f8301601f19908116603f01168101908282118183101715611130576111306110c6565b8160405283815286602085880101111561114957600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000806000806080878903121561118257600080fd5b863561118d8161104b565b9550602087013567ffffffffffffffff808211156111aa57600080fd5b6111b68a838b01611084565b909750955060408901359150808211156111cf57600080fd5b6111db8a838b016110dc565b945060608901359150808211156111f157600080fd5b506111fe89828a01611084565b979a9699509497509295939492505050565b60006020828403121561122257600080fd5b5035919050565b60008060008084860360a081121561124057600080fd5b606081121561124e57600080fd5b50849350606085013567ffffffffffffffff8082111561126d57600080fd5b61127988838901611084565b9095509350608087013591508082111561129257600080fd5b508501602081880312156112a557600080fd5b939692955090935050565b60008060008060008060c087890312156112c957600080fd5b86356112d48161104b565b955060208701356112e48161104b565b9450604087013567ffffffffffffffff8082111561130157600080fd5b61130d8a838b016110dc565b9550606089013591508082111561132357600080fd5b61132f8a838b016110dc565b9450608089013591508082111561134557600080fd5b5061135289828a016110dc565b92505060a0870135801515811461136857600080fd5b809150509295509295509295565b6000806020838503121561138957600080fd5b823567ffffffffffffffff8111156113a057600080fd5b6113ac85828601611084565b90969095509350505050565b600181811c908216806113cc57607f821691505b602082108114156113ed57634e487b7160e01b600052602260045260246000fd5b50919050565b60006bffffffffffffffffffffffff19808760601b168352808660601b16601484015250835161142a816028850160208801610fa5565b835190830190611441816028840160208801610fa5565b016028019695505050505050565b813581556001810160208301356114658161104b565b6001600160a01b03811673ffffffffffffffffffffffffffffffffffffffff198354161782555050604082013560028201555050565b6000808335601e198436030181126114b257600080fd5b83018035915067ffffffffffffffff8211156114cd57600080fd5b6020019150600581901b3603821315610b9757600080fd5b634e487b7160e01b600052603260045260246000fd5b6000823560be1983360301811261151157600080fd5b9190910192915050565b803563ffffffff8116811461152f57600080fd5b919050565b6000808335601e1984360301811261154b57600080fd5b830160208101925035905067ffffffffffffffff81111561156b57600080fd5b803603831315610b9757600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff8116811461152f57600080fd5b60408152600083356115c58161104b565b6001600160a01b03166040830152602084013567ffffffffffffffff81168082146115ef57600080fd5b6060840152506116016040850161151b565b63ffffffff1660808301526116186060850161151b565b63ffffffff1660a08301526116306080850185611534565b60c0808501526116456101008501828461157a565b91505061165460a086016115a3565b60ff1660e084015260209092019290925292915050565b634e487b7160e01b600052601160045260246000fd5b60006000198214156116955761169561166b565b5060010190565b7f19457468657265756d205369676e6564204d6573736167653a0a0000000000008152600083516116d481601a850160208801610fa5565b8351908301906116eb81601a840160208801610fa5565b01601a01949350505050565b634e487b7160e01b600052601260045260246000fd5b60008261171c5761171c6116f7565b500490565b6000828210156117335761173361166b565b500390565b600082611747576117476116f7565b500690565b6000821982111561175f5761175f61166b565b500190565b634e487b7160e01b600052602160045260246000fdfea264697066735822122038a4ddddd39f92112fe4d4d8dc34396f1f905ca3dcae2220a147367f95a8c02064736f6c63430008090033608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6111998061007e6000396000f3fe6080604052600436106100b55760003560e01c80638da5cb5b1161006957806399a3ad211161004e57806399a3ad211461026a578063b1454caa1461028a578063f2fde38b146102c35761012d565b80638da5cb5b146102225780639730886d1461024a5761012d565b8063346633fb1161009a578063346633fb146101d857806336d2da90146101ed578063715018a61461020d5761012d565b80630fcfbd111461017557806333a88c72146101a85761012d565b3661012d5760405162461bcd60e51b815260206004820152602c60248201527f74686520576f726d686f6c6520636f6e747261637420646f6573206e6f74206160448201527f636365707420617373657473000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f727465640000000000000000000000000000000000000000006044820152606401610124565b34801561018157600080fd5b50610195610190366004610ad3565b6102e3565b6040519081526020015b60405180910390f35b3480156101b457600080fd5b506101c86101c3366004610ad3565b610399565b604051901515815260200161019f565b6101eb6101e6366004610b1d565b6103ec565b005b3480156101f957600080fd5b506101eb610208366004610b49565b6104b8565b34801561021957600080fd5b506101eb6105b9565b34801561022e57600080fd5b506000546040516001600160a01b03909116815260200161019f565b34801561025657600080fd5b506101eb610265366004610b66565b61061f565b34801561027657600080fd5b506101eb610285366004610b1d565b6107c3565b34801561029657600080fd5b506102aa6102a5366004610bdc565b6108c5565b60405167ffffffffffffffff909116815260200161019f565b3480156102cf57600080fd5b506101eb6102de366004610b49565b61091e565b600080826040516020016102f79190610cc8565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103925760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d697474656460448201527f2e000000000000000000000000000000000000000000000000000000000000006064820152608401610124565b9392505050565b600080826040516020016103ad9190610cc8565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906103e45750428111155b949350505050565b6000341180156103fb57508034145b61046d5760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e67204574686572000000000000000000000000000000006064820152608401610124565b604080513381526001600160a01b0384166020820152348183015290517ff1365f826a788d6c1a955db0eed5ba8642674219c4771f8c65918617511a15609181900360600190a15050565b6000546001600160a01b031633146105125760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610124565b6000816001600160a01b03164760405160006040518083038185875af1925050503d806000811461055f576040519150601f19603f3d011682016040523d82523d6000602084013e610564565b606091505b50509050806105b55760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610124565b5050565b6000546001600160a01b031633146106135760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610124565b61061d6000610a00565b565b6000546001600160a01b031633146106795760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610124565b60006106858242610dc8565b905060008360405160200161069a9190610cc8565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156107355760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f21000000000000000000000000000000000000000000000000000000000000006064820152608401610124565b600081815260016020908152604082208490556002919061075890870187610b49565b6001600160a01b0316815260208101919091526040016000908120906107846080870160608801610de0565b63ffffffff168152602080820192909252604001600090812080546001810182559082529190208591600402016107bb8282610fbd565b505050505050565b6000546001600160a01b0316331461081d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610124565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461086a576040519150601f19603f3d011682016040523d82523d6000602084013e61086f565b606091505b50509050806108c05760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610124565b505050565b60006108d033610a5d565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef7759373382888888888860405161090d97969594939291906110d7565b60405180910390a195945050505050565b6000546001600160a01b031633146109785760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610124565b6001600160a01b0381166109f45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610124565b6109fd81610a00565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff169160019190610a908385611137565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600060c08284031215610acd57600080fd5b50919050565b600060208284031215610ae557600080fd5b813567ffffffffffffffff811115610afc57600080fd5b6103e484828501610abb565b6001600160a01b03811681146109fd57600080fd5b60008060408385031215610b3057600080fd5b8235610b3b81610b08565b946020939093013593505050565b600060208284031215610b5b57600080fd5b813561039281610b08565b60008060408385031215610b7957600080fd5b823567ffffffffffffffff811115610b9057600080fd5b610b9c85828601610abb565b95602094909401359450505050565b63ffffffff811681146109fd57600080fd5b60ff811681146109fd57600080fd5b8035610bd781610bbd565b919050565b600080600080600060808688031215610bf457600080fd5b8535610bff81610bab565b94506020860135610c0f81610bab565b9350604086013567ffffffffffffffff80821115610c2c57600080fd5b818801915088601f830112610c4057600080fd5b813581811115610c4f57600080fd5b896020828501011115610c6157600080fd5b6020830195508094505050506060860135610c7b81610bbd565b809150509295509295909350565b67ffffffffffffffff811681146109fd57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260008235610cd981610b08565b6001600160a01b0381166020840152506020830135610cf781610c89565b67ffffffffffffffff808216604085015260408501359150610d1882610bab565b63ffffffff808316606086015260608601359250610d3583610bab565b80831660808601525060808501359150601e19853603018212610d5757600080fd5b90840190813581811115610d6a57600080fd5b803603861315610d7957600080fd5b60c060a0860152610d9160e086018260208601610c9f565b92505050610da160a08501610bcc565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610ddb57610ddb610db2565b500190565b600060208284031215610df257600080fd5b813561039281610bab565b60008135610e0a81610bab565b92915050565b6000808335601e19843603018112610e2757600080fd5b83018035915067ffffffffffffffff821115610e4257600080fd5b602001915036819003821315610e5757600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610e8857607f821691505b60208210811415610acd57634e487b7160e01b600052602260045260246000fd5b601f8211156108c057600081815260208120601f850160051c81016020861015610ed05750805b601f850160051c820191505b818110156107bb57828155600101610edc565b67ffffffffffffffff831115610f0757610f07610e5e565b610f1b83610f158354610e74565b83610ea9565b6000601f841160018114610f4f5760008515610f375750838201355b600019600387901b1c1916600186901b178355610fa9565b600083815260209020601f19861690835b82811015610f805786850135825560209485019460019092019101610f60565b5086821015610f9d5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60008135610e0a81610bbd565b8135610fc881610b08565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff198216178355602084013561100081610c89565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff000000000000000000000000000000000000000000000000000000008184828516171785556040860135925061105e83610bab565b921760e09190911b90911617815561109661107b60608401610dfd565b6001830163ffffffff821663ffffffff198254161781555050565b6110a36080830183610e10565b6110b1818360028601610eef565b50506105b56110c260a08401610fb0565b6003830160ff821660ff198254161781555050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c0608083015261112060c083018587610c9f565b905060ff831660a083015298975050505050505050565b600067ffffffffffffffff80831681851680830382111561115a5761115a610db2565b0194935050505056fea26469706673582212204868f18db57f2e292dc3fdf06859212bc2d7ea36d25fe06123502512a3035fcd64736f6c63430008090033", } // ManagementContractABI is the input ABI used to generate the binding from. @@ -411,6 +411,37 @@ func (_ManagementContract *ManagementContractCallerSession) MessageBus() (common return _ManagementContract.Contract.MessageBus(&_ManagementContract.CallOpts) } +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ManagementContract *ManagementContractCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ManagementContract.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ManagementContract *ManagementContractSession) Owner() (common.Address, error) { + return _ManagementContract.Contract.Owner(&_ManagementContract.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ManagementContract *ManagementContractCallerSession) Owner() (common.Address, error) { + return _ManagementContract.Contract.Owner(&_ManagementContract.CallOpts) +} + // AddRollup is a paid mutator transaction binding the contract method 0x8fa0d053. // // Solidity: function AddRollup((bytes32,address,uint256) r, string _rollupData, ((address,uint64,uint32,uint32,bytes,uint8)[]) crossChainData) returns() @@ -495,6 +526,69 @@ func (_ManagementContract *ManagementContractTransactorSession) RespondNetworkSe return _ManagementContract.Contract.RespondNetworkSecret(&_ManagementContract.TransactOpts, attesterID, requesterID, attesterSig, responseSecret, hostAddress, verifyAttester) } +// RetrieveAllBridgeFunds is a paid mutator transaction binding the contract method 0x72810996. +// +// Solidity: function RetrieveAllBridgeFunds() returns() +func (_ManagementContract *ManagementContractTransactor) RetrieveAllBridgeFunds(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ManagementContract.contract.Transact(opts, "RetrieveAllBridgeFunds") +} + +// RetrieveAllBridgeFunds is a paid mutator transaction binding the contract method 0x72810996. +// +// Solidity: function RetrieveAllBridgeFunds() returns() +func (_ManagementContract *ManagementContractSession) RetrieveAllBridgeFunds() (*types.Transaction, error) { + return _ManagementContract.Contract.RetrieveAllBridgeFunds(&_ManagementContract.TransactOpts) +} + +// RetrieveAllBridgeFunds is a paid mutator transaction binding the contract method 0x72810996. +// +// Solidity: function RetrieveAllBridgeFunds() returns() +func (_ManagementContract *ManagementContractTransactorSession) RetrieveAllBridgeFunds() (*types.Transaction, error) { + return _ManagementContract.Contract.RetrieveAllBridgeFunds(&_ManagementContract.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ManagementContract *ManagementContractTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ManagementContract.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ManagementContract *ManagementContractSession) RenounceOwnership() (*types.Transaction, error) { + return _ManagementContract.Contract.RenounceOwnership(&_ManagementContract.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ManagementContract *ManagementContractTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _ManagementContract.Contract.RenounceOwnership(&_ManagementContract.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ManagementContract *ManagementContractTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _ManagementContract.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ManagementContract *ManagementContractSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ManagementContract.Contract.TransferOwnership(&_ManagementContract.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ManagementContract *ManagementContractTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ManagementContract.Contract.TransferOwnership(&_ManagementContract.TransactOpts, newOwner) +} + // ManagementContractLogManagementContractCreatedIterator is returned from FilterLogManagementContractCreated and is used to iterate over the raw logs and unpacked data for LogManagementContractCreated events raised by the ManagementContract contract. type ManagementContractLogManagementContractCreatedIterator struct { Event *ManagementContractLogManagementContractCreated // Event containing the contract specifics and raw log @@ -628,3 +722,156 @@ func (_ManagementContract *ManagementContractFilterer) ParseLogManagementContrac event.Raw = log return event, nil } + +// ManagementContractOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the ManagementContract contract. +type ManagementContractOwnershipTransferredIterator struct { + Event *ManagementContractOwnershipTransferred // 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 *ManagementContractOwnershipTransferredIterator) 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(ManagementContractOwnershipTransferred) + 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(ManagementContractOwnershipTransferred) + 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 *ManagementContractOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ManagementContractOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ManagementContractOwnershipTransferred represents a OwnershipTransferred event raised by the ManagementContract contract. +type ManagementContractOwnershipTransferred 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 (_ManagementContract *ManagementContractFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ManagementContractOwnershipTransferredIterator, 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 := _ManagementContract.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &ManagementContractOwnershipTransferredIterator{contract: _ManagementContract.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 (_ManagementContract *ManagementContractFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ManagementContractOwnershipTransferred, 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 := _ManagementContract.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(ManagementContractOwnershipTransferred) + if err := _ManagementContract.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 (_ManagementContract *ManagementContractFilterer) ParseOwnershipTransferred(log types.Log) (*ManagementContractOwnershipTransferred, error) { + event := new(ManagementContractOwnershipTransferred) + if err := _ManagementContract.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contracts/generated/MessageBus/MessageBus.go b/contracts/generated/MessageBus/MessageBus.go index 3e21d47a4e..3a60a7e03a 100644 --- a/contracts/generated/MessageBus/MessageBus.go +++ b/contracts/generated/MessageBus/MessageBus.go @@ -41,8 +41,8 @@ type StructsCrossChainMessage struct { // MessageBusMetaData contains all meta data concerning the MessageBus contract. var MessageBusMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"name\":\"LogMessagePublished\",\"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\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ValueTransfer\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage\",\"name\":\"crossChainMessage\",\"type\":\"tuple\"}],\"name\":\"getMessageTimeOfFinality\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"name\":\"publishMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"receiveValueFromL2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"sendValueToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage\",\"name\":\"crossChainMessage\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"finalAfterTimestamp\",\"type\":\"uint256\"}],\"name\":\"storeCrossChainMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage\",\"name\":\"crossChainMessage\",\"type\":\"tuple\"}],\"name\":\"verifyMessageFinalized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6110618061007e6000396000f3fe60806040526004361061009a5760003560e01c80638da5cb5b1161006957806399a3ad211161004e57806399a3ad211461022f578063b1454caa1461024f578063f2fde38b1461028857610112565b80638da5cb5b146101e75780639730886d1461020f57610112565b80630fcfbd111461015a57806333a88c721461018d578063346633fb146101bd578063715018a6146101d257610112565b366101125760405162461bcd60e51b815260206004820152602c60248201527f74686520576f726d686f6c6520636f6e747261637420646f6573206e6f74206160448201527f636365707420617373657473000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f727465640000000000000000000000000000000000000000006044820152606401610109565b34801561016657600080fd5b5061017a610175366004610997565b6102a8565b6040519081526020015b60405180910390f35b34801561019957600080fd5b506101ad6101a8366004610997565b61035e565b6040519015158152602001610184565b6101d06101cb3660046109e1565b6103b1565b005b3480156101de57600080fd5b506101d061047d565b3480156101f357600080fd5b506000546040516001600160a01b039091168152602001610184565b34801561021b57600080fd5b506101d061022a366004610a0d565b6104e3565b34801561023b57600080fd5b506101d061024a3660046109e1565b610687565b34801561025b57600080fd5b5061026f61026a366004610a83565b610789565b60405167ffffffffffffffff9091168152602001610184565b34801561029457600080fd5b506101d06102a3366004610b30565b6107e2565b600080826040516020016102bc9190610b8c565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103575760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d697474656460448201527f2e000000000000000000000000000000000000000000000000000000000000006064820152608401610109565b9392505050565b600080826040516020016103729190610b8c565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906103a95750428111155b949350505050565b6000341180156103c057508034145b6104325760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e67204574686572000000000000000000000000000000006064820152608401610109565b604080513381526001600160a01b0384166020820152348183015290517ff1365f826a788d6c1a955db0eed5ba8642674219c4771f8c65918617511a15609181900360600190a15050565b6000546001600160a01b031633146104d75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6104e160006108c4565b565b6000546001600160a01b0316331461053d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b60006105498242610c8c565b905060008360405160200161055e9190610b8c565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156105f95760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f21000000000000000000000000000000000000000000000000000000000000006064820152608401610109565b600081815260016020908152604082208490556002919061061c90870187610b30565b6001600160a01b0316815260208101919091526040016000908120906106486080870160608801610ca4565b63ffffffff1681526020808201929092526040016000908120805460018101825590825291902085916004020161067f8282610e81565b505050505050565b6000546001600160a01b031633146106e15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461072e576040519150601f19603f3d011682016040523d82523d6000602084013e610733565b606091505b50509050806107845760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610109565b505050565b600061079433610921565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef775937338288888888886040516107d19796959493929190610f9f565b60405180910390a195945050505050565b6000546001600160a01b0316331461083c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610109565b6001600160a01b0381166108b85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610109565b6108c1816108c4565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff1691600191906109548385610fff565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600060c0828403121561099157600080fd5b50919050565b6000602082840312156109a957600080fd5b813567ffffffffffffffff8111156109c057600080fd5b6103a98482850161097f565b6001600160a01b03811681146108c157600080fd5b600080604083850312156109f457600080fd5b82356109ff816109cc565b946020939093013593505050565b60008060408385031215610a2057600080fd5b823567ffffffffffffffff811115610a3757600080fd5b610a438582860161097f565b95602094909401359450505050565b63ffffffff811681146108c157600080fd5b60ff811681146108c157600080fd5b8035610a7e81610a64565b919050565b600080600080600060808688031215610a9b57600080fd5b8535610aa681610a52565b94506020860135610ab681610a52565b9350604086013567ffffffffffffffff80821115610ad357600080fd5b818801915088601f830112610ae757600080fd5b813581811115610af657600080fd5b896020828501011115610b0857600080fd5b6020830195508094505050506060860135610b2281610a64565b809150509295509295909350565b600060208284031215610b4257600080fd5b8135610357816109cc565b67ffffffffffffffff811681146108c157600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260008235610b9d816109cc565b6001600160a01b0381166020840152506020830135610bbb81610b4d565b67ffffffffffffffff808216604085015260408501359150610bdc82610a52565b63ffffffff808316606086015260608601359250610bf983610a52565b80831660808601525060808501359150601e19853603018212610c1b57600080fd5b90840190813581811115610c2e57600080fd5b803603861315610c3d57600080fd5b60c060a0860152610c5560e086018260208601610b63565b92505050610c6560a08501610a73565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610c9f57610c9f610c76565b500190565b600060208284031215610cb657600080fd5b813561035781610a52565b60008135610cce81610a52565b92915050565b6000808335601e19843603018112610ceb57600080fd5b83018035915067ffffffffffffffff821115610d0657600080fd5b602001915036819003821315610d1b57600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610d4c57607f821691505b6020821081141561099157634e487b7160e01b600052602260045260246000fd5b601f82111561078457600081815260208120601f850160051c81016020861015610d945750805b601f850160051c820191505b8181101561067f57828155600101610da0565b67ffffffffffffffff831115610dcb57610dcb610d22565b610ddf83610dd98354610d38565b83610d6d565b6000601f841160018114610e135760008515610dfb5750838201355b600019600387901b1c1916600186901b178355610e6d565b600083815260209020601f19861690835b82811015610e445786850135825560209485019460019092019101610e24565b5086821015610e615760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60008135610cce81610a64565b8135610e8c816109cc565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff1982161783556020840135610ec481610b4d565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff0000000000000000000000000000000000000000000000000000000081848285161717855560408601359250610f2283610a52565b921760e09190911b909116178155610f5a610f3f60608401610cc1565b6001830163ffffffff821663ffffffff198254161781555050565b610f676080830183610cd4565b610f75818360028601610db3565b5050610f9b610f8660a08401610e74565b6003830160ff821660ff198254161781555050565b5050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c06080830152610fe860c083018587610b63565b905060ff831660a083015298975050505050505050565b600067ffffffffffffffff80831681851680830382111561102257611022610c76565b0194935050505056fea264697066735822122063109a6cdc9bbd5b431dfdf74254f19660b33a9cf39810db7a8fd6169622f75364736f6c63430008090033", + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"name\":\"LogMessagePublished\",\"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\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ValueTransfer\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage\",\"name\":\"crossChainMessage\",\"type\":\"tuple\"}],\"name\":\"getMessageTimeOfFinality\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"name\":\"publishMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"receiveValueFromL2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"retrieveAllFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"sendValueToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage\",\"name\":\"crossChainMessage\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"finalAfterTimestamp\",\"type\":\"uint256\"}],\"name\":\"storeCrossChainMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage\",\"name\":\"crossChainMessage\",\"type\":\"tuple\"}],\"name\":\"verifyMessageFinalized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6111998061007e6000396000f3fe6080604052600436106100b55760003560e01c80638da5cb5b1161006957806399a3ad211161004e57806399a3ad211461026a578063b1454caa1461028a578063f2fde38b146102c35761012d565b80638da5cb5b146102225780639730886d1461024a5761012d565b8063346633fb1161009a578063346633fb146101d857806336d2da90146101ed578063715018a61461020d5761012d565b80630fcfbd111461017557806333a88c72146101a85761012d565b3661012d5760405162461bcd60e51b815260206004820152602c60248201527f74686520576f726d686f6c6520636f6e747261637420646f6573206e6f74206160448201527f636365707420617373657473000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f727465640000000000000000000000000000000000000000006044820152606401610124565b34801561018157600080fd5b50610195610190366004610ad3565b6102e3565b6040519081526020015b60405180910390f35b3480156101b457600080fd5b506101c86101c3366004610ad3565b610399565b604051901515815260200161019f565b6101eb6101e6366004610b1d565b6103ec565b005b3480156101f957600080fd5b506101eb610208366004610b49565b6104b8565b34801561021957600080fd5b506101eb6105b9565b34801561022e57600080fd5b506000546040516001600160a01b03909116815260200161019f565b34801561025657600080fd5b506101eb610265366004610b66565b61061f565b34801561027657600080fd5b506101eb610285366004610b1d565b6107c3565b34801561029657600080fd5b506102aa6102a5366004610bdc565b6108c5565b60405167ffffffffffffffff909116815260200161019f565b3480156102cf57600080fd5b506101eb6102de366004610b49565b61091e565b600080826040516020016102f79190610cc8565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103925760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d697474656460448201527f2e000000000000000000000000000000000000000000000000000000000000006064820152608401610124565b9392505050565b600080826040516020016103ad9190610cc8565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906103e45750428111155b949350505050565b6000341180156103fb57508034145b61046d5760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e67204574686572000000000000000000000000000000006064820152608401610124565b604080513381526001600160a01b0384166020820152348183015290517ff1365f826a788d6c1a955db0eed5ba8642674219c4771f8c65918617511a15609181900360600190a15050565b6000546001600160a01b031633146105125760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610124565b6000816001600160a01b03164760405160006040518083038185875af1925050503d806000811461055f576040519150601f19603f3d011682016040523d82523d6000602084013e610564565b606091505b50509050806105b55760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610124565b5050565b6000546001600160a01b031633146106135760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610124565b61061d6000610a00565b565b6000546001600160a01b031633146106795760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610124565b60006106858242610dc8565b905060008360405160200161069a9190610cc8565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156107355760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f21000000000000000000000000000000000000000000000000000000000000006064820152608401610124565b600081815260016020908152604082208490556002919061075890870187610b49565b6001600160a01b0316815260208101919091526040016000908120906107846080870160608801610de0565b63ffffffff168152602080820192909252604001600090812080546001810182559082529190208591600402016107bb8282610fbd565b505050505050565b6000546001600160a01b0316331461081d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610124565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461086a576040519150601f19603f3d011682016040523d82523d6000602084013e61086f565b606091505b50509050806108c05760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610124565b505050565b60006108d033610a5d565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef7759373382888888888860405161090d97969594939291906110d7565b60405180910390a195945050505050565b6000546001600160a01b031633146109785760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610124565b6001600160a01b0381166109f45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610124565b6109fd81610a00565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff169160019190610a908385611137565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600060c08284031215610acd57600080fd5b50919050565b600060208284031215610ae557600080fd5b813567ffffffffffffffff811115610afc57600080fd5b6103e484828501610abb565b6001600160a01b03811681146109fd57600080fd5b60008060408385031215610b3057600080fd5b8235610b3b81610b08565b946020939093013593505050565b600060208284031215610b5b57600080fd5b813561039281610b08565b60008060408385031215610b7957600080fd5b823567ffffffffffffffff811115610b9057600080fd5b610b9c85828601610abb565b95602094909401359450505050565b63ffffffff811681146109fd57600080fd5b60ff811681146109fd57600080fd5b8035610bd781610bbd565b919050565b600080600080600060808688031215610bf457600080fd5b8535610bff81610bab565b94506020860135610c0f81610bab565b9350604086013567ffffffffffffffff80821115610c2c57600080fd5b818801915088601f830112610c4057600080fd5b813581811115610c4f57600080fd5b896020828501011115610c6157600080fd5b6020830195508094505050506060860135610c7b81610bbd565b809150509295509295909350565b67ffffffffffffffff811681146109fd57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260008235610cd981610b08565b6001600160a01b0381166020840152506020830135610cf781610c89565b67ffffffffffffffff808216604085015260408501359150610d1882610bab565b63ffffffff808316606086015260608601359250610d3583610bab565b80831660808601525060808501359150601e19853603018212610d5757600080fd5b90840190813581811115610d6a57600080fd5b803603861315610d7957600080fd5b60c060a0860152610d9160e086018260208601610c9f565b92505050610da160a08501610bcc565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610ddb57610ddb610db2565b500190565b600060208284031215610df257600080fd5b813561039281610bab565b60008135610e0a81610bab565b92915050565b6000808335601e19843603018112610e2757600080fd5b83018035915067ffffffffffffffff821115610e4257600080fd5b602001915036819003821315610e5757600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610e8857607f821691505b60208210811415610acd57634e487b7160e01b600052602260045260246000fd5b601f8211156108c057600081815260208120601f850160051c81016020861015610ed05750805b601f850160051c820191505b818110156107bb57828155600101610edc565b67ffffffffffffffff831115610f0757610f07610e5e565b610f1b83610f158354610e74565b83610ea9565b6000601f841160018114610f4f5760008515610f375750838201355b600019600387901b1c1916600186901b178355610fa9565b600083815260209020601f19861690835b82811015610f805786850135825560209485019460019092019101610f60565b5086821015610f9d5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60008135610e0a81610bbd565b8135610fc881610b08565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff198216178355602084013561100081610c89565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff000000000000000000000000000000000000000000000000000000008184828516171785556040860135925061105e83610bab565b921760e09190911b90911617815561109661107b60608401610dfd565b6001830163ffffffff821663ffffffff198254161781555050565b6110a36080830183610e10565b6110b1818360028601610eef565b50506105b56110c260a08401610fb0565b6003830160ff821660ff198254161781555050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c0608083015261112060c083018587610c9f565b905060ff831660a083015298975050505050505050565b600067ffffffffffffffff80831681851680830382111561115a5761115a610db2565b0194935050505056fea26469706673582212204868f18db57f2e292dc3fdf06859212bc2d7ea36d25fe06123502512a3035fcd64736f6c63430008090033", } // MessageBusABI is the input ABI used to generate the binding from. @@ -368,6 +368,27 @@ func (_MessageBus *MessageBusTransactorSession) RenounceOwnership() (*types.Tran return _MessageBus.Contract.RenounceOwnership(&_MessageBus.TransactOpts) } +// RetrieveAllFunds is a paid mutator transaction binding the contract method 0x36d2da90. +// +// Solidity: function retrieveAllFunds(address receiver) returns() +func (_MessageBus *MessageBusTransactor) RetrieveAllFunds(opts *bind.TransactOpts, receiver common.Address) (*types.Transaction, error) { + return _MessageBus.contract.Transact(opts, "retrieveAllFunds", receiver) +} + +// RetrieveAllFunds is a paid mutator transaction binding the contract method 0x36d2da90. +// +// Solidity: function retrieveAllFunds(address receiver) returns() +func (_MessageBus *MessageBusSession) RetrieveAllFunds(receiver common.Address) (*types.Transaction, error) { + return _MessageBus.Contract.RetrieveAllFunds(&_MessageBus.TransactOpts, receiver) +} + +// RetrieveAllFunds is a paid mutator transaction binding the contract method 0x36d2da90. +// +// Solidity: function retrieveAllFunds(address receiver) returns() +func (_MessageBus *MessageBusTransactorSession) RetrieveAllFunds(receiver common.Address) (*types.Transaction, error) { + return _MessageBus.Contract.RetrieveAllFunds(&_MessageBus.TransactOpts, receiver) +} + // SendValueToL2 is a paid mutator transaction binding the contract method 0x346633fb. // // Solidity: function sendValueToL2(address receiver, uint256 amount) payable returns() diff --git a/contracts/generated/ObsERC20/ObsERC20.go b/contracts/generated/ObsERC20/ObsERC20.go index c12d5386a5..d8d057cf98 100644 --- a/contracts/generated/ObsERC20/ObsERC20.go +++ b/contracts/generated/ObsERC20/ObsERC20.go @@ -32,7 +32,7 @@ var ( // ObsERC20MetaData contains all meta data concerning the ObsERC20 contract. var ObsERC20MetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"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\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b5060405162000da838038062000da88339810160408190526200005a9162000207565b8151829082906200007390600390602085019062000094565b5080516200008990600490602084019062000094565b5050505050620002ae565b828054620000a29062000271565b90600052602060002090601f016020900481019282620000c6576000855562000111565b82601f10620000e157805160ff191683800117855562000111565b8280016001018555821562000111579182015b8281111562000111578251825591602001919060010190620000f4565b506200011f92915062000123565b5090565b5b808211156200011f576000815560010162000124565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200016257600080fd5b81516001600160401b03808211156200017f576200017f6200013a565b604051601f8301601f19908116603f01168101908282118183101715620001aa57620001aa6200013a565b81604052838152602092508683858801011115620001c757600080fd5b600091505b83821015620001eb5785820183015181830184015290820190620001cc565b83821115620001fd5760008385830101525b9695505050505050565b600080604083850312156200021b57600080fd5b82516001600160401b03808211156200023357600080fd5b620002418683870162000150565b935060208501519150808211156200025857600080fd5b50620002678582860162000150565b9150509250929050565b600181811c908216806200028657607f821691505b60208210811415620002a857634e487b7160e01b600052602260045260246000fd5b50919050565b610aea80620002be6000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80633950935111610081578063a457c2d71161005b578063a457c2d714610171578063a9059cbb14610184578063dd62ed3e1461019757600080fd5b8063395093511461014357806370a082311461015657806395d89b411461016957600080fd5b806318160ddd116100b257806318160ddd1461010f57806323b872dd14610121578063313ce5671461013457600080fd5b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d66101aa565b6040516100e39190610927565b60405180910390f35b6100ff6100fa366004610998565b61023c565b60405190151581526020016100e3565b6002545b6040519081526020016100e3565b6100ff61012f3660046109c2565b610256565b604051601281526020016100e3565b6100ff610151366004610998565b61027a565b6101136101643660046109fe565b6102b9565b6100d6610366565b6100ff61017f366004610998565b610375565b6100ff610192366004610998565b61041f565b6101136101a5366004610a20565b61042d565b6060600380546101b990610a53565b80601f01602080910402602001604051908101604052809291908181526020018280546101e590610a53565b80156102325780601f1061020757610100808354040283529160200191610232565b820191906000526020600020905b81548152906001019060200180831161021557829003601f168201915b5050505050905090565b60003361024a81858561053e565b60019150505b92915050565b600033610264858285610696565b61026f858585610710565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061024a90829086906102b4908790610a8e565b61053e565b6000326001600160a01b03831614156102ea576001600160a01b038216600090815260208190526040902054610250565b336001600160a01b0383161415610319576001600160a01b038216600090815260208190526040902054610250565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e63650060448201526064015b60405180910390fd5b6060600480546101b990610a53565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156104125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f000000000000000000000000000000000000000000000000000000606482015260840161035d565b61026f828686840361053e565b60003361024a818585610710565b6000326001600160a01b038416148061044e5750326001600160a01b038316145b15610481576001600160a01b038084166000908152600160209081526040808320938616835292905220545b9050610250565b336001600160a01b03841614806104a05750336001600160a01b038316145b156104d0576001600160a01b0380841660009081526001602090815260408083209386168352929052205461047a565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f6500000000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0383166105b95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0382166106355760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006106a2848461042d565b9050600019811461070a57818110156106fd5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161035d565b61070a848484840361053e565b50505050565b6001600160a01b03831661078c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0382166108085760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b038316600090815260208190526040902054818110156108975760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906108ce908490610a8e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161091a91815260200190565b60405180910390a361070a565b600060208083528351808285015260005b8181101561095457858101830151858201604001528201610938565b81811115610966576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461099357600080fd5b919050565b600080604083850312156109ab57600080fd5b6109b48361097c565b946020939093013593505050565b6000806000606084860312156109d757600080fd5b6109e08461097c565b92506109ee6020850161097c565b9150604084013590509250925092565b600060208284031215610a1057600080fd5b610a198261097c565b9392505050565b60008060408385031215610a3357600080fd5b610a3c8361097c565b9150610a4a6020840161097c565b90509250929050565b600181811c90821680610a6757607f821691505b60208210811415610a8857634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115610aaf57634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220f6355dc25e10a7a88f5076ae4378073f41fca54f570f8ebea7ef5d68bcd1d47b64736f6c63430008090033", + Bin: "0x6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b5060405162000da838038062000da88339810160408190526200005a9162000207565b8151829082906200007390600390602085019062000094565b5080516200008990600490602084019062000094565b5050505050620002ae565b828054620000a29062000271565b90600052602060002090601f016020900481019282620000c6576000855562000111565b82601f10620000e157805160ff191683800117855562000111565b8280016001018555821562000111579182015b8281111562000111578251825591602001919060010190620000f4565b506200011f92915062000123565b5090565b5b808211156200011f576000815560010162000124565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200016257600080fd5b81516001600160401b03808211156200017f576200017f6200013a565b604051601f8301601f19908116603f01168101908282118183101715620001aa57620001aa6200013a565b81604052838152602092508683858801011115620001c757600080fd5b600091505b83821015620001eb5785820183015181830184015290820190620001cc565b83821115620001fd5760008385830101525b9695505050505050565b600080604083850312156200021b57600080fd5b82516001600160401b03808211156200023357600080fd5b620002418683870162000150565b935060208501519150808211156200025857600080fd5b50620002678582860162000150565b9150509250929050565b600181811c908216806200028657607f821691505b60208210811415620002a857634e487b7160e01b600052602260045260246000fd5b50919050565b610aea80620002be6000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80633950935111610081578063a457c2d71161005b578063a457c2d714610171578063a9059cbb14610184578063dd62ed3e1461019757600080fd5b8063395093511461014357806370a082311461015657806395d89b411461016957600080fd5b806318160ddd116100b257806318160ddd1461010f57806323b872dd14610121578063313ce5671461013457600080fd5b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d66101aa565b6040516100e39190610927565b60405180910390f35b6100ff6100fa366004610998565b61023c565b60405190151581526020016100e3565b6002545b6040519081526020016100e3565b6100ff61012f3660046109c2565b610256565b604051601281526020016100e3565b6100ff610151366004610998565b61027a565b6101136101643660046109fe565b6102b9565b6100d6610366565b6100ff61017f366004610998565b610375565b6100ff610192366004610998565b61041f565b6101136101a5366004610a20565b61042d565b6060600380546101b990610a53565b80601f01602080910402602001604051908101604052809291908181526020018280546101e590610a53565b80156102325780601f1061020757610100808354040283529160200191610232565b820191906000526020600020905b81548152906001019060200180831161021557829003601f168201915b5050505050905090565b60003361024a81858561053e565b60019150505b92915050565b600033610264858285610696565b61026f858585610710565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061024a90829086906102b4908790610a8e565b61053e565b6000326001600160a01b03831614156102ea576001600160a01b038216600090815260208190526040902054610250565b336001600160a01b0383161415610319576001600160a01b038216600090815260208190526040902054610250565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e63650060448201526064015b60405180910390fd5b6060600480546101b990610a53565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156104125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f000000000000000000000000000000000000000000000000000000606482015260840161035d565b61026f828686840361053e565b60003361024a818585610710565b6000326001600160a01b038416148061044e5750326001600160a01b038316145b15610481576001600160a01b038084166000908152600160209081526040808320938616835292905220545b9050610250565b336001600160a01b03841614806104a05750336001600160a01b038316145b156104d0576001600160a01b0380841660009081526001602090815260408083209386168352929052205461047a565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f6500000000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0383166105b95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0382166106355760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006106a2848461042d565b9050600019811461070a57818110156106fd5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161035d565b61070a848484840361053e565b50505050565b6001600160a01b03831661078c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b0382166108085760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b038316600090815260208190526040902054818110156108975760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161035d565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906108ce908490610a8e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161091a91815260200190565b60405180910390a361070a565b600060208083528351808285015260005b8181101561095457858101830151858201604001528201610938565b81811115610966576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461099357600080fd5b919050565b600080604083850312156109ab57600080fd5b6109b48361097c565b946020939093013593505050565b6000806000606084860312156109d757600080fd5b6109e08461097c565b92506109ee6020850161097c565b9150604084013590509250925092565b600060208284031215610a1057600080fd5b610a198261097c565b9392505050565b60008060408385031215610a3357600080fd5b610a3c8361097c565b9150610a4a6020840161097c565b90509250929050565b600181811c90821680610a6757607f821691505b60208210811415610a8857634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115610aaf57634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220b7e862b33f5871c5f4b68a7ca11e31c10471fae77a607bce0a1253addcb15e0764736f6c63430008090033", } // ObsERC20ABI is the input ABI used to generate the binding from. diff --git a/contracts/generated/ObscuroBridge/ObscuroBridge.go b/contracts/generated/ObscuroBridge/ObscuroBridge.go index d292b65a17..5ff4b0c468 100644 --- a/contracts/generated/ObscuroBridge/ObscuroBridge.go +++ b/contracts/generated/ObscuroBridge/ObscuroBridge.go @@ -32,7 +32,7 @@ var ( // ObscuroBridgeMetaData contains all meta data concerning the ObscuroBridge contract. var ObscuroBridgeMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"messenger\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ERC20_TOKEN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NATIVE_TOKEN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"promoteToAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"receiveAssets\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"removeToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"sendERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"sendNative\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridge\",\"type\":\"address\"}],\"name\":\"setRemoteBridge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"name\":\"whitelistToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162001c3838038062001c388339810160408190526200004491620001fc565b600080546001600160a01b0319166001600160a01b038316908117909155604080516350d113fd60e11b8152905183929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d69190620001fc565b600180546001600160a01b0319166001600160a01b039290921691909117905550620001237fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217753362000157565b620001507fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad2110578600062000157565b506200022e565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16620001f85760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001b73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000602082840312156200020f57600080fd5b81516001600160a01b03811681146200022757600080fd5b9392505050565b6119fa806200023e6000396000f3fe60806040526004361061010e5760003560e01c80635fa7b584116100a557806393b3744211610074578063a381c8e211610059578063a381c8e21461033e578063d547741f1461035e578063e4c3ebc71461037e57600080fd5b806393b3744214610309578063a217fddf1461032957600080fd5b80635fa7b5841461024f57806375b238fc1461026f57806383bece4d146102a357806391d14854146102c357600080fd5b80632f2ff15d116100e15780632f2ff15d146101bb57806336568abe146101db578063498d82ab146101fb5780635d8729701461021b57600080fd5b806301ffc9a71461011357806316ce8149146101485780631888d7121461016a578063248a9ca31461017d575b600080fd5b34801561011f57600080fd5b5061013361012e3660046114fc565b6103b2565b60405190151581526020015b60405180910390f35b34801561015457600080fd5b5061016861016336600461153e565b61041b565b005b61016861017836600461153e565b610481565b34801561018957600080fd5b506101ad61019836600461155b565b60009081526002602052604090206001015490565b60405190815260200161013f565b3480156101c757600080fd5b506101686101d6366004611574565b6105ba565b3480156101e757600080fd5b506101686101f6366004611574565b6105e5565b34801561020757600080fd5b506101686102163660046115ed565b610671565b34801561022757600080fd5b506101ad7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a81565b34801561025b57600080fd5b5061016861026a36600461153e565b610736565b34801561027b57600080fd5b506101ad7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102af57600080fd5b506101686102be366004611670565b61078b565b3480156102cf57600080fd5b506101336102de366004611574565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561031557600080fd5b5061016861032436600461153e565b6109ad565b34801561033557600080fd5b506101ad600081565b34801561034a57600080fd5b50610168610359366004611670565b610a02565b34801561036a57600080fd5b50610168610379366004611574565b610baf565b34801561038a57600080fd5b506101ad7fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad211057881565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061041557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104468133610bd5565b50600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600034116104d65760405162461bcd60e51b815260206004820152600f60248201527f456d707479207472616e736665722e000000000000000000000000000000000060448201526064015b60405180910390fd5b604080518082018252348082526001600160a01b03848116602093840190815284519384019290925290518116828401528251808303840181526060909201909252600354909161052e91168260025b600080610c55565b6001546001600160a01b03166040517f346633fb0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152346024830181905292169163346633fb916044016000604051808303818588803b15801561059d57600080fd5b505af11580156105b1573d6000803e3d6000fd5b50505050505050565b6000828152600260205260409020600101546105d68133610bd5565b6105e08383610d70565b505050565b6001600160a01b03811633146106635760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016104cd565b61066d8282610e12565b5050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561069c8133610bd5565b6106c67f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a87610d70565b600063458ffd6360e01b87878787876040516024016106e99594939291906116db565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526003549091506105b1906001600160a01b0316826001610526565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107618133610bd5565b61066d7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a83610e12565b6003546000546001600160a01b03918216911633146108125760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e676572210000000000000000000000000000000060648201526084016104cd565b806001600160a01b0316610824610e95565b6001600160a01b0316146108a05760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e6465722100000000000000000000000000000060648201526084016104cd565b6001600160a01b03841660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16156108f0576108eb848484610f21565b6109a7565b6001600160a01b03841660009081527f13ad2d85210d477fe1a6e25654c8250308cf29b050a4bf0b039d70467486712c602052604090205460ff1615610939576108eb82610f2c565b60405162461bcd60e51b815260206004820152602560248201527f417474656d7074696e6720746f20776974686472617720756e6b6e6f776e206160448201527f737365742e00000000000000000000000000000000000000000000000000000060648201526084016104cd565b50505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756109d88133610bd5565b61066d7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610d70565b60008211610a525760405162461bcd60e51b815260206004820152601a60248201527f417474656d7074696e6720656d707479207472616e736665722e00000000000060448201526064016104cd565b6001600160a01b03831660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16610b255760405162461bcd60e51b815260206004820152604e60248201527f54686973206164647265737320686173206e6f74206265656e20676976656e2060448201527f61207479706520616e64206973207468757320636f6e73696465726564206e6f60648201527f742077686974656c69737465642e000000000000000000000000000000000000608482015260a4016104cd565b610b3183333085610fca565b604080516001600160a01b038581166024830152604482018590528381166064808401919091528351808403909101815260849092019092526020810180516001600160e01b03167f83bece4d0000000000000000000000000000000000000000000000000000000017905260035490916109a79116826000610526565b600082815260026020526040902060010154610bcb8133610bd5565b6105e08383610e12565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661066d57610c13816001600160a01b0316601461104e565b610c1e83602061104e565b604051602001610c2f929190611749565b60408051601f198184030181529082905262461bcd60e51b82526104cd916004016117f6565b60006040518060600160405280876001600160a01b0316815260200186815260200184815250604051602001610c8b9190611809565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff16906014610cde83611864565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b8152600401610d1e9493929190611888565b602060405180830381600087803b158015610d3857600080fd5b505af1158015610d4c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b191906118c5565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661066d5760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610dce3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff161561066d5760008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b158015610ee457600080fd5b505afa158015610ef8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1c91906118ef565b905090565b6105e0838284611236565b6040516000906001600160a01b038316908281818181865af19150503d8060008114610f74576040519150601f19603f3d011682016040523d82523d6000602084013e610f79565b606091505b505090508061066d5760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064016104cd565b6040516001600160a01b03808516602483015283166044820152606481018290526109a79085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261127f565b6060600061105d83600261190c565b61106890600261192b565b67ffffffffffffffff81111561108057611080611943565b6040519080825280601f01601f1916602001820160405280156110aa576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106110e1576110e1611959565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061112c5761112c611959565b60200101906001600160f81b031916908160001a905350600061115084600261190c565b61115b90600161192b565b90505b60018111156111e0577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061119c5761119c611959565b1a60f81b8282815181106111b2576111b2611959565b60200101906001600160f81b031916908160001a90535060049490941c936111d98161196f565b905061115e565b50831561122f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104cd565b9392505050565b6040516001600160a01b0383166024820152604481018290526105e09084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611017565b60006112d4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113649092919063ffffffff16565b8051909150156105e057808060200190518101906112f29190611986565b6105e05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104cd565b6060611373848460008561137b565b949350505050565b6060824710156113f35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104cd565b6001600160a01b0385163b61144a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104cd565b600080866001600160a01b0316858760405161146691906119a8565b60006040518083038185875af1925050503d80600081146114a3576040519150601f19603f3d011682016040523d82523d6000602084013e6114a8565b606091505b50915091506114b88282866114c3565b979650505050505050565b606083156114d257508161122f565b8251156114e25782518084602001fd5b8160405162461bcd60e51b81526004016104cd91906117f6565b60006020828403121561150e57600080fd5b81356001600160e01b03198116811461122f57600080fd5b6001600160a01b038116811461153b57600080fd5b50565b60006020828403121561155057600080fd5b813561122f81611526565b60006020828403121561156d57600080fd5b5035919050565b6000806040838503121561158757600080fd5b82359150602083013561159981611526565b809150509250929050565b60008083601f8401126115b657600080fd5b50813567ffffffffffffffff8111156115ce57600080fd5b6020830191508360208285010111156115e657600080fd5b9250929050565b60008060008060006060868803121561160557600080fd5b853561161081611526565b9450602086013567ffffffffffffffff8082111561162d57600080fd5b61163989838a016115a4565b9096509450604088013591508082111561165257600080fd5b5061165f888289016115a4565b969995985093965092949392505050565b60008060006060848603121561168557600080fd5b833561169081611526565b92506020840135915060408401356116a781611526565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b03861681526060602082015260006116fe6060830186886116b2565b82810360408401526117118185876116b2565b98975050505050505050565b60005b83811015611738578181015183820152602001611720565b838111156109a75750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161178181601785016020880161171d565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516117be81602884016020880161171d565b01602801949350505050565b600081518084526117e281602086016020860161171d565b601f01601f19169290920160200192915050565b60208152600061122f60208301846117ca565b602081526001600160a01b038251166020820152600060208301516060604084015261183860808401826117ca565b9050604084015160608401528091505092915050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff8083168181141561187e5761187e61184e565b6001019392505050565b600063ffffffff8087168352808616602084015250608060408301526118b160808301856117ca565b905060ff8316606083015295945050505050565b6000602082840312156118d757600080fd5b815167ffffffffffffffff8116811461122f57600080fd5b60006020828403121561190157600080fd5b815161122f81611526565b60008160001904831182151516156119265761192661184e565b500290565b6000821982111561193e5761193e61184e565b500190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008161197e5761197e61184e565b506000190190565b60006020828403121561199857600080fd5b8151801515811461122f57600080fd5b600082516119ba81846020870161171d565b919091019291505056fea26469706673582212206391571edec7bdbf99c2274c97a0cf208d149bda11b9144eb6f7eeff314c453264736f6c63430008090033", + Bin: "0x60806040526001805463ffffffff60a01b191690553480156200002157600080fd5b5060405162001c3838038062001c388339810160408190526200004491620001fc565b600080546001600160a01b0319166001600160a01b038316908117909155604080516350d113fd60e11b8152905183929163a1a227fa916004808301926020929190829003018186803b1580156200009b57600080fd5b505afa158015620000b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d69190620001fc565b600180546001600160a01b0319166001600160a01b039290921691909117905550620001237fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217753362000157565b620001507fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad2110578600062000157565b506200022e565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16620001f85760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001b73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000602082840312156200020f57600080fd5b81516001600160a01b03811681146200022757600080fd5b9392505050565b6119fa806200023e6000396000f3fe60806040526004361061010e5760003560e01c80635fa7b584116100a557806393b3744211610074578063a381c8e211610059578063a381c8e21461033e578063d547741f1461035e578063e4c3ebc71461037e57600080fd5b806393b3744214610309578063a217fddf1461032957600080fd5b80635fa7b5841461024f57806375b238fc1461026f57806383bece4d146102a357806391d14854146102c357600080fd5b80632f2ff15d116100e15780632f2ff15d146101bb57806336568abe146101db578063498d82ab146101fb5780635d8729701461021b57600080fd5b806301ffc9a71461011357806316ce8149146101485780631888d7121461016a578063248a9ca31461017d575b600080fd5b34801561011f57600080fd5b5061013361012e3660046114fc565b6103b2565b60405190151581526020015b60405180910390f35b34801561015457600080fd5b5061016861016336600461153e565b61041b565b005b61016861017836600461153e565b610481565b34801561018957600080fd5b506101ad61019836600461155b565b60009081526002602052604090206001015490565b60405190815260200161013f565b3480156101c757600080fd5b506101686101d6366004611574565b6105ba565b3480156101e757600080fd5b506101686101f6366004611574565b6105e5565b34801561020757600080fd5b506101686102163660046115ed565b610671565b34801561022757600080fd5b506101ad7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a81565b34801561025b57600080fd5b5061016861026a36600461153e565b610736565b34801561027b57600080fd5b506101ad7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102af57600080fd5b506101686102be366004611670565b61078b565b3480156102cf57600080fd5b506101336102de366004611574565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561031557600080fd5b5061016861032436600461153e565b6109ad565b34801561033557600080fd5b506101ad600081565b34801561034a57600080fd5b50610168610359366004611670565b610a02565b34801561036a57600080fd5b50610168610379366004611574565b610baf565b34801561038a57600080fd5b506101ad7fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad211057881565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061041557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104468133610bd5565b50600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600034116104d65760405162461bcd60e51b815260206004820152600f60248201527f456d707479207472616e736665722e000000000000000000000000000000000060448201526064015b60405180910390fd5b604080518082018252348082526001600160a01b03848116602093840190815284519384019290925290518116828401528251808303840181526060909201909252600354909161052e91168260025b600080610c55565b6001546001600160a01b03166040517f346633fb0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152346024830181905292169163346633fb916044016000604051808303818588803b15801561059d57600080fd5b505af11580156105b1573d6000803e3d6000fd5b50505050505050565b6000828152600260205260409020600101546105d68133610bd5565b6105e08383610d70565b505050565b6001600160a01b03811633146106635760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016104cd565b61066d8282610e12565b5050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561069c8133610bd5565b6106c67f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a87610d70565b600063458ffd6360e01b87878787876040516024016106e99594939291906116db565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526003549091506105b1906001600160a01b0316826001610526565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107618133610bd5565b61066d7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a83610e12565b6003546000546001600160a01b03918216911633146108125760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e676572210000000000000000000000000000000060648201526084016104cd565b806001600160a01b0316610824610e95565b6001600160a01b0316146108a05760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e6465722100000000000000000000000000000060648201526084016104cd565b6001600160a01b03841660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16156108f0576108eb848484610f21565b6109a7565b6001600160a01b03841660009081527f13ad2d85210d477fe1a6e25654c8250308cf29b050a4bf0b039d70467486712c602052604090205460ff1615610939576108eb82610f2c565b60405162461bcd60e51b815260206004820152602560248201527f417474656d7074696e6720746f20776974686472617720756e6b6e6f776e206160448201527f737365742e00000000000000000000000000000000000000000000000000000060648201526084016104cd565b50505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756109d88133610bd5565b61066d7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610d70565b60008211610a525760405162461bcd60e51b815260206004820152601a60248201527f417474656d7074696e6720656d707479207472616e736665722e00000000000060448201526064016104cd565b6001600160a01b03831660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16610b255760405162461bcd60e51b815260206004820152604e60248201527f54686973206164647265737320686173206e6f74206265656e20676976656e2060448201527f61207479706520616e64206973207468757320636f6e73696465726564206e6f60648201527f742077686974656c69737465642e000000000000000000000000000000000000608482015260a4016104cd565b610b3183333085610fca565b604080516001600160a01b038581166024830152604482018590528381166064808401919091528351808403909101815260849092019092526020810180516001600160e01b03167f83bece4d0000000000000000000000000000000000000000000000000000000017905260035490916109a79116826000610526565b600082815260026020526040902060010154610bcb8133610bd5565b6105e08383610e12565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661066d57610c13816001600160a01b0316601461104e565b610c1e83602061104e565b604051602001610c2f929190611749565b60408051601f198184030181529082905262461bcd60e51b82526104cd916004016117f6565b60006040518060600160405280876001600160a01b0316815260200186815260200184815250604051602001610c8b9190611809565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff16906014610cde83611864565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b8152600401610d1e9493929190611888565b602060405180830381600087803b158015610d3857600080fd5b505af1158015610d4c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b191906118c5565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1661066d5760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610dce3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff161561066d5760008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b815260040160206040518083038186803b158015610ee457600080fd5b505afa158015610ef8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1c91906118ef565b905090565b6105e0838284611236565b6040516000906001600160a01b038316908281818181865af19150503d8060008114610f74576040519150601f19603f3d011682016040523d82523d6000602084013e610f79565b606091505b505090508061066d5760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064016104cd565b6040516001600160a01b03808516602483015283166044820152606481018290526109a79085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261127f565b6060600061105d83600261190c565b61106890600261192b565b67ffffffffffffffff81111561108057611080611943565b6040519080825280601f01601f1916602001820160405280156110aa576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106110e1576110e1611959565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061112c5761112c611959565b60200101906001600160f81b031916908160001a905350600061115084600261190c565b61115b90600161192b565b90505b60018111156111e0577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061119c5761119c611959565b1a60f81b8282815181106111b2576111b2611959565b60200101906001600160f81b031916908160001a90535060049490941c936111d98161196f565b905061115e565b50831561122f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104cd565b9392505050565b6040516001600160a01b0383166024820152604481018290526105e09084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611017565b60006112d4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113649092919063ffffffff16565b8051909150156105e057808060200190518101906112f29190611986565b6105e05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104cd565b6060611373848460008561137b565b949350505050565b6060824710156113f35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104cd565b6001600160a01b0385163b61144a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104cd565b600080866001600160a01b0316858760405161146691906119a8565b60006040518083038185875af1925050503d80600081146114a3576040519150601f19603f3d011682016040523d82523d6000602084013e6114a8565b606091505b50915091506114b88282866114c3565b979650505050505050565b606083156114d257508161122f565b8251156114e25782518084602001fd5b8160405162461bcd60e51b81526004016104cd91906117f6565b60006020828403121561150e57600080fd5b81356001600160e01b03198116811461122f57600080fd5b6001600160a01b038116811461153b57600080fd5b50565b60006020828403121561155057600080fd5b813561122f81611526565b60006020828403121561156d57600080fd5b5035919050565b6000806040838503121561158757600080fd5b82359150602083013561159981611526565b809150509250929050565b60008083601f8401126115b657600080fd5b50813567ffffffffffffffff8111156115ce57600080fd5b6020830191508360208285010111156115e657600080fd5b9250929050565b60008060008060006060868803121561160557600080fd5b853561161081611526565b9450602086013567ffffffffffffffff8082111561162d57600080fd5b61163989838a016115a4565b9096509450604088013591508082111561165257600080fd5b5061165f888289016115a4565b969995985093965092949392505050565b60008060006060848603121561168557600080fd5b833561169081611526565b92506020840135915060408401356116a781611526565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b03861681526060602082015260006116fe6060830186886116b2565b82810360408401526117118185876116b2565b98975050505050505050565b60005b83811015611738578181015183820152602001611720565b838111156109a75750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161178181601785016020880161171d565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516117be81602884016020880161171d565b01602801949350505050565b600081518084526117e281602086016020860161171d565b601f01601f19169290920160200192915050565b60208152600061122f60208301846117ca565b602081526001600160a01b038251166020820152600060208301516060604084015261183860808401826117ca565b9050604084015160608401528091505092915050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff8083168181141561187e5761187e61184e565b6001019392505050565b600063ffffffff8087168352808616602084015250608060408301526118b160808301856117ca565b905060ff8316606083015295945050505050565b6000602082840312156118d757600080fd5b815167ffffffffffffffff8116811461122f57600080fd5b60006020828403121561190157600080fd5b815161122f81611526565b60008160001904831182151516156119265761192661184e565b500290565b6000821982111561193e5761193e61184e565b500190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008161197e5761197e61184e565b506000190190565b60006020828403121561199857600080fd5b8151801515811461122f57600080fd5b600082516119ba81846020870161171d565b919091019291505056fea2646970667358221220894ec32d6644e213b6ae6c4bce90ec23ae4371dcc2b3b897983b8d8cc7f8a6db64736f6c63430008090033", } // ObscuroBridgeABI is the input ABI used to generate the binding from. diff --git a/contracts/generated/WrappedERC20/WrappedERC20.go b/contracts/generated/WrappedERC20/WrappedERC20.go index 658dbb7682..71e1dde065 100644 --- a/contracts/generated/WrappedERC20/WrappedERC20.go +++ b/contracts/generated/WrappedERC20/WrappedERC20.go @@ -32,7 +32,7 @@ var ( // WrappedERC20MetaData contains all meta data concerning the WrappedERC20 contract. var WrappedERC20MetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"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\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"giver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"issueFor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea2646970667358221220848f35fdc28f22577d7d393858f44350cbde245dc770487cf991c8a21210b53864736f6c63430008090033", + Bin: "0x6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b50604051620019d7380380620019d78339810160408190526200005a91620002e3565b8181818181600390805190602001906200007692919062000170565b5080516200008c90600490602084019062000170565b5050505050620000c37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000cb60201b60201c565b50506200038a565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166200016c5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200012b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200017e906200034d565b90600052602060002090601f016020900481019282620001a25760008555620001ed565b82601f10620001bd57805160ff1916838001178555620001ed565b82800160010185558215620001ed579182015b82811115620001ed578251825591602001919060010190620001d0565b50620001fb929150620001ff565b5090565b5b80821115620001fb576000815560010162000200565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200023e57600080fd5b81516001600160401b03808211156200025b576200025b62000216565b604051601f8301601f19908116603f0116810190828211818310171562000286576200028662000216565b81604052838152602092508683858801011115620002a357600080fd5b600091505b83821015620002c75785820183015181830184015290820190620002a8565b83821115620002d95760008385830101525b9695505050505050565b60008060408385031215620002f757600080fd5b82516001600160401b03808211156200030f57600080fd5b6200031d868387016200022c565b935060208501519150808211156200033457600080fd5b5062000343858286016200022c565b9150509250929050565b600181811c908216806200036257607f821691505b602082108114156200038457634e487b7160e01b600052602260045260246000fd5b50919050565b61163d806200039a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806339509351116100d8578063979005ad1161008c578063a9059cbb11610066578063a9059cbb1461031a578063d547741f1461032d578063dd62ed3e1461034057600080fd5b8063979005ad146102ec578063a217fddf146102ff578063a457c2d71461030757600080fd5b806375b238fc116100bd57806375b238fc1461028457806391d14854146102ab57806395d89b41146102e457600080fd5b8063395093511461025e57806370a082311461027157600080fd5b806323b872dd1161012f5780632f2ff15d116101145780632f2ff15d14610229578063313ce5671461023c57806336568abe1461024b57600080fd5b806323b872dd146101f3578063248a9ca31461020657600080fd5b8063095ea7b311610160578063095ea7b3146101b957806318160ddd146101cc5780631dd319cb146101de57600080fd5b806301ffc9a71461017c57806306fdde03146101a4575b600080fd5b61018f61018a3660046112f7565b610353565b60405190151581526020015b60405180910390f35b6101ac6103ec565b60405161019b9190611365565b61018f6101c73660046113b4565b61047e565b6002545b60405190815260200161019b565b6101f16101ec3660046113b4565b610496565b005b61018f6102013660046113de565b61052d565b6101d061021436600461141a565b60009081526007602052604090206001015490565b6101f1610237366004611433565b610551565b6040516012815260200161019b565b6101f1610259366004611433565b610577565b61018f61026c3660046113b4565b610603565b6101d061027f36600461145f565b610642565b6101d07fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61018f6102b9366004611433565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ac6106ea565b6101f16102fa3660046113b4565b6106f9565b6101d0600081565b61018f6103153660046113b4565b61072e565b61018f6103283660046113b4565b6107d8565b6101f161033b366004611433565b6107e6565b6101d061034e36600461147a565b61080c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806103e657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103fb906114a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610427906114a4565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60003361048c81858561091d565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104c18133610a75565b816104cb84610642565b101561051e5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6105288383610af5565b505050565b60003361053b858285610c7a565b610546858585610cf4565b506001949350505050565b60008281526007602052604090206001015461056d8133610a75565b6105288383610f0b565b6001600160a01b03811633146105f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610515565b6105ff8282610fad565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048c908290869061063d9087906114f5565b61091d565b6000326001600160a01b0383161415610673576001600160a01b0382166000908152602081905260409020546103e6565b336001600160a01b03831614156106a2576001600160a01b0382166000908152602081905260409020546103e6565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e6365006044820152606401610515565b6060600480546103fb906114a4565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756107248133610a75565b6105288383611030565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610515565b610546828686840361091d565b60003361048c818585610cf4565b6000828152600760205260409020600101546108028133610a75565b6105288383610fad565b6000326001600160a01b038416148061082d5750326001600160a01b038316145b15610860576001600160a01b038084166000908152600160209081526040808320938616835292905220545b90506103e6565b336001600160a01b038416148061087f5750336001600160a01b038316145b156108af576001600160a01b03808416600090815260016020908152604080832093861683529290522054610859565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166109985760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610a145760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff57610ab3816001600160a01b0316601461110f565b610abe83602061110f565b604051602001610acf92919061150d565b60408051601f198184030181529082905262461bcd60e51b825261051591600401611365565b6001600160a01b038216610b715760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03821660009081526020819052604090205481811015610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610c2f90849061158e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000610c86848461080c565b90506000198114610cee5781811015610ce15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610515565b610cee848484840361091d565b50505050565b6001600160a01b038316610d705760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03831660009081526020819052604090205481811015610e7b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610515565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610eb29084906114f5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610efe91815260200190565b60405180910390a3610cee565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166105ff5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610f693390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16156105ff5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166110865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610515565b806002600082825461109891906114f5565b90915550506001600160a01b038216600090815260208190526040812080548392906110c59084906114f5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6060600061111e8360026115a5565b6111299060026114f5565b67ffffffffffffffff811115611141576111416115c4565b6040519080825280601f01601f19166020018201604052801561116b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106111a2576111a26115da565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106111ed576111ed6115da565b60200101906001600160f81b031916908160001a90535060006112118460026115a5565b61121c9060016114f5565b90505b60018111156112a1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061125d5761125d6115da565b1a60f81b828281518110611273576112736115da565b60200101906001600160f81b031916908160001a90535060049490941c9361129a816115f0565b905061121f565b5083156112f05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610515565b9392505050565b60006020828403121561130957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112f057600080fd5b60005b8381101561135457818101518382015260200161133c565b83811115610cee5750506000910152565b6020815260008251806020840152611384816040850160208701611339565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113af57600080fd5b919050565b600080604083850312156113c757600080fd5b6113d083611398565b946020939093013593505050565b6000806000606084860312156113f357600080fd5b6113fc84611398565b925061140a60208501611398565b9150604084013590509250925092565b60006020828403121561142c57600080fd5b5035919050565b6000806040838503121561144657600080fd5b8235915061145660208401611398565b90509250929050565b60006020828403121561147157600080fd5b6112f082611398565b6000806040838503121561148d57600080fd5b61149683611398565b915061145660208401611398565b600181811c908216806114b857607f821691505b602082108114156114d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611508576115086114df565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611545816017850160208801611339565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611582816028840160208801611339565b01602801949350505050565b6000828210156115a0576115a06114df565b500390565b60008160001904831182151516156115bf576115bf6114df565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115ff576115ff6114df565b50600019019056fea26469706673582212201c0c3a851d2bc9f4f94393362a160e99651c656d627113abd657cce4d7d8770964736f6c63430008090033", } // WrappedERC20ABI is the input ABI used to generate the binding from. diff --git a/contracts/src/management/ManagementContract.sol b/contracts/src/management/ManagementContract.sol index 28f7ce0464..d6991263ea 100644 --- a/contracts/src/management/ManagementContract.sol +++ b/contracts/src/management/ManagementContract.sol @@ -2,11 +2,12 @@ pragma solidity >=0.7.0 <0.9.0; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; +import "@openzeppelin/contracts/access/Ownable.sol"; import "./Structs.sol"; import * as MessageBus from "../messaging/MessageBus.sol"; -contract ManagementContract { +contract ManagementContract is Ownable { event LogManagementContractCreated(address messageBusAddress); @@ -127,4 +128,9 @@ contract ManagementContract { function Attested(address _addr) view public returns (bool) { return attested[_addr]; } + + // Testnet function to allow the contract owner to retrieve **all** funds from the network bridge. + function RetrieveAllBridgeFunds() public onlyOwner { + messageBus.retrieveAllFunds(msg.sender); + } } diff --git a/contracts/src/messaging/IMessageBus.sol b/contracts/src/messaging/IMessageBus.sol index c307c33fc5..7e7bd3a941 100644 --- a/contracts/src/messaging/IMessageBus.sol +++ b/contracts/src/messaging/IMessageBus.sol @@ -63,4 +63,7 @@ interface IMessageBus { // The function will be called by the ManagementContract on L1 and the enclave on L2. // It should be access controlled and called according to the consistencyLevel and Obscuro platform rules. function storeCrossChainMessage(Structs.CrossChainMessage calldata crossChainMessage, uint256 finalAfterTimestamp) external; + + // This is a testnet function which allows the bridge owner to retrieve all funds from the message bus. + function retrieveAllFunds(address receiver) external; } diff --git a/contracts/src/messaging/MessageBus.sol b/contracts/src/messaging/MessageBus.sol index e19fb2219a..668877072f 100644 --- a/contracts/src/messaging/MessageBus.sol +++ b/contracts/src/messaging/MessageBus.sol @@ -122,6 +122,13 @@ contract MessageBus is IMessageBus, Ownable { ); } + function retrieveAllFunds( + address receiver + ) external onlyOwner { + (bool ok, ) = receiver.call{value: address(this).balance}(""); + require(ok, "failed sending value"); + } + fallback() external payable { revert("unsupported"); } diff --git a/contracts/test/bridge-test.ts b/contracts/test/bridge-test.ts index 1c323c657f..f4ff550157 100644 --- a/contracts/test/bridge-test.ts +++ b/contracts/test/bridge-test.ts @@ -308,4 +308,24 @@ describe("Bridge", function () { consistencyLevel: decodedEvent.args[5] })).to.be.revertedWith("Message not found or finalized."); }); + + it("MessageBus retrieveAllFunds method should allow owner to extract all native funds from the message bus", async function() { + const [owner] = await ethers.getSigners(); + const amount = ethers.utils.parseEther("0.01"); + + const tx = await busL1.sendValueToL2(owner.address, amount, { + value: amount + }); + await expect(tx).to.not.be.reverted; + + // check that the funds were received + await expect(await ethers.provider.getBalance(busL1.address)).to.equal(amount); + + // retrieve all native funds from the message bus contract on the L1 + const retrieveAllFundsTx = busL1.retrieveAllFunds(owner.address); + await expect(retrieveAllFundsTx).to.not.be.reverted; + + // check that the funds were drained + await expect(await ethers.provider.getBalance(busL1.address)).to.equal(0); + }); }); diff --git a/go/enclave/enclave_test.go b/go/enclave/enclave_test.go index 1d10b1273d..3b18d6dc92 100644 --- a/go/enclave/enclave_test.go +++ b/go/enclave/enclave_test.go @@ -38,7 +38,7 @@ const _testEnclavePublicKeyHex = "034d3b7e63a8bcd532ee3d1d6ecad9d67fca7821981a04 // _successfulRollupGasPrice can be deterministically calculated when evaluating the management smart contract. // It should change only when there are changes to the smart contract or if the gas estimation algorithm is modified. // Other changes would mean something is broken. -const _successfulRollupGasPrice = 336360 +const _successfulRollupGasPrice = 371816 var _enclavePubKey *ecies.PublicKey