From c7b4380bf30e62c963e7a8a21c075c5abc4b05cb Mon Sep 17 00:00:00 2001 From: Jeremy Letang Date: Tue, 13 Aug 2024 13:53:32 +0100 Subject: [PATCH 1/8] chore: rename staking bridge events Signed-off-by: Jeremy Letang --- core/evtforward/ethereum/filterer.go | 4 ++-- core/staking/staking_bridge_abi.go | 34 ++++++++++++++-------------- core/staking/staking_bridge_abi.json | 4 ++-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/core/evtforward/ethereum/filterer.go b/core/evtforward/ethereum/filterer.go index 0396bce46ca..aed7c46d53d 100644 --- a/core/evtforward/ethereum/filterer.go +++ b/core/evtforward/ethereum/filterer.go @@ -46,8 +46,8 @@ const ( eventAssetRemoved = "Asset_Removed" eventAssetDeposited = "Asset_Deposited" eventAssetWithdrawn = "Asset_Withdrawn" - eventStakeDeposited = "Stake_Deposited" - eventStakeRemoved = "Stake_Removed" + eventStakeDeposited = "StakeDeposited" + eventStakeRemoved = "StakeRemoved" eventSignerAdded = "SignerAdded" eventSignerRemoved = "SignerRemoved" eventThresholdSet = "ThresholdSet" diff --git a/core/staking/staking_bridge_abi.go b/core/staking/staking_bridge_abi.go index 9aee20804a7..6cd4e50369a 100644 --- a/core/staking/staking_bridge_abi.go +++ b/core/staking/staking_bridge_abi.go @@ -45,7 +45,7 @@ var ( // StakingMetaData contains all meta data concerning the Staking contract. var StakingMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"Stake_Deposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"Stake_Removed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"Stake_Transferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"staking_token\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"stake_balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"total_staked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"StakeDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"StakeRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"Stake_Transferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"staking_token\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"stake_balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"total_staked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", } // StakingABI is the input ABI used to generate the binding from. @@ -358,7 +358,7 @@ type StakingStakeDeposited struct { // FilterStakeDeposited is a free log retrieval operation binding the contract event 0x9e3e33edf5dcded4adabc51b1266225d00fa41516bfcad69513fa4eca69519da. // -// Solidity: event Stake_Deposited(address indexed user, uint256 amount, bytes32 indexed vega_public_key) +// Solidity: event StakeDeposited(address indexed user, uint256 amount, bytes32 indexed vega_public_key) func (_Staking *StakingFilterer) FilterStakeDeposited(opts *bind.FilterOpts, user []common.Address, vega_public_key [][32]byte) (*StakingStakeDepositedIterator, error) { var userRule []interface{} for _, userItem := range user { @@ -370,16 +370,16 @@ func (_Staking *StakingFilterer) FilterStakeDeposited(opts *bind.FilterOpts, use vega_public_keyRule = append(vega_public_keyRule, vega_public_keyItem) } - logs, sub, err := _Staking.contract.FilterLogs(opts, "Stake_Deposited", userRule, vega_public_keyRule) + logs, sub, err := _Staking.contract.FilterLogs(opts, "StakeDeposited", userRule, vega_public_keyRule) if err != nil { return nil, err } - return &StakingStakeDepositedIterator{contract: _Staking.contract, event: "Stake_Deposited", logs: logs, sub: sub}, nil + return &StakingStakeDepositedIterator{contract: _Staking.contract, event: "StakeDeposited", logs: logs, sub: sub}, nil } // WatchStakeDeposited is a free log subscription operation binding the contract event 0x9e3e33edf5dcded4adabc51b1266225d00fa41516bfcad69513fa4eca69519da. // -// Solidity: event Stake_Deposited(address indexed user, uint256 amount, bytes32 indexed vega_public_key) +// Solidity: event StakeDeposited(address indexed user, uint256 amount, bytes32 indexed vega_public_key) func (_Staking *StakingFilterer) WatchStakeDeposited(opts *bind.WatchOpts, sink chan<- *StakingStakeDeposited, user []common.Address, vega_public_key [][32]byte) (event.Subscription, error) { var userRule []interface{} for _, userItem := range user { @@ -391,7 +391,7 @@ func (_Staking *StakingFilterer) WatchStakeDeposited(opts *bind.WatchOpts, sink vega_public_keyRule = append(vega_public_keyRule, vega_public_keyItem) } - logs, sub, err := _Staking.contract.WatchLogs(opts, "Stake_Deposited", userRule, vega_public_keyRule) + logs, sub, err := _Staking.contract.WatchLogs(opts, "StakeDeposited", userRule, vega_public_keyRule) if err != nil { return nil, err } @@ -402,7 +402,7 @@ func (_Staking *StakingFilterer) WatchStakeDeposited(opts *bind.WatchOpts, sink case log := <-logs: // New log arrived, parse the event and forward to the user event := new(StakingStakeDeposited) - if err := _Staking.contract.UnpackLog(event, "Stake_Deposited", log); err != nil { + if err := _Staking.contract.UnpackLog(event, "StakeDeposited", log); err != nil { return err } event.Raw = log @@ -425,10 +425,10 @@ func (_Staking *StakingFilterer) WatchStakeDeposited(opts *bind.WatchOpts, sink // ParseStakeDeposited is a log parse operation binding the contract event 0x9e3e33edf5dcded4adabc51b1266225d00fa41516bfcad69513fa4eca69519da. // -// Solidity: event Stake_Deposited(address indexed user, uint256 amount, bytes32 indexed vega_public_key) +// Solidity: event StakeDeposited(address indexed user, uint256 amount, bytes32 indexed vega_public_key) func (_Staking *StakingFilterer) ParseStakeDeposited(log types.Log) (*StakingStakeDeposited, error) { event := new(StakingStakeDeposited) - if err := _Staking.contract.UnpackLog(event, "Stake_Deposited", log); err != nil { + if err := _Staking.contract.UnpackLog(event, "StakeDeposited", log); err != nil { return nil, err } event.Raw = log @@ -512,7 +512,7 @@ type StakingStakeRemoved struct { // FilterStakeRemoved is a free log retrieval operation binding the contract event 0xa131d16963736e4c641f27a7f82f2e350b5971e555ae06ae906892bbba0a0939. // -// Solidity: event Stake_Removed(address indexed user, uint256 amount, bytes32 indexed vega_public_key) +// Solidity: event StakeRemoved(address indexed user, uint256 amount, bytes32 indexed vega_public_key) func (_Staking *StakingFilterer) FilterStakeRemoved(opts *bind.FilterOpts, user []common.Address, vega_public_key [][32]byte) (*StakingStakeRemovedIterator, error) { var userRule []interface{} for _, userItem := range user { @@ -524,16 +524,16 @@ func (_Staking *StakingFilterer) FilterStakeRemoved(opts *bind.FilterOpts, user vega_public_keyRule = append(vega_public_keyRule, vega_public_keyItem) } - logs, sub, err := _Staking.contract.FilterLogs(opts, "Stake_Removed", userRule, vega_public_keyRule) + logs, sub, err := _Staking.contract.FilterLogs(opts, "StakeRemoved", userRule, vega_public_keyRule) if err != nil { return nil, err } - return &StakingStakeRemovedIterator{contract: _Staking.contract, event: "Stake_Removed", logs: logs, sub: sub}, nil + return &StakingStakeRemovedIterator{contract: _Staking.contract, event: "StakeRemoved", logs: logs, sub: sub}, nil } // WatchStakeRemoved is a free log subscription operation binding the contract event 0xa131d16963736e4c641f27a7f82f2e350b5971e555ae06ae906892bbba0a0939. // -// Solidity: event Stake_Removed(address indexed user, uint256 amount, bytes32 indexed vega_public_key) +// Solidity: event StakeRemoved(address indexed user, uint256 amount, bytes32 indexed vega_public_key) func (_Staking *StakingFilterer) WatchStakeRemoved(opts *bind.WatchOpts, sink chan<- *StakingStakeRemoved, user []common.Address, vega_public_key [][32]byte) (event.Subscription, error) { var userRule []interface{} for _, userItem := range user { @@ -545,7 +545,7 @@ func (_Staking *StakingFilterer) WatchStakeRemoved(opts *bind.WatchOpts, sink ch vega_public_keyRule = append(vega_public_keyRule, vega_public_keyItem) } - logs, sub, err := _Staking.contract.WatchLogs(opts, "Stake_Removed", userRule, vega_public_keyRule) + logs, sub, err := _Staking.contract.WatchLogs(opts, "StakeRemoved", userRule, vega_public_keyRule) if err != nil { return nil, err } @@ -556,7 +556,7 @@ func (_Staking *StakingFilterer) WatchStakeRemoved(opts *bind.WatchOpts, sink ch case log := <-logs: // New log arrived, parse the event and forward to the user event := new(StakingStakeRemoved) - if err := _Staking.contract.UnpackLog(event, "Stake_Removed", log); err != nil { + if err := _Staking.contract.UnpackLog(event, "StakeRemoved", log); err != nil { return err } event.Raw = log @@ -579,10 +579,10 @@ func (_Staking *StakingFilterer) WatchStakeRemoved(opts *bind.WatchOpts, sink ch // ParseStakeRemoved is a log parse operation binding the contract event 0xa131d16963736e4c641f27a7f82f2e350b5971e555ae06ae906892bbba0a0939. // -// Solidity: event Stake_Removed(address indexed user, uint256 amount, bytes32 indexed vega_public_key) +// Solidity: event StakeRemoved(address indexed user, uint256 amount, bytes32 indexed vega_public_key) func (_Staking *StakingFilterer) ParseStakeRemoved(log types.Log) (*StakingStakeRemoved, error) { event := new(StakingStakeRemoved) - if err := _Staking.contract.UnpackLog(event, "Stake_Removed", log); err != nil { + if err := _Staking.contract.UnpackLog(event, "StakeRemoved", log); err != nil { return nil, err } event.Raw = log diff --git a/core/staking/staking_bridge_abi.json b/core/staking/staking_bridge_abi.json index 0cc381f4094..71f42e73823 100644 --- a/core/staking/staking_bridge_abi.json +++ b/core/staking/staking_bridge_abi.json @@ -21,7 +21,7 @@ "type": "bytes32" } ], - "name": "Stake_Deposited", + "name": "StakeDeposited", "type": "event" }, { @@ -46,7 +46,7 @@ "type": "bytes32" } ], - "name": "Stake_Removed", + "name": "StakeRemoved", "type": "event" }, { From f4623244c347a8b94e06feca246bd00177816ac0 Mon Sep 17 00:00:00 2001 From: wwestgarth Date: Wed, 14 Aug 2024 09:19:47 +0100 Subject: [PATCH 2/8] feat: update all ABI functions --- core/staking/staking_bridge_abi.go | 110 +++++++++++++-------------- core/staking/staking_bridge_abi.json | 8 +- 2 files changed, 58 insertions(+), 60 deletions(-) diff --git a/core/staking/staking_bridge_abi.go b/core/staking/staking_bridge_abi.go index 6cd4e50369a..a68e34d8381 100644 --- a/core/staking/staking_bridge_abi.go +++ b/core/staking/staking_bridge_abi.go @@ -1,18 +1,3 @@ -// Copyright (C) 2023 Gobalsky Labs Limited -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - // Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. @@ -41,11 +26,12 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription + _ = abi.ConvertType ) // StakingMetaData contains all meta data concerning the Staking contract. var StakingMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"StakeDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"StakeRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"Stake_Transferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"staking_token\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"stake_balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"total_staked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"StakeDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"StakeRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"StakeTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"stakingToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"stakeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalStaked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", } // StakingABI is the input ABI used to generate the binding from. @@ -149,11 +135,11 @@ func NewStakingFilterer(address common.Address, filterer bind.ContractFilterer) // bindStaking binds a generic wrapper to an already deployed contract. func bindStaking(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(StakingABI)) + parsed, err := StakingMetaData.GetAbi() if err != nil { return nil, err } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and @@ -194,12 +180,13 @@ func (_Staking *StakingTransactorRaw) Transact(opts *bind.TransactOpts, method s return _Staking.Contract.contract.Transact(opts, method, params...) } -// StakeBalance is a free data retrieval call binding the contract method 0x274abf34. +// StakeBalance is a free data retrieval call binding the contract method 0xd4a5ea85. // -// Solidity: function stake_balance(address target, bytes32 vega_public_key) view returns(uint256) +// Solidity: function stakeBalance(address target, bytes32 vega_public_key) view returns(uint256) func (_Staking *StakingCaller) StakeBalance(opts *bind.CallOpts, target common.Address, vega_public_key [32]byte) (*big.Int, error) { var out []interface{} - err := _Staking.contract.Call(opts, &out, "stake_balance", target, vega_public_key) + err := _Staking.contract.Call(opts, &out, "stakeBalance", target, vega_public_key) + if err != nil { return *new(*big.Int), err } @@ -207,28 +194,30 @@ func (_Staking *StakingCaller) StakeBalance(opts *bind.CallOpts, target common.A out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err + } -// StakeBalance is a free data retrieval call binding the contract method 0x274abf34. +// StakeBalance is a free data retrieval call binding the contract method 0xd4a5ea85. // -// Solidity: function stake_balance(address target, bytes32 vega_public_key) view returns(uint256) +// Solidity: function stakeBalance(address target, bytes32 vega_public_key) view returns(uint256) func (_Staking *StakingSession) StakeBalance(target common.Address, vega_public_key [32]byte) (*big.Int, error) { return _Staking.Contract.StakeBalance(&_Staking.CallOpts, target, vega_public_key) } -// StakeBalance is a free data retrieval call binding the contract method 0x274abf34. +// StakeBalance is a free data retrieval call binding the contract method 0xd4a5ea85. // -// Solidity: function stake_balance(address target, bytes32 vega_public_key) view returns(uint256) +// Solidity: function stakeBalance(address target, bytes32 vega_public_key) view returns(uint256) func (_Staking *StakingCallerSession) StakeBalance(target common.Address, vega_public_key [32]byte) (*big.Int, error) { return _Staking.Contract.StakeBalance(&_Staking.CallOpts, target, vega_public_key) } -// StakingToken is a free data retrieval call binding the contract method 0x2dc7d74c. +// StakingToken is a free data retrieval call binding the contract method 0x72f702f3. // -// Solidity: function staking_token() view returns(address) +// Solidity: function stakingToken() view returns(address) func (_Staking *StakingCaller) StakingToken(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _Staking.contract.Call(opts, &out, "staking_token") + err := _Staking.contract.Call(opts, &out, "stakingToken") + if err != nil { return *new(common.Address), err } @@ -236,28 +225,30 @@ func (_Staking *StakingCaller) StakingToken(opts *bind.CallOpts) (common.Address out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) return out0, err + } -// StakingToken is a free data retrieval call binding the contract method 0x2dc7d74c. +// StakingToken is a free data retrieval call binding the contract method 0x72f702f3. // -// Solidity: function staking_token() view returns(address) +// Solidity: function stakingToken() view returns(address) func (_Staking *StakingSession) StakingToken() (common.Address, error) { return _Staking.Contract.StakingToken(&_Staking.CallOpts) } -// StakingToken is a free data retrieval call binding the contract method 0x2dc7d74c. +// StakingToken is a free data retrieval call binding the contract method 0x72f702f3. // -// Solidity: function staking_token() view returns(address) +// Solidity: function stakingToken() view returns(address) func (_Staking *StakingCallerSession) StakingToken() (common.Address, error) { return _Staking.Contract.StakingToken(&_Staking.CallOpts) } -// TotalStaked is a free data retrieval call binding the contract method 0xaf7568dd. +// TotalStaked is a free data retrieval call binding the contract method 0x817b1cd2. // -// Solidity: function total_staked() view returns(uint256) +// Solidity: function totalStaked() view returns(uint256) func (_Staking *StakingCaller) TotalStaked(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _Staking.contract.Call(opts, &out, "total_staked") + err := _Staking.contract.Call(opts, &out, "totalStaked") + if err != nil { return *new(*big.Int), err } @@ -265,18 +256,19 @@ func (_Staking *StakingCaller) TotalStaked(opts *bind.CallOpts) (*big.Int, error out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err + } -// TotalStaked is a free data retrieval call binding the contract method 0xaf7568dd. +// TotalStaked is a free data retrieval call binding the contract method 0x817b1cd2. // -// Solidity: function total_staked() view returns(uint256) +// Solidity: function totalStaked() view returns(uint256) func (_Staking *StakingSession) TotalStaked() (*big.Int, error) { return _Staking.Contract.TotalStaked(&_Staking.CallOpts) } -// TotalStaked is a free data retrieval call binding the contract method 0xaf7568dd. +// TotalStaked is a free data retrieval call binding the contract method 0x817b1cd2. // -// Solidity: function total_staked() view returns(uint256) +// Solidity: function totalStaked() view returns(uint256) func (_Staking *StakingCallerSession) TotalStaked() (*big.Int, error) { return _Staking.Contract.TotalStaked(&_Staking.CallOpts) } @@ -356,10 +348,11 @@ type StakingStakeDeposited struct { Raw types.Log // Blockchain specific contextual infos } -// FilterStakeDeposited is a free log retrieval operation binding the contract event 0x9e3e33edf5dcded4adabc51b1266225d00fa41516bfcad69513fa4eca69519da. +// FilterStakeDeposited is a free log retrieval operation binding the contract event 0xa740b666eafe67a67d1b2753cb8f8311c88f5c2bdd5077aa463a9f63d08638c4. // // Solidity: event StakeDeposited(address indexed user, uint256 amount, bytes32 indexed vega_public_key) func (_Staking *StakingFilterer) FilterStakeDeposited(opts *bind.FilterOpts, user []common.Address, vega_public_key [][32]byte) (*StakingStakeDepositedIterator, error) { + var userRule []interface{} for _, userItem := range user { userRule = append(userRule, userItem) @@ -377,10 +370,11 @@ func (_Staking *StakingFilterer) FilterStakeDeposited(opts *bind.FilterOpts, use return &StakingStakeDepositedIterator{contract: _Staking.contract, event: "StakeDeposited", logs: logs, sub: sub}, nil } -// WatchStakeDeposited is a free log subscription operation binding the contract event 0x9e3e33edf5dcded4adabc51b1266225d00fa41516bfcad69513fa4eca69519da. +// WatchStakeDeposited is a free log subscription operation binding the contract event 0xa740b666eafe67a67d1b2753cb8f8311c88f5c2bdd5077aa463a9f63d08638c4. // // Solidity: event StakeDeposited(address indexed user, uint256 amount, bytes32 indexed vega_public_key) func (_Staking *StakingFilterer) WatchStakeDeposited(opts *bind.WatchOpts, sink chan<- *StakingStakeDeposited, user []common.Address, vega_public_key [][32]byte) (event.Subscription, error) { + var userRule []interface{} for _, userItem := range user { userRule = append(userRule, userItem) @@ -423,7 +417,7 @@ func (_Staking *StakingFilterer) WatchStakeDeposited(opts *bind.WatchOpts, sink }), nil } -// ParseStakeDeposited is a log parse operation binding the contract event 0x9e3e33edf5dcded4adabc51b1266225d00fa41516bfcad69513fa4eca69519da. +// ParseStakeDeposited is a log parse operation binding the contract event 0xa740b666eafe67a67d1b2753cb8f8311c88f5c2bdd5077aa463a9f63d08638c4. // // Solidity: event StakeDeposited(address indexed user, uint256 amount, bytes32 indexed vega_public_key) func (_Staking *StakingFilterer) ParseStakeDeposited(log types.Log) (*StakingStakeDeposited, error) { @@ -510,10 +504,11 @@ type StakingStakeRemoved struct { Raw types.Log // Blockchain specific contextual infos } -// FilterStakeRemoved is a free log retrieval operation binding the contract event 0xa131d16963736e4c641f27a7f82f2e350b5971e555ae06ae906892bbba0a0939. +// FilterStakeRemoved is a free log retrieval operation binding the contract event 0x3df2a2c33fc4a392029fcbabd913802df02edfae3039eed78ddcc961bbf74f3e. // // Solidity: event StakeRemoved(address indexed user, uint256 amount, bytes32 indexed vega_public_key) func (_Staking *StakingFilterer) FilterStakeRemoved(opts *bind.FilterOpts, user []common.Address, vega_public_key [][32]byte) (*StakingStakeRemovedIterator, error) { + var userRule []interface{} for _, userItem := range user { userRule = append(userRule, userItem) @@ -531,10 +526,11 @@ func (_Staking *StakingFilterer) FilterStakeRemoved(opts *bind.FilterOpts, user return &StakingStakeRemovedIterator{contract: _Staking.contract, event: "StakeRemoved", logs: logs, sub: sub}, nil } -// WatchStakeRemoved is a free log subscription operation binding the contract event 0xa131d16963736e4c641f27a7f82f2e350b5971e555ae06ae906892bbba0a0939. +// WatchStakeRemoved is a free log subscription operation binding the contract event 0x3df2a2c33fc4a392029fcbabd913802df02edfae3039eed78ddcc961bbf74f3e. // // Solidity: event StakeRemoved(address indexed user, uint256 amount, bytes32 indexed vega_public_key) func (_Staking *StakingFilterer) WatchStakeRemoved(opts *bind.WatchOpts, sink chan<- *StakingStakeRemoved, user []common.Address, vega_public_key [][32]byte) (event.Subscription, error) { + var userRule []interface{} for _, userItem := range user { userRule = append(userRule, userItem) @@ -577,7 +573,7 @@ func (_Staking *StakingFilterer) WatchStakeRemoved(opts *bind.WatchOpts, sink ch }), nil } -// ParseStakeRemoved is a log parse operation binding the contract event 0xa131d16963736e4c641f27a7f82f2e350b5971e555ae06ae906892bbba0a0939. +// ParseStakeRemoved is a log parse operation binding the contract event 0x3df2a2c33fc4a392029fcbabd913802df02edfae3039eed78ddcc961bbf74f3e. // // Solidity: event StakeRemoved(address indexed user, uint256 amount, bytes32 indexed vega_public_key) func (_Staking *StakingFilterer) ParseStakeRemoved(log types.Log) (*StakingStakeRemoved, error) { @@ -665,10 +661,11 @@ type StakingStakeTransferred struct { Raw types.Log // Blockchain specific contextual infos } -// FilterStakeTransferred is a free log retrieval operation binding the contract event 0x296aca09e6f616abedcd9cd45ac378207310452b7a713289374fd1b35e2c2fbe. +// FilterStakeTransferred is a free log retrieval operation binding the contract event 0xab5f7a0e10dc8589661875693d701b8779b7606ee1a15027a7114d66f1257794. // -// Solidity: event Stake_Transferred(address indexed from, uint256 amount, address indexed to, bytes32 indexed vega_public_key) +// Solidity: event StakeTransferred(address indexed from, uint256 amount, address indexed to, bytes32 indexed vega_public_key) func (_Staking *StakingFilterer) FilterStakeTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address, vega_public_key [][32]byte) (*StakingStakeTransferredIterator, error) { + var fromRule []interface{} for _, fromItem := range from { fromRule = append(fromRule, fromItem) @@ -683,17 +680,18 @@ func (_Staking *StakingFilterer) FilterStakeTransferred(opts *bind.FilterOpts, f vega_public_keyRule = append(vega_public_keyRule, vega_public_keyItem) } - logs, sub, err := _Staking.contract.FilterLogs(opts, "Stake_Transferred", fromRule, toRule, vega_public_keyRule) + logs, sub, err := _Staking.contract.FilterLogs(opts, "StakeTransferred", fromRule, toRule, vega_public_keyRule) if err != nil { return nil, err } - return &StakingStakeTransferredIterator{contract: _Staking.contract, event: "Stake_Transferred", logs: logs, sub: sub}, nil + return &StakingStakeTransferredIterator{contract: _Staking.contract, event: "StakeTransferred", logs: logs, sub: sub}, nil } -// WatchStakeTransferred is a free log subscription operation binding the contract event 0x296aca09e6f616abedcd9cd45ac378207310452b7a713289374fd1b35e2c2fbe. +// WatchStakeTransferred is a free log subscription operation binding the contract event 0xab5f7a0e10dc8589661875693d701b8779b7606ee1a15027a7114d66f1257794. // -// Solidity: event Stake_Transferred(address indexed from, uint256 amount, address indexed to, bytes32 indexed vega_public_key) +// Solidity: event StakeTransferred(address indexed from, uint256 amount, address indexed to, bytes32 indexed vega_public_key) func (_Staking *StakingFilterer) WatchStakeTransferred(opts *bind.WatchOpts, sink chan<- *StakingStakeTransferred, from []common.Address, to []common.Address, vega_public_key [][32]byte) (event.Subscription, error) { + var fromRule []interface{} for _, fromItem := range from { fromRule = append(fromRule, fromItem) @@ -708,7 +706,7 @@ func (_Staking *StakingFilterer) WatchStakeTransferred(opts *bind.WatchOpts, sin vega_public_keyRule = append(vega_public_keyRule, vega_public_keyItem) } - logs, sub, err := _Staking.contract.WatchLogs(opts, "Stake_Transferred", fromRule, toRule, vega_public_keyRule) + logs, sub, err := _Staking.contract.WatchLogs(opts, "StakeTransferred", fromRule, toRule, vega_public_keyRule) if err != nil { return nil, err } @@ -719,7 +717,7 @@ func (_Staking *StakingFilterer) WatchStakeTransferred(opts *bind.WatchOpts, sin case log := <-logs: // New log arrived, parse the event and forward to the user event := new(StakingStakeTransferred) - if err := _Staking.contract.UnpackLog(event, "Stake_Transferred", log); err != nil { + if err := _Staking.contract.UnpackLog(event, "StakeTransferred", log); err != nil { return err } event.Raw = log @@ -740,12 +738,12 @@ func (_Staking *StakingFilterer) WatchStakeTransferred(opts *bind.WatchOpts, sin }), nil } -// ParseStakeTransferred is a log parse operation binding the contract event 0x296aca09e6f616abedcd9cd45ac378207310452b7a713289374fd1b35e2c2fbe. +// ParseStakeTransferred is a log parse operation binding the contract event 0xab5f7a0e10dc8589661875693d701b8779b7606ee1a15027a7114d66f1257794. // -// Solidity: event Stake_Transferred(address indexed from, uint256 amount, address indexed to, bytes32 indexed vega_public_key) +// Solidity: event StakeTransferred(address indexed from, uint256 amount, address indexed to, bytes32 indexed vega_public_key) func (_Staking *StakingFilterer) ParseStakeTransferred(log types.Log) (*StakingStakeTransferred, error) { event := new(StakingStakeTransferred) - if err := _Staking.contract.UnpackLog(event, "Stake_Transferred", log); err != nil { + if err := _Staking.contract.UnpackLog(event, "StakeTransferred", log); err != nil { return nil, err } event.Raw = log diff --git a/core/staking/staking_bridge_abi.json b/core/staking/staking_bridge_abi.json index 71f42e73823..4472aadb480 100644 --- a/core/staking/staking_bridge_abi.json +++ b/core/staking/staking_bridge_abi.json @@ -77,12 +77,12 @@ "type": "bytes32" } ], - "name": "Stake_Transferred", + "name": "StakeTransferred", "type": "event" }, { "inputs": [], - "name": "staking_token", + "name": "stakingToken", "outputs": [ { "internalType": "address", @@ -106,7 +106,7 @@ "type": "bytes32" } ], - "name": "stake_balance", + "name": "stakeBalance", "outputs": [ { "internalType": "uint256", @@ -119,7 +119,7 @@ }, { "inputs": [], - "name": "total_staked", + "name": "totalStaked", "outputs": [ { "internalType": "uint256", From 81597c68eb674ab4617825b357e9027834b0dc9c Mon Sep 17 00:00:00 2001 From: Jeremy Letang Date: Wed, 14 Aug 2024 15:40:39 +0100 Subject: [PATCH 3/8] chore: update multisig / bridge ABIs Signed-off-by: Jeremy Letang --- core/bridges/erc20_asset_pool.go | 4 +- core/bridges/erc20_logic.go | 20 +- core/bridges/erc20_multisigcontrol.go | 10 +- .../ERC20_Bridge_Logic_Restricted.abi | 540 +++++++++++- core/contracts/MultisigControl.abi | 253 +++++- .../erc20_bridge_logic_restricted.go | 769 ++++++++---------- .../multisig_control/multisig_control.go | 207 ++--- 7 files changed, 1234 insertions(+), 569 deletions(-) diff --git a/core/bridges/erc20_asset_pool.go b/core/bridges/erc20_asset_pool.go index 90e52207f14..b72a5421ef3 100644 --- a/core/bridges/erc20_asset_pool.go +++ b/core/bridges/erc20_asset_pool.go @@ -74,7 +74,7 @@ func (e ERC20AssetPool) SetBridgeAddress( newAddressEth := ethcmn.HexToAddress(newAddress) buf, err := args.Pack([]interface{}{ - newAddressEth, nonce.BigInt(), "set_bridge_address", + newAddressEth, nonce.BigInt(), "setBridgeAddress", }...) if err != nil { return nil, fmt.Errorf("couldn't pack abi message: %w", err) @@ -122,7 +122,7 @@ func (e ERC20AssetPool) SetMultiSigControl( newAddressEth := ethcmn.HexToAddress(newAddress) buf, err := args.Pack([]interface{}{ - newAddressEth, nonce.BigInt(), "set_multisig_control", + newAddressEth, nonce.BigInt(), "setMultisigControl", }...) if err != nil { return nil, fmt.Errorf("couldn't pack abi message: %w", err) diff --git a/core/bridges/erc20_logic.go b/core/bridges/erc20_logic.go index 434aee3e0b6..e59eda1f61e 100644 --- a/core/bridges/erc20_logic.go +++ b/core/bridges/erc20_logic.go @@ -107,7 +107,7 @@ func (e ERC20Logic) ListAsset( lifetimeLimit.BigInt(), withdrawThreshold.BigInt(), nonce.BigInt(), - "list_asset", + "listAsset", }...) if err != nil { return nil, fmt.Errorf("couldn't pack abi message: %w", err) @@ -182,7 +182,7 @@ func (e ERC20Logic) buildListAssetMessage( lifetimeLimit.BigInt(), withdrawThreshold.BigInt(), nonce.BigInt(), - "list_asset", + "listAsset", }...) if err != nil { return nil, fmt.Errorf("couldn't pack abi message: %w", err) @@ -266,7 +266,7 @@ func (e ERC20Logic) RemoveAsset( tokenAddressEth := ethcmn.HexToAddress(tokenAddress) buf, err := args.Pack([]interface{}{ - tokenAddressEth, nonce.BigInt(), "remove_asset", + tokenAddressEth, nonce.BigInt(), "removeAsset", }...) if err != nil { return nil, fmt.Errorf("couldn't pack abi message: %w", err) @@ -354,7 +354,7 @@ func (e ERC20Logic) buildWithdrawAssetMessage( hexEthPartyAddress, timestamp, nonce.BigInt(), - "withdraw_asset", + "withdrawAsset", }...) if err != nil { return nil, fmt.Errorf("couldn't pack abi message: %w", err) @@ -447,7 +447,7 @@ func (e ERC20Logic) SetAssetLimits( lifetimeLimit.BigInt(), withdrawThreshold.BigInt(), nonce.BigInt(), - "set_asset_limits", + "setAssetLimits", }...) if err != nil { return nil, fmt.Errorf("couldn't pack abi message: %w", err) @@ -509,7 +509,7 @@ func (e ERC20Logic) buildSetAssetLimitsMessage( lifetimeLimit.BigInt(), withdrawThreshold.BigInt(), nonce.BigInt(), - "set_asset_limits", + "setAssetLimits", }...) if err != nil { return nil, fmt.Errorf("couldn't pack abi message: %w", err) @@ -604,7 +604,7 @@ func (e ERC20Logic) buildWithdrawDelayMessage( buf, err := args.Pack([]interface{}{ delayBig, nonce.BigInt(), - "set_withdraw_delay", + "setWithdrawDelay", }...) if err != nil { return nil, fmt.Errorf("couldn't pack abi message: %w", err) @@ -671,7 +671,7 @@ func (e ERC20Logic) GlobalStop( buf, err := args.Pack([]interface{}{ nonce.BigInt(), - "global_stop", + "globalStop", }...) if err != nil { return nil, fmt.Errorf("couldn't pack abi message: %w", err) @@ -710,7 +710,7 @@ func (e ERC20Logic) GlobalResume( buf, err := args.Pack([]interface{}{ nonce.BigInt(), - "global_resume", + "globalResume", }...) if err != nil { return nil, fmt.Errorf("couldn't pack abi message: %w", err) @@ -750,7 +750,7 @@ func (e ERC20Logic) VerifyGlobalResume( buf, err := args.Pack([]interface{}{ nonce.BigInt(), - "global_resume", + "globalResume", }...) if err != nil { return nil, fmt.Errorf("couldn't pack abi message: %w", err) diff --git a/core/bridges/erc20_multisigcontrol.go b/core/bridges/erc20_multisigcontrol.go index 177c30a14aa..577376fb141 100644 --- a/core/bridges/erc20_multisigcontrol.go +++ b/core/bridges/erc20_multisigcontrol.go @@ -60,7 +60,7 @@ func (e *ERC20MultiSigControl) BurnNonce( }, }) - buf, err := args.Pack([]interface{}{nonce.BigInt(), "burn_nonce"}...) + buf, err := args.Pack([]interface{}{nonce.BigInt(), "burnNonce"}...) if err != nil { return nil, err } @@ -93,7 +93,7 @@ func (e *ERC20MultiSigControl) SetThreshold( args := abi.Arguments([]abi.Argument{ { - Name: "new_threshold", + Name: "newThreshold", Type: typU16, }, { @@ -106,7 +106,7 @@ func (e *ERC20MultiSigControl) SetThreshold( }, }) - buf, err := args.Pack([]interface{}{newThreshold, nonce.BigInt(), "set_threshold"}...) + buf, err := args.Pack([]interface{}{newThreshold, nonce.BigInt(), "setThreshold"}...) if err != nil { return nil, err } @@ -151,7 +151,7 @@ func (e *ERC20MultiSigControl) AddSigner( }) newSignerAddr := ethcmn.HexToAddress(newSigner) - buf, err := args.Pack([]interface{}{newSignerAddr, nonce.BigInt(), "add_signer"}...) + buf, err := args.Pack([]interface{}{newSignerAddr, nonce.BigInt(), "addSigner"}...) if err != nil { return nil, err } @@ -197,7 +197,7 @@ func (e *ERC20MultiSigControl) RemoveSigner( }) oldSignerAddr := ethcmn.HexToAddress(oldSigner) - buf, err := args.Pack([]interface{}{oldSignerAddr, nonce.BigInt(), "remove_signer"}...) + buf, err := args.Pack([]interface{}{oldSignerAddr, nonce.BigInt(), "removeSigner"}...) if err != nil { return nil, err } diff --git a/core/contracts/ERC20_Bridge_Logic_Restricted.abi b/core/contracts/ERC20_Bridge_Logic_Restricted.abi index 6a253ca9b7c..65c254b2d34 100644 --- a/core/contracts/ERC20_Bridge_Logic_Restricted.abi +++ b/core/contracts/ERC20_Bridge_Logic_Restricted.abi @@ -1 +1,539 @@ -[{"inputs":[{"internalType":"address payable","name":"erc20_asset_pool","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user_address","type":"address"},{"indexed":true,"internalType":"address","name":"asset_source","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"vega_public_key","type":"bytes32"}],"name":"Asset_Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset_source","type":"address"},{"indexed":false,"internalType":"uint256","name":"lifetime_limit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"withdraw_threshold","type":"uint256"}],"name":"Asset_Limits_Updated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset_source","type":"address"},{"indexed":true,"internalType":"bytes32","name":"vega_asset_id","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"Asset_Listed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset_source","type":"address"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"Asset_Removed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user_address","type":"address"},{"indexed":true,"internalType":"address","name":"asset_source","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"Asset_Withdrawn","type":"event"},{"anonymous":false,"inputs":[],"name":"Bridge_Resumed","type":"event"},{"anonymous":false,"inputs":[],"name":"Bridge_Stopped","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"withdraw_delay","type":"uint256"}],"name":"Bridge_Withdraw_Delay_Set","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"depositor","type":"address"}],"name":"Depositor_Exempted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"depositor","type":"address"}],"name":"Depositor_Exemption_Revoked","type":"event"},{"inputs":[],"name":"default_withdraw_delay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset_source","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"vega_public_key","type":"bytes32"}],"name":"deposit_asset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"erc20_asset_pool_address","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exempt_depositor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset_source","type":"address"}],"name":"get_asset_deposit_lifetime_limit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"vega_asset_id","type":"bytes32"}],"name":"get_asset_source","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"get_multisig_control_address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset_source","type":"address"}],"name":"get_vega_asset_id","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset_source","type":"address"}],"name":"get_withdraw_threshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signatures","type":"bytes"}],"name":"global_resume","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signatures","type":"bytes"}],"name":"global_stop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset_source","type":"address"}],"name":"is_asset_listed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"depositor","type":"address"}],"name":"is_exempt_depositor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"is_stopped","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset_source","type":"address"},{"internalType":"bytes32","name":"vega_asset_id","type":"bytes32"},{"internalType":"uint256","name":"lifetime_limit","type":"uint256"},{"internalType":"uint256","name":"withdraw_threshold","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signatures","type":"bytes"}],"name":"list_asset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset_source","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signatures","type":"bytes"}],"name":"remove_asset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revoke_exempt_depositor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset_source","type":"address"},{"internalType":"uint256","name":"lifetime_limit","type":"uint256"},{"internalType":"uint256","name":"threshold","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signatures","type":"bytes"}],"name":"set_asset_limits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"delay","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signatures","type":"bytes"}],"name":"set_withdraw_delay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset_source","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"creation","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signatures","type":"bytes"}],"name":"withdraw_asset","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file +[ + { + "type": "function", + "name": "depositAsset", + "inputs": [ + { + "name": "assetSource", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "vegaPublicKey", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "exemptDepositor", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getAssetDepositLifetimeLimit", + "inputs": [ + { + "name": "assetSource", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAssetSource", + "inputs": [ + { + "name": "vegaAssetId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getMultisigControlAddress", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getVegaAssetId", + "inputs": [ + { + "name": "assetSource", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getWithdrawThreshold", + "inputs": [ + { + "name": "assetSource", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "globalResume", + "inputs": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "signatures", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "globalStop", + "inputs": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "signatures", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isAssetListed", + "inputs": [ + { + "name": "assetSource", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isExemptDepositor", + "inputs": [ + { + "name": "depositor", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "listAsset", + "inputs": [ + { + "name": "assetSource", + "type": "address", + "internalType": "address" + }, + { + "name": "vegaAssetId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "lifetimeLimit", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "withdrawThreshold", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "signatures", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "removeAsset", + "inputs": [ + { + "name": "assetSource", + "type": "address", + "internalType": "address" + }, + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "signatures", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeExemptDepositor", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setAssetLimits", + "inputs": [ + { + "name": "assetSource", + "type": "address", + "internalType": "address" + }, + { + "name": "lifetimeLimit", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "threshold", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "signatures", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWithdrawDelay", + "inputs": [ + { + "name": "delay", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "signatures", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawAsset", + "inputs": [ + { + "name": "assetSource", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "target", + "type": "address", + "internalType": "address" + }, + { + "name": "creation", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "signatures", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "AssetDeposited", + "inputs": [ + { + "name": "userAddress", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "assetSource", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "vegaPublicKey", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AssetLimitsUpdated", + "inputs": [ + { + "name": "assetSource", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "lifetimeLimit", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "withdrawThreshold", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AssetListed", + "inputs": [ + { + "name": "assetSource", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "vegaAssetId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "nonce", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AssetRemoved", + "inputs": [ + { + "name": "assetSource", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "nonce", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AssetWithdrawn", + "inputs": [ + { + "name": "userAddress", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "assetSource", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "nonce", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BridgeResumed", + "inputs": [], + "anonymous": false + }, + { + "type": "event", + "name": "BridgeStopped", + "inputs": [], + "anonymous": false + }, + { + "type": "event", + "name": "BridgeWithdrawDelaySet", + "inputs": [ + { + "name": "withdraw_delay", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "DepositorExempted", + "inputs": [ + { + "name": "depositor", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "DepositorExemptionRevoked", + "inputs": [ + { + "name": "depositor", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } +] diff --git a/core/contracts/MultisigControl.abi b/core/contracts/MultisigControl.abi index 966e302c270..cff1dd08ec2 100644 --- a/core/contracts/MultisigControl.abi +++ b/core/contracts/MultisigControl.abi @@ -1 +1,252 @@ -[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"NonceBurnt","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"new_signer","type":"address"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"SignerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"old_signer","type":"address"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"SignerRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"new_threshold","type":"uint16"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"ThresholdSet","type":"event"},{"inputs":[{"internalType":"address","name":"new_signer","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signatures","type":"bytes"}],"name":"add_signer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signatures","type":"bytes"}],"name":"burn_nonce","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"get_current_threshold","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"get_valid_signer_count","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"is_nonce_used","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"signer_address","type":"address"}],"name":"is_valid_signer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"old_signer","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signatures","type":"bytes"}],"name":"remove_signer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"new_threshold","type":"uint16"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signatures","type":"bytes"}],"name":"set_threshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"signers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signatures","type":"bytes"},{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"verify_signatures","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file +[ + { + "type": "function", + "name": "addSigner", + "inputs": [ + { + "name": "newSigner", + "type": "address", + "internalType": "address" + }, + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "signatures", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "burnNonce", + "inputs": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "signatures", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getCurrentThreshold", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint16", + "internalType": "uint16" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getValidSignerCount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint8", + "internalType": "uint8" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isNonceUsed", + "inputs": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isValidSigner", + "inputs": [ + { + "name": "signer_address", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "removeSigner", + "inputs": [ + { + "name": "oldSigner", + "type": "address", + "internalType": "address" + }, + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "signatures", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setThreshold", + "inputs": [ + { + "name": "newThreshold", + "type": "uint16", + "internalType": "uint16" + }, + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "signatures", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "verifySignatures", + "inputs": [ + { + "name": "signatures", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "message", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "NonceBurnt", + "inputs": [ + { + "name": "nonce", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SignerAdded", + "inputs": [ + { + "name": "newSigner", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "nonce", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SignerRemoved", + "inputs": [ + { + "name": "oldSigner", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "nonce", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ThresholdSet", + "inputs": [ + { + "name": "newThreshold", + "type": "uint16", + "indexed": false, + "internalType": "uint16" + }, + { + "name": "nonce", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } +] diff --git a/core/contracts/erc20_bridge_logic_restricted/erc20_bridge_logic_restricted.go b/core/contracts/erc20_bridge_logic_restricted/erc20_bridge_logic_restricted.go index 9421d767f8b..4ad9bd8c2e0 100644 --- a/core/contracts/erc20_bridge_logic_restricted/erc20_bridge_logic_restricted.go +++ b/core/contracts/erc20_bridge_logic_restricted/erc20_bridge_logic_restricted.go @@ -31,7 +31,7 @@ var ( // Erc20BridgeLogicRestrictedMetaData contains all meta data concerning the Erc20BridgeLogicRestricted contract. var Erc20BridgeLogicRestrictedMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"erc20_asset_pool\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"asset_source\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"Asset_Deposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"asset_source\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lifetime_limit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"withdraw_threshold\",\"type\":\"uint256\"}],\"name\":\"Asset_Limits_Updated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"asset_source\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"vega_asset_id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"Asset_Listed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"asset_source\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"Asset_Removed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"asset_source\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"Asset_Withdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Bridge_Resumed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Bridge_Stopped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"withdraw_delay\",\"type\":\"uint256\"}],\"name\":\"Bridge_Withdraw_Delay_Set\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"}],\"name\":\"Depositor_Exempted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"}],\"name\":\"Depositor_Exemption_Revoked\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"default_withdraw_delay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset_source\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"deposit_asset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"erc20_asset_pool_address\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"exempt_depositor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset_source\",\"type\":\"address\"}],\"name\":\"get_asset_deposit_lifetime_limit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"vega_asset_id\",\"type\":\"bytes32\"}],\"name\":\"get_asset_source\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"get_multisig_control_address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset_source\",\"type\":\"address\"}],\"name\":\"get_vega_asset_id\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset_source\",\"type\":\"address\"}],\"name\":\"get_withdraw_threshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"}],\"name\":\"global_resume\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"}],\"name\":\"global_stop\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset_source\",\"type\":\"address\"}],\"name\":\"is_asset_listed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"}],\"name\":\"is_exempt_depositor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"is_stopped\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset_source\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"vega_asset_id\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"lifetime_limit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdraw_threshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"}],\"name\":\"list_asset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset_source\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"}],\"name\":\"remove_asset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"revoke_exempt_depositor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset_source\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"lifetime_limit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"threshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"}],\"name\":\"set_asset_limits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"delay\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"}],\"name\":\"set_withdraw_delay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset_source\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"creation\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"}],\"name\":\"withdraw_asset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"type\":\"function\",\"name\":\"depositAsset\",\"inputs\":[{\"name\":\"assetSource\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"vegaPublicKey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"exemptDepositor\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getAssetDepositLifetimeLimit\",\"inputs\":[{\"name\":\"assetSource\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAssetSource\",\"inputs\":[{\"name\":\"vegaAssetId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMultisigControlAddress\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getVegaAssetId\",\"inputs\":[{\"name\":\"assetSource\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getWithdrawThreshold\",\"inputs\":[{\"name\":\"assetSource\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"globalResume\",\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"signatures\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"globalStop\",\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"signatures\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isAssetListed\",\"inputs\":[{\"name\":\"assetSource\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isExemptDepositor\",\"inputs\":[{\"name\":\"depositor\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"listAsset\",\"inputs\":[{\"name\":\"assetSource\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"vegaAssetId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"lifetimeLimit\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"withdrawThreshold\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"signatures\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeAsset\",\"inputs\":[{\"name\":\"assetSource\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"signatures\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"revokeExemptDepositor\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAssetLimits\",\"inputs\":[{\"name\":\"assetSource\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"lifetimeLimit\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"threshold\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"signatures\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setWithdrawDelay\",\"inputs\":[{\"name\":\"delay\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"signatures\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawAsset\",\"inputs\":[{\"name\":\"assetSource\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"creation\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"signatures\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"AssetDeposited\",\"inputs\":[{\"name\":\"userAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"assetSource\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"vegaPublicKey\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"AssetLimitsUpdated\",\"inputs\":[{\"name\":\"assetSource\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"lifetimeLimit\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"withdrawThreshold\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"AssetListed\",\"inputs\":[{\"name\":\"assetSource\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"vegaAssetId\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"AssetRemoved\",\"inputs\":[{\"name\":\"assetSource\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"AssetWithdrawn\",\"inputs\":[{\"name\":\"userAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"assetSource\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeResumed\",\"inputs\":[],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeStopped\",\"inputs\":[],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeWithdrawDelaySet\",\"inputs\":[{\"name\":\"withdraw_delay\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DepositorExempted\",\"inputs\":[{\"name\":\"depositor\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DepositorExemptionRevoked\",\"inputs\":[{\"name\":\"depositor\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false}]", } // Erc20BridgeLogicRestrictedABI is the input ABI used to generate the binding from. @@ -180,12 +180,12 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactorRaw) Tran return _Erc20BridgeLogicRestricted.Contract.contract.Transact(opts, method, params...) } -// DefaultWithdrawDelay is a free data retrieval call binding the contract method 0x3f4f199d. +// GetAssetDepositLifetimeLimit is a free data retrieval call binding the contract method 0x5d1e1a73. // -// Solidity: function default_withdraw_delay() view returns(uint256) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) DefaultWithdrawDelay(opts *bind.CallOpts) (*big.Int, error) { +// Solidity: function getAssetDepositLifetimeLimit(address assetSource) view returns(uint256) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) GetAssetDepositLifetimeLimit(opts *bind.CallOpts, assetSource common.Address) (*big.Int, error) { var out []interface{} - err := _Erc20BridgeLogicRestricted.contract.Call(opts, &out, "default_withdraw_delay") + err := _Erc20BridgeLogicRestricted.contract.Call(opts, &out, "getAssetDepositLifetimeLimit", assetSource) if err != nil { return *new(*big.Int), err @@ -197,26 +197,26 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) DefaultWith } -// DefaultWithdrawDelay is a free data retrieval call binding the contract method 0x3f4f199d. +// GetAssetDepositLifetimeLimit is a free data retrieval call binding the contract method 0x5d1e1a73. // -// Solidity: function default_withdraw_delay() view returns(uint256) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) DefaultWithdrawDelay() (*big.Int, error) { - return _Erc20BridgeLogicRestricted.Contract.DefaultWithdrawDelay(&_Erc20BridgeLogicRestricted.CallOpts) +// Solidity: function getAssetDepositLifetimeLimit(address assetSource) view returns(uint256) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) GetAssetDepositLifetimeLimit(assetSource common.Address) (*big.Int, error) { + return _Erc20BridgeLogicRestricted.Contract.GetAssetDepositLifetimeLimit(&_Erc20BridgeLogicRestricted.CallOpts, assetSource) } -// DefaultWithdrawDelay is a free data retrieval call binding the contract method 0x3f4f199d. +// GetAssetDepositLifetimeLimit is a free data retrieval call binding the contract method 0x5d1e1a73. // -// Solidity: function default_withdraw_delay() view returns(uint256) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCallerSession) DefaultWithdrawDelay() (*big.Int, error) { - return _Erc20BridgeLogicRestricted.Contract.DefaultWithdrawDelay(&_Erc20BridgeLogicRestricted.CallOpts) +// Solidity: function getAssetDepositLifetimeLimit(address assetSource) view returns(uint256) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCallerSession) GetAssetDepositLifetimeLimit(assetSource common.Address) (*big.Int, error) { + return _Erc20BridgeLogicRestricted.Contract.GetAssetDepositLifetimeLimit(&_Erc20BridgeLogicRestricted.CallOpts, assetSource) } -// Erc20AssetPoolAddress is a free data retrieval call binding the contract method 0x9356aab8. +// GetAssetSource is a free data retrieval call binding the contract method 0xb653e56d. // -// Solidity: function erc20_asset_pool_address() view returns(address) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) Erc20AssetPoolAddress(opts *bind.CallOpts) (common.Address, error) { +// Solidity: function getAssetSource(bytes32 vegaAssetId) view returns(address) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) GetAssetSource(opts *bind.CallOpts, vegaAssetId [32]byte) (common.Address, error) { var out []interface{} - err := _Erc20BridgeLogicRestricted.contract.Call(opts, &out, "erc20_asset_pool_address") + err := _Erc20BridgeLogicRestricted.contract.Call(opts, &out, "getAssetSource", vegaAssetId) if err != nil { return *new(common.Address), err @@ -228,88 +228,26 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) Erc20AssetP } -// Erc20AssetPoolAddress is a free data retrieval call binding the contract method 0x9356aab8. +// GetAssetSource is a free data retrieval call binding the contract method 0xb653e56d. // -// Solidity: function erc20_asset_pool_address() view returns(address) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) Erc20AssetPoolAddress() (common.Address, error) { - return _Erc20BridgeLogicRestricted.Contract.Erc20AssetPoolAddress(&_Erc20BridgeLogicRestricted.CallOpts) +// Solidity: function getAssetSource(bytes32 vegaAssetId) view returns(address) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) GetAssetSource(vegaAssetId [32]byte) (common.Address, error) { + return _Erc20BridgeLogicRestricted.Contract.GetAssetSource(&_Erc20BridgeLogicRestricted.CallOpts, vegaAssetId) } -// Erc20AssetPoolAddress is a free data retrieval call binding the contract method 0x9356aab8. +// GetAssetSource is a free data retrieval call binding the contract method 0xb653e56d. // -// Solidity: function erc20_asset_pool_address() view returns(address) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCallerSession) Erc20AssetPoolAddress() (common.Address, error) { - return _Erc20BridgeLogicRestricted.Contract.Erc20AssetPoolAddress(&_Erc20BridgeLogicRestricted.CallOpts) +// Solidity: function getAssetSource(bytes32 vegaAssetId) view returns(address) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCallerSession) GetAssetSource(vegaAssetId [32]byte) (common.Address, error) { + return _Erc20BridgeLogicRestricted.Contract.GetAssetSource(&_Erc20BridgeLogicRestricted.CallOpts, vegaAssetId) } -// GetAssetDepositLifetimeLimit is a free data retrieval call binding the contract method 0x354a897a. +// GetMultisigControlAddress is a free data retrieval call binding the contract method 0x81a8915e. // -// Solidity: function get_asset_deposit_lifetime_limit(address asset_source) view returns(uint256) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) GetAssetDepositLifetimeLimit(opts *bind.CallOpts, asset_source common.Address) (*big.Int, error) { - var out []interface{} - err := _Erc20BridgeLogicRestricted.contract.Call(opts, &out, "get_asset_deposit_lifetime_limit", asset_source) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetAssetDepositLifetimeLimit is a free data retrieval call binding the contract method 0x354a897a. -// -// Solidity: function get_asset_deposit_lifetime_limit(address asset_source) view returns(uint256) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) GetAssetDepositLifetimeLimit(asset_source common.Address) (*big.Int, error) { - return _Erc20BridgeLogicRestricted.Contract.GetAssetDepositLifetimeLimit(&_Erc20BridgeLogicRestricted.CallOpts, asset_source) -} - -// GetAssetDepositLifetimeLimit is a free data retrieval call binding the contract method 0x354a897a. -// -// Solidity: function get_asset_deposit_lifetime_limit(address asset_source) view returns(uint256) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCallerSession) GetAssetDepositLifetimeLimit(asset_source common.Address) (*big.Int, error) { - return _Erc20BridgeLogicRestricted.Contract.GetAssetDepositLifetimeLimit(&_Erc20BridgeLogicRestricted.CallOpts, asset_source) -} - -// GetAssetSource is a free data retrieval call binding the contract method 0x786b0bc0. -// -// Solidity: function get_asset_source(bytes32 vega_asset_id) view returns(address) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) GetAssetSource(opts *bind.CallOpts, vega_asset_id [32]byte) (common.Address, error) { - var out []interface{} - err := _Erc20BridgeLogicRestricted.contract.Call(opts, &out, "get_asset_source", vega_asset_id) - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// GetAssetSource is a free data retrieval call binding the contract method 0x786b0bc0. -// -// Solidity: function get_asset_source(bytes32 vega_asset_id) view returns(address) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) GetAssetSource(vega_asset_id [32]byte) (common.Address, error) { - return _Erc20BridgeLogicRestricted.Contract.GetAssetSource(&_Erc20BridgeLogicRestricted.CallOpts, vega_asset_id) -} - -// GetAssetSource is a free data retrieval call binding the contract method 0x786b0bc0. -// -// Solidity: function get_asset_source(bytes32 vega_asset_id) view returns(address) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCallerSession) GetAssetSource(vega_asset_id [32]byte) (common.Address, error) { - return _Erc20BridgeLogicRestricted.Contract.GetAssetSource(&_Erc20BridgeLogicRestricted.CallOpts, vega_asset_id) -} - -// GetMultisigControlAddress is a free data retrieval call binding the contract method 0xc58dc3b9. -// -// Solidity: function get_multisig_control_address() view returns(address) +// Solidity: function getMultisigControlAddress() view returns(address) func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) GetMultisigControlAddress(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _Erc20BridgeLogicRestricted.contract.Call(opts, &out, "get_multisig_control_address") + err := _Erc20BridgeLogicRestricted.contract.Call(opts, &out, "getMultisigControlAddress") if err != nil { return *new(common.Address), err @@ -321,26 +259,26 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) GetMultisig } -// GetMultisigControlAddress is a free data retrieval call binding the contract method 0xc58dc3b9. +// GetMultisigControlAddress is a free data retrieval call binding the contract method 0x81a8915e. // -// Solidity: function get_multisig_control_address() view returns(address) +// Solidity: function getMultisigControlAddress() view returns(address) func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) GetMultisigControlAddress() (common.Address, error) { return _Erc20BridgeLogicRestricted.Contract.GetMultisigControlAddress(&_Erc20BridgeLogicRestricted.CallOpts) } -// GetMultisigControlAddress is a free data retrieval call binding the contract method 0xc58dc3b9. +// GetMultisigControlAddress is a free data retrieval call binding the contract method 0x81a8915e. // -// Solidity: function get_multisig_control_address() view returns(address) +// Solidity: function getMultisigControlAddress() view returns(address) func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCallerSession) GetMultisigControlAddress() (common.Address, error) { return _Erc20BridgeLogicRestricted.Contract.GetMultisigControlAddress(&_Erc20BridgeLogicRestricted.CallOpts) } -// GetVegaAssetId is a free data retrieval call binding the contract method 0xa06b5d39. +// GetVegaAssetId is a free data retrieval call binding the contract method 0xf8c2dbe0. // -// Solidity: function get_vega_asset_id(address asset_source) view returns(bytes32) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) GetVegaAssetId(opts *bind.CallOpts, asset_source common.Address) ([32]byte, error) { +// Solidity: function getVegaAssetId(address assetSource) view returns(bytes32) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) GetVegaAssetId(opts *bind.CallOpts, assetSource common.Address) ([32]byte, error) { var out []interface{} - err := _Erc20BridgeLogicRestricted.contract.Call(opts, &out, "get_vega_asset_id", asset_source) + err := _Erc20BridgeLogicRestricted.contract.Call(opts, &out, "getVegaAssetId", assetSource) if err != nil { return *new([32]byte), err @@ -352,26 +290,26 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) GetVegaAsse } -// GetVegaAssetId is a free data retrieval call binding the contract method 0xa06b5d39. +// GetVegaAssetId is a free data retrieval call binding the contract method 0xf8c2dbe0. // -// Solidity: function get_vega_asset_id(address asset_source) view returns(bytes32) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) GetVegaAssetId(asset_source common.Address) ([32]byte, error) { - return _Erc20BridgeLogicRestricted.Contract.GetVegaAssetId(&_Erc20BridgeLogicRestricted.CallOpts, asset_source) +// Solidity: function getVegaAssetId(address assetSource) view returns(bytes32) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) GetVegaAssetId(assetSource common.Address) ([32]byte, error) { + return _Erc20BridgeLogicRestricted.Contract.GetVegaAssetId(&_Erc20BridgeLogicRestricted.CallOpts, assetSource) } -// GetVegaAssetId is a free data retrieval call binding the contract method 0xa06b5d39. +// GetVegaAssetId is a free data retrieval call binding the contract method 0xf8c2dbe0. // -// Solidity: function get_vega_asset_id(address asset_source) view returns(bytes32) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCallerSession) GetVegaAssetId(asset_source common.Address) ([32]byte, error) { - return _Erc20BridgeLogicRestricted.Contract.GetVegaAssetId(&_Erc20BridgeLogicRestricted.CallOpts, asset_source) +// Solidity: function getVegaAssetId(address assetSource) view returns(bytes32) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCallerSession) GetVegaAssetId(assetSource common.Address) ([32]byte, error) { + return _Erc20BridgeLogicRestricted.Contract.GetVegaAssetId(&_Erc20BridgeLogicRestricted.CallOpts, assetSource) } -// GetWithdrawThreshold is a free data retrieval call binding the contract method 0xe8a7bce0. +// GetWithdrawThreshold is a free data retrieval call binding the contract method 0xf3dd4013. // -// Solidity: function get_withdraw_threshold(address asset_source) view returns(uint256) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) GetWithdrawThreshold(opts *bind.CallOpts, asset_source common.Address) (*big.Int, error) { +// Solidity: function getWithdrawThreshold(address assetSource) view returns(uint256) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) GetWithdrawThreshold(opts *bind.CallOpts, assetSource common.Address) (*big.Int, error) { var out []interface{} - err := _Erc20BridgeLogicRestricted.contract.Call(opts, &out, "get_withdraw_threshold", asset_source) + err := _Erc20BridgeLogicRestricted.contract.Call(opts, &out, "getWithdrawThreshold", assetSource) if err != nil { return *new(*big.Int), err @@ -383,26 +321,26 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) GetWithdraw } -// GetWithdrawThreshold is a free data retrieval call binding the contract method 0xe8a7bce0. +// GetWithdrawThreshold is a free data retrieval call binding the contract method 0xf3dd4013. // -// Solidity: function get_withdraw_threshold(address asset_source) view returns(uint256) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) GetWithdrawThreshold(asset_source common.Address) (*big.Int, error) { - return _Erc20BridgeLogicRestricted.Contract.GetWithdrawThreshold(&_Erc20BridgeLogicRestricted.CallOpts, asset_source) +// Solidity: function getWithdrawThreshold(address assetSource) view returns(uint256) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) GetWithdrawThreshold(assetSource common.Address) (*big.Int, error) { + return _Erc20BridgeLogicRestricted.Contract.GetWithdrawThreshold(&_Erc20BridgeLogicRestricted.CallOpts, assetSource) } -// GetWithdrawThreshold is a free data retrieval call binding the contract method 0xe8a7bce0. +// GetWithdrawThreshold is a free data retrieval call binding the contract method 0xf3dd4013. // -// Solidity: function get_withdraw_threshold(address asset_source) view returns(uint256) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCallerSession) GetWithdrawThreshold(asset_source common.Address) (*big.Int, error) { - return _Erc20BridgeLogicRestricted.Contract.GetWithdrawThreshold(&_Erc20BridgeLogicRestricted.CallOpts, asset_source) +// Solidity: function getWithdrawThreshold(address assetSource) view returns(uint256) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCallerSession) GetWithdrawThreshold(assetSource common.Address) (*big.Int, error) { + return _Erc20BridgeLogicRestricted.Contract.GetWithdrawThreshold(&_Erc20BridgeLogicRestricted.CallOpts, assetSource) } -// IsAssetListed is a free data retrieval call binding the contract method 0x7fd27b7f. +// IsAssetListed is a free data retrieval call binding the contract method 0x47eaef01. // -// Solidity: function is_asset_listed(address asset_source) view returns(bool) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) IsAssetListed(opts *bind.CallOpts, asset_source common.Address) (bool, error) { +// Solidity: function isAssetListed(address assetSource) view returns(bool) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) IsAssetListed(opts *bind.CallOpts, assetSource common.Address) (bool, error) { var out []interface{} - err := _Erc20BridgeLogicRestricted.contract.Call(opts, &out, "is_asset_listed", asset_source) + err := _Erc20BridgeLogicRestricted.contract.Call(opts, &out, "isAssetListed", assetSource) if err != nil { return *new(bool), err @@ -414,26 +352,26 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) IsAssetList } -// IsAssetListed is a free data retrieval call binding the contract method 0x7fd27b7f. +// IsAssetListed is a free data retrieval call binding the contract method 0x47eaef01. // -// Solidity: function is_asset_listed(address asset_source) view returns(bool) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) IsAssetListed(asset_source common.Address) (bool, error) { - return _Erc20BridgeLogicRestricted.Contract.IsAssetListed(&_Erc20BridgeLogicRestricted.CallOpts, asset_source) +// Solidity: function isAssetListed(address assetSource) view returns(bool) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) IsAssetListed(assetSource common.Address) (bool, error) { + return _Erc20BridgeLogicRestricted.Contract.IsAssetListed(&_Erc20BridgeLogicRestricted.CallOpts, assetSource) } -// IsAssetListed is a free data retrieval call binding the contract method 0x7fd27b7f. +// IsAssetListed is a free data retrieval call binding the contract method 0x47eaef01. // -// Solidity: function is_asset_listed(address asset_source) view returns(bool) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCallerSession) IsAssetListed(asset_source common.Address) (bool, error) { - return _Erc20BridgeLogicRestricted.Contract.IsAssetListed(&_Erc20BridgeLogicRestricted.CallOpts, asset_source) +// Solidity: function isAssetListed(address assetSource) view returns(bool) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCallerSession) IsAssetListed(assetSource common.Address) (bool, error) { + return _Erc20BridgeLogicRestricted.Contract.IsAssetListed(&_Erc20BridgeLogicRestricted.CallOpts, assetSource) } -// IsExemptDepositor is a free data retrieval call binding the contract method 0x15c0df9d. +// IsExemptDepositor is a free data retrieval call binding the contract method 0xe275317e. // -// Solidity: function is_exempt_depositor(address depositor) view returns(bool) +// Solidity: function isExemptDepositor(address depositor) view returns(bool) func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) IsExemptDepositor(opts *bind.CallOpts, depositor common.Address) (bool, error) { var out []interface{} - err := _Erc20BridgeLogicRestricted.contract.Call(opts, &out, "is_exempt_depositor", depositor) + err := _Erc20BridgeLogicRestricted.contract.Call(opts, &out, "isExemptDepositor", depositor) if err != nil { return *new(bool), err @@ -445,259 +383,228 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) IsExemptDep } -// IsExemptDepositor is a free data retrieval call binding the contract method 0x15c0df9d. +// IsExemptDepositor is a free data retrieval call binding the contract method 0xe275317e. // -// Solidity: function is_exempt_depositor(address depositor) view returns(bool) +// Solidity: function isExemptDepositor(address depositor) view returns(bool) func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) IsExemptDepositor(depositor common.Address) (bool, error) { return _Erc20BridgeLogicRestricted.Contract.IsExemptDepositor(&_Erc20BridgeLogicRestricted.CallOpts, depositor) } -// IsExemptDepositor is a free data retrieval call binding the contract method 0x15c0df9d. +// IsExemptDepositor is a free data retrieval call binding the contract method 0xe275317e. // -// Solidity: function is_exempt_depositor(address depositor) view returns(bool) +// Solidity: function isExemptDepositor(address depositor) view returns(bool) func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCallerSession) IsExemptDepositor(depositor common.Address) (bool, error) { return _Erc20BridgeLogicRestricted.Contract.IsExemptDepositor(&_Erc20BridgeLogicRestricted.CallOpts, depositor) } -// IsStopped is a free data retrieval call binding the contract method 0xe272e9d0. -// -// Solidity: function is_stopped() view returns(bool) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCaller) IsStopped(opts *bind.CallOpts) (bool, error) { - var out []interface{} - err := _Erc20BridgeLogicRestricted.contract.Call(opts, &out, "is_stopped") - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsStopped is a free data retrieval call binding the contract method 0xe272e9d0. -// -// Solidity: function is_stopped() view returns(bool) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) IsStopped() (bool, error) { - return _Erc20BridgeLogicRestricted.Contract.IsStopped(&_Erc20BridgeLogicRestricted.CallOpts) -} - -// IsStopped is a free data retrieval call binding the contract method 0xe272e9d0. -// -// Solidity: function is_stopped() view returns(bool) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedCallerSession) IsStopped() (bool, error) { - return _Erc20BridgeLogicRestricted.Contract.IsStopped(&_Erc20BridgeLogicRestricted.CallOpts) -} - -// DepositAsset is a paid mutator transaction binding the contract method 0xf7683932. +// DepositAsset is a paid mutator transaction binding the contract method 0xa372b1d2. // -// Solidity: function deposit_asset(address asset_source, uint256 amount, bytes32 vega_public_key) returns() -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactor) DepositAsset(opts *bind.TransactOpts, asset_source common.Address, amount *big.Int, vega_public_key [32]byte) (*types.Transaction, error) { - return _Erc20BridgeLogicRestricted.contract.Transact(opts, "deposit_asset", asset_source, amount, vega_public_key) +// Solidity: function depositAsset(address assetSource, uint256 amount, bytes32 vegaPublicKey) returns() +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactor) DepositAsset(opts *bind.TransactOpts, assetSource common.Address, amount *big.Int, vegaPublicKey [32]byte) (*types.Transaction, error) { + return _Erc20BridgeLogicRestricted.contract.Transact(opts, "depositAsset", assetSource, amount, vegaPublicKey) } -// DepositAsset is a paid mutator transaction binding the contract method 0xf7683932. +// DepositAsset is a paid mutator transaction binding the contract method 0xa372b1d2. // -// Solidity: function deposit_asset(address asset_source, uint256 amount, bytes32 vega_public_key) returns() -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) DepositAsset(asset_source common.Address, amount *big.Int, vega_public_key [32]byte) (*types.Transaction, error) { - return _Erc20BridgeLogicRestricted.Contract.DepositAsset(&_Erc20BridgeLogicRestricted.TransactOpts, asset_source, amount, vega_public_key) +// Solidity: function depositAsset(address assetSource, uint256 amount, bytes32 vegaPublicKey) returns() +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) DepositAsset(assetSource common.Address, amount *big.Int, vegaPublicKey [32]byte) (*types.Transaction, error) { + return _Erc20BridgeLogicRestricted.Contract.DepositAsset(&_Erc20BridgeLogicRestricted.TransactOpts, assetSource, amount, vegaPublicKey) } -// DepositAsset is a paid mutator transaction binding the contract method 0xf7683932. +// DepositAsset is a paid mutator transaction binding the contract method 0xa372b1d2. // -// Solidity: function deposit_asset(address asset_source, uint256 amount, bytes32 vega_public_key) returns() -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactorSession) DepositAsset(asset_source common.Address, amount *big.Int, vega_public_key [32]byte) (*types.Transaction, error) { - return _Erc20BridgeLogicRestricted.Contract.DepositAsset(&_Erc20BridgeLogicRestricted.TransactOpts, asset_source, amount, vega_public_key) +// Solidity: function depositAsset(address assetSource, uint256 amount, bytes32 vegaPublicKey) returns() +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactorSession) DepositAsset(assetSource common.Address, amount *big.Int, vegaPublicKey [32]byte) (*types.Transaction, error) { + return _Erc20BridgeLogicRestricted.Contract.DepositAsset(&_Erc20BridgeLogicRestricted.TransactOpts, assetSource, amount, vegaPublicKey) } -// ExemptDepositor is a paid mutator transaction binding the contract method 0xb76fbb75. +// ExemptDepositor is a paid mutator transaction binding the contract method 0xfc4e5482. // -// Solidity: function exempt_depositor() returns() +// Solidity: function exemptDepositor() returns() func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactor) ExemptDepositor(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Erc20BridgeLogicRestricted.contract.Transact(opts, "exempt_depositor") + return _Erc20BridgeLogicRestricted.contract.Transact(opts, "exemptDepositor") } -// ExemptDepositor is a paid mutator transaction binding the contract method 0xb76fbb75. +// ExemptDepositor is a paid mutator transaction binding the contract method 0xfc4e5482. // -// Solidity: function exempt_depositor() returns() +// Solidity: function exemptDepositor() returns() func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) ExemptDepositor() (*types.Transaction, error) { return _Erc20BridgeLogicRestricted.Contract.ExemptDepositor(&_Erc20BridgeLogicRestricted.TransactOpts) } -// ExemptDepositor is a paid mutator transaction binding the contract method 0xb76fbb75. +// ExemptDepositor is a paid mutator transaction binding the contract method 0xfc4e5482. // -// Solidity: function exempt_depositor() returns() +// Solidity: function exemptDepositor() returns() func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactorSession) ExemptDepositor() (*types.Transaction, error) { return _Erc20BridgeLogicRestricted.Contract.ExemptDepositor(&_Erc20BridgeLogicRestricted.TransactOpts) } -// GlobalResume is a paid mutator transaction binding the contract method 0xd72ed529. +// GlobalResume is a paid mutator transaction binding the contract method 0x3c00cb9c. // -// Solidity: function global_resume(uint256 nonce, bytes signatures) returns() +// Solidity: function globalResume(uint256 nonce, bytes signatures) returns() func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactor) GlobalResume(opts *bind.TransactOpts, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _Erc20BridgeLogicRestricted.contract.Transact(opts, "global_resume", nonce, signatures) + return _Erc20BridgeLogicRestricted.contract.Transact(opts, "globalResume", nonce, signatures) } -// GlobalResume is a paid mutator transaction binding the contract method 0xd72ed529. +// GlobalResume is a paid mutator transaction binding the contract method 0x3c00cb9c. // -// Solidity: function global_resume(uint256 nonce, bytes signatures) returns() +// Solidity: function globalResume(uint256 nonce, bytes signatures) returns() func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) GlobalResume(nonce *big.Int, signatures []byte) (*types.Transaction, error) { return _Erc20BridgeLogicRestricted.Contract.GlobalResume(&_Erc20BridgeLogicRestricted.TransactOpts, nonce, signatures) } -// GlobalResume is a paid mutator transaction binding the contract method 0xd72ed529. +// GlobalResume is a paid mutator transaction binding the contract method 0x3c00cb9c. // -// Solidity: function global_resume(uint256 nonce, bytes signatures) returns() +// Solidity: function globalResume(uint256 nonce, bytes signatures) returns() func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactorSession) GlobalResume(nonce *big.Int, signatures []byte) (*types.Transaction, error) { return _Erc20BridgeLogicRestricted.Contract.GlobalResume(&_Erc20BridgeLogicRestricted.TransactOpts, nonce, signatures) } -// GlobalStop is a paid mutator transaction binding the contract method 0x9dfd3c88. +// GlobalStop is a paid mutator transaction binding the contract method 0xdaff4e2f. // -// Solidity: function global_stop(uint256 nonce, bytes signatures) returns() +// Solidity: function globalStop(uint256 nonce, bytes signatures) returns() func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactor) GlobalStop(opts *bind.TransactOpts, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _Erc20BridgeLogicRestricted.contract.Transact(opts, "global_stop", nonce, signatures) + return _Erc20BridgeLogicRestricted.contract.Transact(opts, "globalStop", nonce, signatures) } -// GlobalStop is a paid mutator transaction binding the contract method 0x9dfd3c88. +// GlobalStop is a paid mutator transaction binding the contract method 0xdaff4e2f. // -// Solidity: function global_stop(uint256 nonce, bytes signatures) returns() +// Solidity: function globalStop(uint256 nonce, bytes signatures) returns() func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) GlobalStop(nonce *big.Int, signatures []byte) (*types.Transaction, error) { return _Erc20BridgeLogicRestricted.Contract.GlobalStop(&_Erc20BridgeLogicRestricted.TransactOpts, nonce, signatures) } -// GlobalStop is a paid mutator transaction binding the contract method 0x9dfd3c88. +// GlobalStop is a paid mutator transaction binding the contract method 0xdaff4e2f. // -// Solidity: function global_stop(uint256 nonce, bytes signatures) returns() +// Solidity: function globalStop(uint256 nonce, bytes signatures) returns() func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactorSession) GlobalStop(nonce *big.Int, signatures []byte) (*types.Transaction, error) { return _Erc20BridgeLogicRestricted.Contract.GlobalStop(&_Erc20BridgeLogicRestricted.TransactOpts, nonce, signatures) } -// ListAsset is a paid mutator transaction binding the contract method 0x0ff3562c. +// ListAsset is a paid mutator transaction binding the contract method 0x8ed131e0. // -// Solidity: function list_asset(address asset_source, bytes32 vega_asset_id, uint256 lifetime_limit, uint256 withdraw_threshold, uint256 nonce, bytes signatures) returns() -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactor) ListAsset(opts *bind.TransactOpts, asset_source common.Address, vega_asset_id [32]byte, lifetime_limit *big.Int, withdraw_threshold *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _Erc20BridgeLogicRestricted.contract.Transact(opts, "list_asset", asset_source, vega_asset_id, lifetime_limit, withdraw_threshold, nonce, signatures) +// Solidity: function listAsset(address assetSource, bytes32 vegaAssetId, uint256 lifetimeLimit, uint256 withdrawThreshold, uint256 nonce, bytes signatures) returns() +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactor) ListAsset(opts *bind.TransactOpts, assetSource common.Address, vegaAssetId [32]byte, lifetimeLimit *big.Int, withdrawThreshold *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error) { + return _Erc20BridgeLogicRestricted.contract.Transact(opts, "listAsset", assetSource, vegaAssetId, lifetimeLimit, withdrawThreshold, nonce, signatures) } -// ListAsset is a paid mutator transaction binding the contract method 0x0ff3562c. +// ListAsset is a paid mutator transaction binding the contract method 0x8ed131e0. // -// Solidity: function list_asset(address asset_source, bytes32 vega_asset_id, uint256 lifetime_limit, uint256 withdraw_threshold, uint256 nonce, bytes signatures) returns() -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) ListAsset(asset_source common.Address, vega_asset_id [32]byte, lifetime_limit *big.Int, withdraw_threshold *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _Erc20BridgeLogicRestricted.Contract.ListAsset(&_Erc20BridgeLogicRestricted.TransactOpts, asset_source, vega_asset_id, lifetime_limit, withdraw_threshold, nonce, signatures) +// Solidity: function listAsset(address assetSource, bytes32 vegaAssetId, uint256 lifetimeLimit, uint256 withdrawThreshold, uint256 nonce, bytes signatures) returns() +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) ListAsset(assetSource common.Address, vegaAssetId [32]byte, lifetimeLimit *big.Int, withdrawThreshold *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error) { + return _Erc20BridgeLogicRestricted.Contract.ListAsset(&_Erc20BridgeLogicRestricted.TransactOpts, assetSource, vegaAssetId, lifetimeLimit, withdrawThreshold, nonce, signatures) } -// ListAsset is a paid mutator transaction binding the contract method 0x0ff3562c. +// ListAsset is a paid mutator transaction binding the contract method 0x8ed131e0. // -// Solidity: function list_asset(address asset_source, bytes32 vega_asset_id, uint256 lifetime_limit, uint256 withdraw_threshold, uint256 nonce, bytes signatures) returns() -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactorSession) ListAsset(asset_source common.Address, vega_asset_id [32]byte, lifetime_limit *big.Int, withdraw_threshold *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _Erc20BridgeLogicRestricted.Contract.ListAsset(&_Erc20BridgeLogicRestricted.TransactOpts, asset_source, vega_asset_id, lifetime_limit, withdraw_threshold, nonce, signatures) +// Solidity: function listAsset(address assetSource, bytes32 vegaAssetId, uint256 lifetimeLimit, uint256 withdrawThreshold, uint256 nonce, bytes signatures) returns() +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactorSession) ListAsset(assetSource common.Address, vegaAssetId [32]byte, lifetimeLimit *big.Int, withdrawThreshold *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error) { + return _Erc20BridgeLogicRestricted.Contract.ListAsset(&_Erc20BridgeLogicRestricted.TransactOpts, assetSource, vegaAssetId, lifetimeLimit, withdrawThreshold, nonce, signatures) } -// RemoveAsset is a paid mutator transaction binding the contract method 0xc76de358. +// RemoveAsset is a paid mutator transaction binding the contract method 0x8ef973ea. // -// Solidity: function remove_asset(address asset_source, uint256 nonce, bytes signatures) returns() -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactor) RemoveAsset(opts *bind.TransactOpts, asset_source common.Address, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _Erc20BridgeLogicRestricted.contract.Transact(opts, "remove_asset", asset_source, nonce, signatures) +// Solidity: function removeAsset(address assetSource, uint256 nonce, bytes signatures) returns() +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactor) RemoveAsset(opts *bind.TransactOpts, assetSource common.Address, nonce *big.Int, signatures []byte) (*types.Transaction, error) { + return _Erc20BridgeLogicRestricted.contract.Transact(opts, "removeAsset", assetSource, nonce, signatures) } -// RemoveAsset is a paid mutator transaction binding the contract method 0xc76de358. +// RemoveAsset is a paid mutator transaction binding the contract method 0x8ef973ea. // -// Solidity: function remove_asset(address asset_source, uint256 nonce, bytes signatures) returns() -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) RemoveAsset(asset_source common.Address, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _Erc20BridgeLogicRestricted.Contract.RemoveAsset(&_Erc20BridgeLogicRestricted.TransactOpts, asset_source, nonce, signatures) +// Solidity: function removeAsset(address assetSource, uint256 nonce, bytes signatures) returns() +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) RemoveAsset(assetSource common.Address, nonce *big.Int, signatures []byte) (*types.Transaction, error) { + return _Erc20BridgeLogicRestricted.Contract.RemoveAsset(&_Erc20BridgeLogicRestricted.TransactOpts, assetSource, nonce, signatures) } -// RemoveAsset is a paid mutator transaction binding the contract method 0xc76de358. +// RemoveAsset is a paid mutator transaction binding the contract method 0x8ef973ea. // -// Solidity: function remove_asset(address asset_source, uint256 nonce, bytes signatures) returns() -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactorSession) RemoveAsset(asset_source common.Address, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _Erc20BridgeLogicRestricted.Contract.RemoveAsset(&_Erc20BridgeLogicRestricted.TransactOpts, asset_source, nonce, signatures) +// Solidity: function removeAsset(address assetSource, uint256 nonce, bytes signatures) returns() +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactorSession) RemoveAsset(assetSource common.Address, nonce *big.Int, signatures []byte) (*types.Transaction, error) { + return _Erc20BridgeLogicRestricted.Contract.RemoveAsset(&_Erc20BridgeLogicRestricted.TransactOpts, assetSource, nonce, signatures) } -// RevokeExemptDepositor is a paid mutator transaction binding the contract method 0x6a1c6fa4. +// RevokeExemptDepositor is a paid mutator transaction binding the contract method 0x66a3edc4. // -// Solidity: function revoke_exempt_depositor() returns() +// Solidity: function revokeExemptDepositor() returns() func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactor) RevokeExemptDepositor(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Erc20BridgeLogicRestricted.contract.Transact(opts, "revoke_exempt_depositor") + return _Erc20BridgeLogicRestricted.contract.Transact(opts, "revokeExemptDepositor") } -// RevokeExemptDepositor is a paid mutator transaction binding the contract method 0x6a1c6fa4. +// RevokeExemptDepositor is a paid mutator transaction binding the contract method 0x66a3edc4. // -// Solidity: function revoke_exempt_depositor() returns() +// Solidity: function revokeExemptDepositor() returns() func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) RevokeExemptDepositor() (*types.Transaction, error) { return _Erc20BridgeLogicRestricted.Contract.RevokeExemptDepositor(&_Erc20BridgeLogicRestricted.TransactOpts) } -// RevokeExemptDepositor is a paid mutator transaction binding the contract method 0x6a1c6fa4. +// RevokeExemptDepositor is a paid mutator transaction binding the contract method 0x66a3edc4. // -// Solidity: function revoke_exempt_depositor() returns() +// Solidity: function revokeExemptDepositor() returns() func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactorSession) RevokeExemptDepositor() (*types.Transaction, error) { return _Erc20BridgeLogicRestricted.Contract.RevokeExemptDepositor(&_Erc20BridgeLogicRestricted.TransactOpts) } -// SetAssetLimits is a paid mutator transaction binding the contract method 0x41fb776d. +// SetAssetLimits is a paid mutator transaction binding the contract method 0x10725d39. // -// Solidity: function set_asset_limits(address asset_source, uint256 lifetime_limit, uint256 threshold, uint256 nonce, bytes signatures) returns() -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactor) SetAssetLimits(opts *bind.TransactOpts, asset_source common.Address, lifetime_limit *big.Int, threshold *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _Erc20BridgeLogicRestricted.contract.Transact(opts, "set_asset_limits", asset_source, lifetime_limit, threshold, nonce, signatures) +// Solidity: function setAssetLimits(address assetSource, uint256 lifetimeLimit, uint256 threshold, uint256 nonce, bytes signatures) returns() +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactor) SetAssetLimits(opts *bind.TransactOpts, assetSource common.Address, lifetimeLimit *big.Int, threshold *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error) { + return _Erc20BridgeLogicRestricted.contract.Transact(opts, "setAssetLimits", assetSource, lifetimeLimit, threshold, nonce, signatures) } -// SetAssetLimits is a paid mutator transaction binding the contract method 0x41fb776d. +// SetAssetLimits is a paid mutator transaction binding the contract method 0x10725d39. // -// Solidity: function set_asset_limits(address asset_source, uint256 lifetime_limit, uint256 threshold, uint256 nonce, bytes signatures) returns() -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) SetAssetLimits(asset_source common.Address, lifetime_limit *big.Int, threshold *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _Erc20BridgeLogicRestricted.Contract.SetAssetLimits(&_Erc20BridgeLogicRestricted.TransactOpts, asset_source, lifetime_limit, threshold, nonce, signatures) +// Solidity: function setAssetLimits(address assetSource, uint256 lifetimeLimit, uint256 threshold, uint256 nonce, bytes signatures) returns() +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) SetAssetLimits(assetSource common.Address, lifetimeLimit *big.Int, threshold *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error) { + return _Erc20BridgeLogicRestricted.Contract.SetAssetLimits(&_Erc20BridgeLogicRestricted.TransactOpts, assetSource, lifetimeLimit, threshold, nonce, signatures) } -// SetAssetLimits is a paid mutator transaction binding the contract method 0x41fb776d. +// SetAssetLimits is a paid mutator transaction binding the contract method 0x10725d39. // -// Solidity: function set_asset_limits(address asset_source, uint256 lifetime_limit, uint256 threshold, uint256 nonce, bytes signatures) returns() -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactorSession) SetAssetLimits(asset_source common.Address, lifetime_limit *big.Int, threshold *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _Erc20BridgeLogicRestricted.Contract.SetAssetLimits(&_Erc20BridgeLogicRestricted.TransactOpts, asset_source, lifetime_limit, threshold, nonce, signatures) +// Solidity: function setAssetLimits(address assetSource, uint256 lifetimeLimit, uint256 threshold, uint256 nonce, bytes signatures) returns() +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactorSession) SetAssetLimits(assetSource common.Address, lifetimeLimit *big.Int, threshold *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error) { + return _Erc20BridgeLogicRestricted.Contract.SetAssetLimits(&_Erc20BridgeLogicRestricted.TransactOpts, assetSource, lifetimeLimit, threshold, nonce, signatures) } -// SetWithdrawDelay is a paid mutator transaction binding the contract method 0x5a246728. +// SetWithdrawDelay is a paid mutator transaction binding the contract method 0x9fde4ad0. // -// Solidity: function set_withdraw_delay(uint256 delay, uint256 nonce, bytes signatures) returns() +// Solidity: function setWithdrawDelay(uint256 delay, uint256 nonce, bytes signatures) returns() func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactor) SetWithdrawDelay(opts *bind.TransactOpts, delay *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _Erc20BridgeLogicRestricted.contract.Transact(opts, "set_withdraw_delay", delay, nonce, signatures) + return _Erc20BridgeLogicRestricted.contract.Transact(opts, "setWithdrawDelay", delay, nonce, signatures) } -// SetWithdrawDelay is a paid mutator transaction binding the contract method 0x5a246728. +// SetWithdrawDelay is a paid mutator transaction binding the contract method 0x9fde4ad0. // -// Solidity: function set_withdraw_delay(uint256 delay, uint256 nonce, bytes signatures) returns() +// Solidity: function setWithdrawDelay(uint256 delay, uint256 nonce, bytes signatures) returns() func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) SetWithdrawDelay(delay *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error) { return _Erc20BridgeLogicRestricted.Contract.SetWithdrawDelay(&_Erc20BridgeLogicRestricted.TransactOpts, delay, nonce, signatures) } -// SetWithdrawDelay is a paid mutator transaction binding the contract method 0x5a246728. +// SetWithdrawDelay is a paid mutator transaction binding the contract method 0x9fde4ad0. // -// Solidity: function set_withdraw_delay(uint256 delay, uint256 nonce, bytes signatures) returns() +// Solidity: function setWithdrawDelay(uint256 delay, uint256 nonce, bytes signatures) returns() func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactorSession) SetWithdrawDelay(delay *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error) { return _Erc20BridgeLogicRestricted.Contract.SetWithdrawDelay(&_Erc20BridgeLogicRestricted.TransactOpts, delay, nonce, signatures) } -// WithdrawAsset is a paid mutator transaction binding the contract method 0x3ad90635. +// WithdrawAsset is a paid mutator transaction binding the contract method 0x13b99c74. // -// Solidity: function withdraw_asset(address asset_source, uint256 amount, address target, uint256 creation, uint256 nonce, bytes signatures) returns() -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactor) WithdrawAsset(opts *bind.TransactOpts, asset_source common.Address, amount *big.Int, target common.Address, creation *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _Erc20BridgeLogicRestricted.contract.Transact(opts, "withdraw_asset", asset_source, amount, target, creation, nonce, signatures) +// Solidity: function withdrawAsset(address assetSource, uint256 amount, address target, uint256 creation, uint256 nonce, bytes signatures) returns() +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactor) WithdrawAsset(opts *bind.TransactOpts, assetSource common.Address, amount *big.Int, target common.Address, creation *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error) { + return _Erc20BridgeLogicRestricted.contract.Transact(opts, "withdrawAsset", assetSource, amount, target, creation, nonce, signatures) } -// WithdrawAsset is a paid mutator transaction binding the contract method 0x3ad90635. +// WithdrawAsset is a paid mutator transaction binding the contract method 0x13b99c74. // -// Solidity: function withdraw_asset(address asset_source, uint256 amount, address target, uint256 creation, uint256 nonce, bytes signatures) returns() -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) WithdrawAsset(asset_source common.Address, amount *big.Int, target common.Address, creation *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _Erc20BridgeLogicRestricted.Contract.WithdrawAsset(&_Erc20BridgeLogicRestricted.TransactOpts, asset_source, amount, target, creation, nonce, signatures) +// Solidity: function withdrawAsset(address assetSource, uint256 amount, address target, uint256 creation, uint256 nonce, bytes signatures) returns() +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedSession) WithdrawAsset(assetSource common.Address, amount *big.Int, target common.Address, creation *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error) { + return _Erc20BridgeLogicRestricted.Contract.WithdrawAsset(&_Erc20BridgeLogicRestricted.TransactOpts, assetSource, amount, target, creation, nonce, signatures) } -// WithdrawAsset is a paid mutator transaction binding the contract method 0x3ad90635. +// WithdrawAsset is a paid mutator transaction binding the contract method 0x13b99c74. // -// Solidity: function withdraw_asset(address asset_source, uint256 amount, address target, uint256 creation, uint256 nonce, bytes signatures) returns() -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactorSession) WithdrawAsset(asset_source common.Address, amount *big.Int, target common.Address, creation *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _Erc20BridgeLogicRestricted.Contract.WithdrawAsset(&_Erc20BridgeLogicRestricted.TransactOpts, asset_source, amount, target, creation, nonce, signatures) +// Solidity: function withdrawAsset(address assetSource, uint256 amount, address target, uint256 creation, uint256 nonce, bytes signatures) returns() +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedTransactorSession) WithdrawAsset(assetSource common.Address, amount *big.Int, target common.Address, creation *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error) { + return _Erc20BridgeLogicRestricted.Contract.WithdrawAsset(&_Erc20BridgeLogicRestricted.TransactOpts, assetSource, amount, target, creation, nonce, signatures) } // Erc20BridgeLogicRestrictedAssetDepositedIterator is returned from FilterAssetDeposited and is used to iterate over the raw logs and unpacked data for AssetDeposited events raised by the Erc20BridgeLogicRestricted contract. @@ -776,42 +683,42 @@ type Erc20BridgeLogicRestrictedAssetDeposited struct { Raw types.Log // Blockchain specific contextual infos } -// FilterAssetDeposited is a free log retrieval operation binding the contract event 0x3724ff5e82ddc640a08d68b0b782a5991aea0de51a8dd10a59cdbe5b3ec4e6bf. +// FilterAssetDeposited is a free log retrieval operation binding the contract event 0x682eab6abd797cfe9f53779827c6526e4e1e5c2c0ad2c2a30d8af5a269f5608e. // -// Solidity: event Asset_Deposited(address indexed user_address, address indexed asset_source, uint256 amount, bytes32 vega_public_key) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) FilterAssetDeposited(opts *bind.FilterOpts, user_address []common.Address, asset_source []common.Address) (*Erc20BridgeLogicRestrictedAssetDepositedIterator, error) { +// Solidity: event AssetDeposited(address indexed userAddress, address indexed assetSource, uint256 amount, bytes32 vegaPublicKey) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) FilterAssetDeposited(opts *bind.FilterOpts, userAddress []common.Address, assetSource []common.Address) (*Erc20BridgeLogicRestrictedAssetDepositedIterator, error) { - var user_addressRule []interface{} - for _, user_addressItem := range user_address { - user_addressRule = append(user_addressRule, user_addressItem) + var userAddressRule []interface{} + for _, userAddressItem := range userAddress { + userAddressRule = append(userAddressRule, userAddressItem) } - var asset_sourceRule []interface{} - for _, asset_sourceItem := range asset_source { - asset_sourceRule = append(asset_sourceRule, asset_sourceItem) + var assetSourceRule []interface{} + for _, assetSourceItem := range assetSource { + assetSourceRule = append(assetSourceRule, assetSourceItem) } - logs, sub, err := _Erc20BridgeLogicRestricted.contract.FilterLogs(opts, "Asset_Deposited", user_addressRule, asset_sourceRule) + logs, sub, err := _Erc20BridgeLogicRestricted.contract.FilterLogs(opts, "AssetDeposited", userAddressRule, assetSourceRule) if err != nil { return nil, err } - return &Erc20BridgeLogicRestrictedAssetDepositedIterator{contract: _Erc20BridgeLogicRestricted.contract, event: "Asset_Deposited", logs: logs, sub: sub}, nil + return &Erc20BridgeLogicRestrictedAssetDepositedIterator{contract: _Erc20BridgeLogicRestricted.contract, event: "AssetDeposited", logs: logs, sub: sub}, nil } -// WatchAssetDeposited is a free log subscription operation binding the contract event 0x3724ff5e82ddc640a08d68b0b782a5991aea0de51a8dd10a59cdbe5b3ec4e6bf. +// WatchAssetDeposited is a free log subscription operation binding the contract event 0x682eab6abd797cfe9f53779827c6526e4e1e5c2c0ad2c2a30d8af5a269f5608e. // -// Solidity: event Asset_Deposited(address indexed user_address, address indexed asset_source, uint256 amount, bytes32 vega_public_key) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchAssetDeposited(opts *bind.WatchOpts, sink chan<- *Erc20BridgeLogicRestrictedAssetDeposited, user_address []common.Address, asset_source []common.Address) (event.Subscription, error) { +// Solidity: event AssetDeposited(address indexed userAddress, address indexed assetSource, uint256 amount, bytes32 vegaPublicKey) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchAssetDeposited(opts *bind.WatchOpts, sink chan<- *Erc20BridgeLogicRestrictedAssetDeposited, userAddress []common.Address, assetSource []common.Address) (event.Subscription, error) { - var user_addressRule []interface{} - for _, user_addressItem := range user_address { - user_addressRule = append(user_addressRule, user_addressItem) + var userAddressRule []interface{} + for _, userAddressItem := range userAddress { + userAddressRule = append(userAddressRule, userAddressItem) } - var asset_sourceRule []interface{} - for _, asset_sourceItem := range asset_source { - asset_sourceRule = append(asset_sourceRule, asset_sourceItem) + var assetSourceRule []interface{} + for _, assetSourceItem := range assetSource { + assetSourceRule = append(assetSourceRule, assetSourceItem) } - logs, sub, err := _Erc20BridgeLogicRestricted.contract.WatchLogs(opts, "Asset_Deposited", user_addressRule, asset_sourceRule) + logs, sub, err := _Erc20BridgeLogicRestricted.contract.WatchLogs(opts, "AssetDeposited", userAddressRule, assetSourceRule) if err != nil { return nil, err } @@ -822,7 +729,7 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchAsse case log := <-logs: // New log arrived, parse the event and forward to the user event := new(Erc20BridgeLogicRestrictedAssetDeposited) - if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "Asset_Deposited", log); err != nil { + if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "AssetDeposited", log); err != nil { return err } event.Raw = log @@ -843,12 +750,12 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchAsse }), nil } -// ParseAssetDeposited is a log parse operation binding the contract event 0x3724ff5e82ddc640a08d68b0b782a5991aea0de51a8dd10a59cdbe5b3ec4e6bf. +// ParseAssetDeposited is a log parse operation binding the contract event 0x682eab6abd797cfe9f53779827c6526e4e1e5c2c0ad2c2a30d8af5a269f5608e. // -// Solidity: event Asset_Deposited(address indexed user_address, address indexed asset_source, uint256 amount, bytes32 vega_public_key) +// Solidity: event AssetDeposited(address indexed userAddress, address indexed assetSource, uint256 amount, bytes32 vegaPublicKey) func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) ParseAssetDeposited(log types.Log) (*Erc20BridgeLogicRestrictedAssetDeposited, error) { event := new(Erc20BridgeLogicRestrictedAssetDeposited) - if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "Asset_Deposited", log); err != nil { + if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "AssetDeposited", log); err != nil { return nil, err } event.Raw = log @@ -930,34 +837,34 @@ type Erc20BridgeLogicRestrictedAssetLimitsUpdated struct { Raw types.Log // Blockchain specific contextual infos } -// FilterAssetLimitsUpdated is a free log retrieval operation binding the contract event 0xfc7eab762b8751ad85c101fd1025c763b4e8d48f2093f506629b606618e884fe. +// FilterAssetLimitsUpdated is a free log retrieval operation binding the contract event 0x2b9be4c285a9f5ff31bc13fabbab637c16e5f945e41a8a0e00e699264e9a17b6. // -// Solidity: event Asset_Limits_Updated(address indexed asset_source, uint256 lifetime_limit, uint256 withdraw_threshold) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) FilterAssetLimitsUpdated(opts *bind.FilterOpts, asset_source []common.Address) (*Erc20BridgeLogicRestrictedAssetLimitsUpdatedIterator, error) { +// Solidity: event AssetLimitsUpdated(address indexed assetSource, uint256 lifetimeLimit, uint256 withdrawThreshold) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) FilterAssetLimitsUpdated(opts *bind.FilterOpts, assetSource []common.Address) (*Erc20BridgeLogicRestrictedAssetLimitsUpdatedIterator, error) { - var asset_sourceRule []interface{} - for _, asset_sourceItem := range asset_source { - asset_sourceRule = append(asset_sourceRule, asset_sourceItem) + var assetSourceRule []interface{} + for _, assetSourceItem := range assetSource { + assetSourceRule = append(assetSourceRule, assetSourceItem) } - logs, sub, err := _Erc20BridgeLogicRestricted.contract.FilterLogs(opts, "Asset_Limits_Updated", asset_sourceRule) + logs, sub, err := _Erc20BridgeLogicRestricted.contract.FilterLogs(opts, "AssetLimitsUpdated", assetSourceRule) if err != nil { return nil, err } - return &Erc20BridgeLogicRestrictedAssetLimitsUpdatedIterator{contract: _Erc20BridgeLogicRestricted.contract, event: "Asset_Limits_Updated", logs: logs, sub: sub}, nil + return &Erc20BridgeLogicRestrictedAssetLimitsUpdatedIterator{contract: _Erc20BridgeLogicRestricted.contract, event: "AssetLimitsUpdated", logs: logs, sub: sub}, nil } -// WatchAssetLimitsUpdated is a free log subscription operation binding the contract event 0xfc7eab762b8751ad85c101fd1025c763b4e8d48f2093f506629b606618e884fe. +// WatchAssetLimitsUpdated is a free log subscription operation binding the contract event 0x2b9be4c285a9f5ff31bc13fabbab637c16e5f945e41a8a0e00e699264e9a17b6. // -// Solidity: event Asset_Limits_Updated(address indexed asset_source, uint256 lifetime_limit, uint256 withdraw_threshold) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchAssetLimitsUpdated(opts *bind.WatchOpts, sink chan<- *Erc20BridgeLogicRestrictedAssetLimitsUpdated, asset_source []common.Address) (event.Subscription, error) { +// Solidity: event AssetLimitsUpdated(address indexed assetSource, uint256 lifetimeLimit, uint256 withdrawThreshold) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchAssetLimitsUpdated(opts *bind.WatchOpts, sink chan<- *Erc20BridgeLogicRestrictedAssetLimitsUpdated, assetSource []common.Address) (event.Subscription, error) { - var asset_sourceRule []interface{} - for _, asset_sourceItem := range asset_source { - asset_sourceRule = append(asset_sourceRule, asset_sourceItem) + var assetSourceRule []interface{} + for _, assetSourceItem := range assetSource { + assetSourceRule = append(assetSourceRule, assetSourceItem) } - logs, sub, err := _Erc20BridgeLogicRestricted.contract.WatchLogs(opts, "Asset_Limits_Updated", asset_sourceRule) + logs, sub, err := _Erc20BridgeLogicRestricted.contract.WatchLogs(opts, "AssetLimitsUpdated", assetSourceRule) if err != nil { return nil, err } @@ -968,7 +875,7 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchAsse case log := <-logs: // New log arrived, parse the event and forward to the user event := new(Erc20BridgeLogicRestrictedAssetLimitsUpdated) - if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "Asset_Limits_Updated", log); err != nil { + if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "AssetLimitsUpdated", log); err != nil { return err } event.Raw = log @@ -989,12 +896,12 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchAsse }), nil } -// ParseAssetLimitsUpdated is a log parse operation binding the contract event 0xfc7eab762b8751ad85c101fd1025c763b4e8d48f2093f506629b606618e884fe. +// ParseAssetLimitsUpdated is a log parse operation binding the contract event 0x2b9be4c285a9f5ff31bc13fabbab637c16e5f945e41a8a0e00e699264e9a17b6. // -// Solidity: event Asset_Limits_Updated(address indexed asset_source, uint256 lifetime_limit, uint256 withdraw_threshold) +// Solidity: event AssetLimitsUpdated(address indexed assetSource, uint256 lifetimeLimit, uint256 withdrawThreshold) func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) ParseAssetLimitsUpdated(log types.Log) (*Erc20BridgeLogicRestrictedAssetLimitsUpdated, error) { event := new(Erc20BridgeLogicRestrictedAssetLimitsUpdated) - if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "Asset_Limits_Updated", log); err != nil { + if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "AssetLimitsUpdated", log); err != nil { return nil, err } event.Raw = log @@ -1076,42 +983,42 @@ type Erc20BridgeLogicRestrictedAssetListed struct { Raw types.Log // Blockchain specific contextual infos } -// FilterAssetListed is a free log retrieval operation binding the contract event 0x4180d77d05ff0d31650c548c23f2de07a3da3ad42e3dd6edd817b438a150452e. +// FilterAssetListed is a free log retrieval operation binding the contract event 0xec587e0b31172eee3a953d82b0c7f78c96be78084a92eb0463144c0446250d49. // -// Solidity: event Asset_Listed(address indexed asset_source, bytes32 indexed vega_asset_id, uint256 nonce) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) FilterAssetListed(opts *bind.FilterOpts, asset_source []common.Address, vega_asset_id [][32]byte) (*Erc20BridgeLogicRestrictedAssetListedIterator, error) { +// Solidity: event AssetListed(address indexed assetSource, bytes32 indexed vegaAssetId, uint256 nonce) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) FilterAssetListed(opts *bind.FilterOpts, assetSource []common.Address, vegaAssetId [][32]byte) (*Erc20BridgeLogicRestrictedAssetListedIterator, error) { - var asset_sourceRule []interface{} - for _, asset_sourceItem := range asset_source { - asset_sourceRule = append(asset_sourceRule, asset_sourceItem) + var assetSourceRule []interface{} + for _, assetSourceItem := range assetSource { + assetSourceRule = append(assetSourceRule, assetSourceItem) } - var vega_asset_idRule []interface{} - for _, vega_asset_idItem := range vega_asset_id { - vega_asset_idRule = append(vega_asset_idRule, vega_asset_idItem) + var vegaAssetIdRule []interface{} + for _, vegaAssetIdItem := range vegaAssetId { + vegaAssetIdRule = append(vegaAssetIdRule, vegaAssetIdItem) } - logs, sub, err := _Erc20BridgeLogicRestricted.contract.FilterLogs(opts, "Asset_Listed", asset_sourceRule, vega_asset_idRule) + logs, sub, err := _Erc20BridgeLogicRestricted.contract.FilterLogs(opts, "AssetListed", assetSourceRule, vegaAssetIdRule) if err != nil { return nil, err } - return &Erc20BridgeLogicRestrictedAssetListedIterator{contract: _Erc20BridgeLogicRestricted.contract, event: "Asset_Listed", logs: logs, sub: sub}, nil + return &Erc20BridgeLogicRestrictedAssetListedIterator{contract: _Erc20BridgeLogicRestricted.contract, event: "AssetListed", logs: logs, sub: sub}, nil } -// WatchAssetListed is a free log subscription operation binding the contract event 0x4180d77d05ff0d31650c548c23f2de07a3da3ad42e3dd6edd817b438a150452e. +// WatchAssetListed is a free log subscription operation binding the contract event 0xec587e0b31172eee3a953d82b0c7f78c96be78084a92eb0463144c0446250d49. // -// Solidity: event Asset_Listed(address indexed asset_source, bytes32 indexed vega_asset_id, uint256 nonce) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchAssetListed(opts *bind.WatchOpts, sink chan<- *Erc20BridgeLogicRestrictedAssetListed, asset_source []common.Address, vega_asset_id [][32]byte) (event.Subscription, error) { +// Solidity: event AssetListed(address indexed assetSource, bytes32 indexed vegaAssetId, uint256 nonce) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchAssetListed(opts *bind.WatchOpts, sink chan<- *Erc20BridgeLogicRestrictedAssetListed, assetSource []common.Address, vegaAssetId [][32]byte) (event.Subscription, error) { - var asset_sourceRule []interface{} - for _, asset_sourceItem := range asset_source { - asset_sourceRule = append(asset_sourceRule, asset_sourceItem) + var assetSourceRule []interface{} + for _, assetSourceItem := range assetSource { + assetSourceRule = append(assetSourceRule, assetSourceItem) } - var vega_asset_idRule []interface{} - for _, vega_asset_idItem := range vega_asset_id { - vega_asset_idRule = append(vega_asset_idRule, vega_asset_idItem) + var vegaAssetIdRule []interface{} + for _, vegaAssetIdItem := range vegaAssetId { + vegaAssetIdRule = append(vegaAssetIdRule, vegaAssetIdItem) } - logs, sub, err := _Erc20BridgeLogicRestricted.contract.WatchLogs(opts, "Asset_Listed", asset_sourceRule, vega_asset_idRule) + logs, sub, err := _Erc20BridgeLogicRestricted.contract.WatchLogs(opts, "AssetListed", assetSourceRule, vegaAssetIdRule) if err != nil { return nil, err } @@ -1122,7 +1029,7 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchAsse case log := <-logs: // New log arrived, parse the event and forward to the user event := new(Erc20BridgeLogicRestrictedAssetListed) - if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "Asset_Listed", log); err != nil { + if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "AssetListed", log); err != nil { return err } event.Raw = log @@ -1143,12 +1050,12 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchAsse }), nil } -// ParseAssetListed is a log parse operation binding the contract event 0x4180d77d05ff0d31650c548c23f2de07a3da3ad42e3dd6edd817b438a150452e. +// ParseAssetListed is a log parse operation binding the contract event 0xec587e0b31172eee3a953d82b0c7f78c96be78084a92eb0463144c0446250d49. // -// Solidity: event Asset_Listed(address indexed asset_source, bytes32 indexed vega_asset_id, uint256 nonce) +// Solidity: event AssetListed(address indexed assetSource, bytes32 indexed vegaAssetId, uint256 nonce) func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) ParseAssetListed(log types.Log) (*Erc20BridgeLogicRestrictedAssetListed, error) { event := new(Erc20BridgeLogicRestrictedAssetListed) - if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "Asset_Listed", log); err != nil { + if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "AssetListed", log); err != nil { return nil, err } event.Raw = log @@ -1229,34 +1136,34 @@ type Erc20BridgeLogicRestrictedAssetRemoved struct { Raw types.Log // Blockchain specific contextual infos } -// FilterAssetRemoved is a free log retrieval operation binding the contract event 0x58ad5e799e2df93ab408be0e5c1870d44c80b5bca99dfaf7ddf0dab5e6b155c9. +// FilterAssetRemoved is a free log retrieval operation binding the contract event 0x3406221f53114f44c9a1bb93d08ee55735f39bf235a54741684a52501207bb54. // -// Solidity: event Asset_Removed(address indexed asset_source, uint256 nonce) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) FilterAssetRemoved(opts *bind.FilterOpts, asset_source []common.Address) (*Erc20BridgeLogicRestrictedAssetRemovedIterator, error) { +// Solidity: event AssetRemoved(address indexed assetSource, uint256 nonce) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) FilterAssetRemoved(opts *bind.FilterOpts, assetSource []common.Address) (*Erc20BridgeLogicRestrictedAssetRemovedIterator, error) { - var asset_sourceRule []interface{} - for _, asset_sourceItem := range asset_source { - asset_sourceRule = append(asset_sourceRule, asset_sourceItem) + var assetSourceRule []interface{} + for _, assetSourceItem := range assetSource { + assetSourceRule = append(assetSourceRule, assetSourceItem) } - logs, sub, err := _Erc20BridgeLogicRestricted.contract.FilterLogs(opts, "Asset_Removed", asset_sourceRule) + logs, sub, err := _Erc20BridgeLogicRestricted.contract.FilterLogs(opts, "AssetRemoved", assetSourceRule) if err != nil { return nil, err } - return &Erc20BridgeLogicRestrictedAssetRemovedIterator{contract: _Erc20BridgeLogicRestricted.contract, event: "Asset_Removed", logs: logs, sub: sub}, nil + return &Erc20BridgeLogicRestrictedAssetRemovedIterator{contract: _Erc20BridgeLogicRestricted.contract, event: "AssetRemoved", logs: logs, sub: sub}, nil } -// WatchAssetRemoved is a free log subscription operation binding the contract event 0x58ad5e799e2df93ab408be0e5c1870d44c80b5bca99dfaf7ddf0dab5e6b155c9. +// WatchAssetRemoved is a free log subscription operation binding the contract event 0x3406221f53114f44c9a1bb93d08ee55735f39bf235a54741684a52501207bb54. // -// Solidity: event Asset_Removed(address indexed asset_source, uint256 nonce) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchAssetRemoved(opts *bind.WatchOpts, sink chan<- *Erc20BridgeLogicRestrictedAssetRemoved, asset_source []common.Address) (event.Subscription, error) { +// Solidity: event AssetRemoved(address indexed assetSource, uint256 nonce) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchAssetRemoved(opts *bind.WatchOpts, sink chan<- *Erc20BridgeLogicRestrictedAssetRemoved, assetSource []common.Address) (event.Subscription, error) { - var asset_sourceRule []interface{} - for _, asset_sourceItem := range asset_source { - asset_sourceRule = append(asset_sourceRule, asset_sourceItem) + var assetSourceRule []interface{} + for _, assetSourceItem := range assetSource { + assetSourceRule = append(assetSourceRule, assetSourceItem) } - logs, sub, err := _Erc20BridgeLogicRestricted.contract.WatchLogs(opts, "Asset_Removed", asset_sourceRule) + logs, sub, err := _Erc20BridgeLogicRestricted.contract.WatchLogs(opts, "AssetRemoved", assetSourceRule) if err != nil { return nil, err } @@ -1267,7 +1174,7 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchAsse case log := <-logs: // New log arrived, parse the event and forward to the user event := new(Erc20BridgeLogicRestrictedAssetRemoved) - if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "Asset_Removed", log); err != nil { + if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "AssetRemoved", log); err != nil { return err } event.Raw = log @@ -1288,12 +1195,12 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchAsse }), nil } -// ParseAssetRemoved is a log parse operation binding the contract event 0x58ad5e799e2df93ab408be0e5c1870d44c80b5bca99dfaf7ddf0dab5e6b155c9. +// ParseAssetRemoved is a log parse operation binding the contract event 0x3406221f53114f44c9a1bb93d08ee55735f39bf235a54741684a52501207bb54. // -// Solidity: event Asset_Removed(address indexed asset_source, uint256 nonce) +// Solidity: event AssetRemoved(address indexed assetSource, uint256 nonce) func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) ParseAssetRemoved(log types.Log) (*Erc20BridgeLogicRestrictedAssetRemoved, error) { event := new(Erc20BridgeLogicRestrictedAssetRemoved) - if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "Asset_Removed", log); err != nil { + if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "AssetRemoved", log); err != nil { return nil, err } event.Raw = log @@ -1376,42 +1283,42 @@ type Erc20BridgeLogicRestrictedAssetWithdrawn struct { Raw types.Log // Blockchain specific contextual infos } -// FilterAssetWithdrawn is a free log retrieval operation binding the contract event 0xa79be4f3361e32d396d64c478ecef73732cb40b2a75702c3b3b3226a2c83b5df. +// FilterAssetWithdrawn is a free log retrieval operation binding the contract event 0xdd3541b6a4a74daf4ad7d33c0d4b441e1bad2e93e12da692aa37c5febb19f7b8. // -// Solidity: event Asset_Withdrawn(address indexed user_address, address indexed asset_source, uint256 amount, uint256 nonce) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) FilterAssetWithdrawn(opts *bind.FilterOpts, user_address []common.Address, asset_source []common.Address) (*Erc20BridgeLogicRestrictedAssetWithdrawnIterator, error) { +// Solidity: event AssetWithdrawn(address indexed userAddress, address indexed assetSource, uint256 amount, uint256 nonce) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) FilterAssetWithdrawn(opts *bind.FilterOpts, userAddress []common.Address, assetSource []common.Address) (*Erc20BridgeLogicRestrictedAssetWithdrawnIterator, error) { - var user_addressRule []interface{} - for _, user_addressItem := range user_address { - user_addressRule = append(user_addressRule, user_addressItem) + var userAddressRule []interface{} + for _, userAddressItem := range userAddress { + userAddressRule = append(userAddressRule, userAddressItem) } - var asset_sourceRule []interface{} - for _, asset_sourceItem := range asset_source { - asset_sourceRule = append(asset_sourceRule, asset_sourceItem) + var assetSourceRule []interface{} + for _, assetSourceItem := range assetSource { + assetSourceRule = append(assetSourceRule, assetSourceItem) } - logs, sub, err := _Erc20BridgeLogicRestricted.contract.FilterLogs(opts, "Asset_Withdrawn", user_addressRule, asset_sourceRule) + logs, sub, err := _Erc20BridgeLogicRestricted.contract.FilterLogs(opts, "AssetWithdrawn", userAddressRule, assetSourceRule) if err != nil { return nil, err } - return &Erc20BridgeLogicRestrictedAssetWithdrawnIterator{contract: _Erc20BridgeLogicRestricted.contract, event: "Asset_Withdrawn", logs: logs, sub: sub}, nil + return &Erc20BridgeLogicRestrictedAssetWithdrawnIterator{contract: _Erc20BridgeLogicRestricted.contract, event: "AssetWithdrawn", logs: logs, sub: sub}, nil } -// WatchAssetWithdrawn is a free log subscription operation binding the contract event 0xa79be4f3361e32d396d64c478ecef73732cb40b2a75702c3b3b3226a2c83b5df. +// WatchAssetWithdrawn is a free log subscription operation binding the contract event 0xdd3541b6a4a74daf4ad7d33c0d4b441e1bad2e93e12da692aa37c5febb19f7b8. // -// Solidity: event Asset_Withdrawn(address indexed user_address, address indexed asset_source, uint256 amount, uint256 nonce) -func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchAssetWithdrawn(opts *bind.WatchOpts, sink chan<- *Erc20BridgeLogicRestrictedAssetWithdrawn, user_address []common.Address, asset_source []common.Address) (event.Subscription, error) { +// Solidity: event AssetWithdrawn(address indexed userAddress, address indexed assetSource, uint256 amount, uint256 nonce) +func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchAssetWithdrawn(opts *bind.WatchOpts, sink chan<- *Erc20BridgeLogicRestrictedAssetWithdrawn, userAddress []common.Address, assetSource []common.Address) (event.Subscription, error) { - var user_addressRule []interface{} - for _, user_addressItem := range user_address { - user_addressRule = append(user_addressRule, user_addressItem) + var userAddressRule []interface{} + for _, userAddressItem := range userAddress { + userAddressRule = append(userAddressRule, userAddressItem) } - var asset_sourceRule []interface{} - for _, asset_sourceItem := range asset_source { - asset_sourceRule = append(asset_sourceRule, asset_sourceItem) + var assetSourceRule []interface{} + for _, assetSourceItem := range assetSource { + assetSourceRule = append(assetSourceRule, assetSourceItem) } - logs, sub, err := _Erc20BridgeLogicRestricted.contract.WatchLogs(opts, "Asset_Withdrawn", user_addressRule, asset_sourceRule) + logs, sub, err := _Erc20BridgeLogicRestricted.contract.WatchLogs(opts, "AssetWithdrawn", userAddressRule, assetSourceRule) if err != nil { return nil, err } @@ -1422,7 +1329,7 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchAsse case log := <-logs: // New log arrived, parse the event and forward to the user event := new(Erc20BridgeLogicRestrictedAssetWithdrawn) - if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "Asset_Withdrawn", log); err != nil { + if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "AssetWithdrawn", log); err != nil { return err } event.Raw = log @@ -1443,12 +1350,12 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchAsse }), nil } -// ParseAssetWithdrawn is a log parse operation binding the contract event 0xa79be4f3361e32d396d64c478ecef73732cb40b2a75702c3b3b3226a2c83b5df. +// ParseAssetWithdrawn is a log parse operation binding the contract event 0xdd3541b6a4a74daf4ad7d33c0d4b441e1bad2e93e12da692aa37c5febb19f7b8. // -// Solidity: event Asset_Withdrawn(address indexed user_address, address indexed asset_source, uint256 amount, uint256 nonce) +// Solidity: event AssetWithdrawn(address indexed userAddress, address indexed assetSource, uint256 amount, uint256 nonce) func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) ParseAssetWithdrawn(log types.Log) (*Erc20BridgeLogicRestrictedAssetWithdrawn, error) { event := new(Erc20BridgeLogicRestrictedAssetWithdrawn) - if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "Asset_Withdrawn", log); err != nil { + if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "AssetWithdrawn", log); err != nil { return nil, err } event.Raw = log @@ -1527,24 +1434,24 @@ type Erc20BridgeLogicRestrictedBridgeResumed struct { Raw types.Log // Blockchain specific contextual infos } -// FilterBridgeResumed is a free log retrieval operation binding the contract event 0x79c02b0e60e0f00fe0370791204f2f175fe3f06f4816f3506ad4fa1b8e8cde0f. +// FilterBridgeResumed is a free log retrieval operation binding the contract event 0x287ac30ff6e68ce13e26be0638f2f8fb754a569fd9c2dc77bf8241411a647876. // -// Solidity: event Bridge_Resumed() +// Solidity: event BridgeResumed() func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) FilterBridgeResumed(opts *bind.FilterOpts) (*Erc20BridgeLogicRestrictedBridgeResumedIterator, error) { - logs, sub, err := _Erc20BridgeLogicRestricted.contract.FilterLogs(opts, "Bridge_Resumed") + logs, sub, err := _Erc20BridgeLogicRestricted.contract.FilterLogs(opts, "BridgeResumed") if err != nil { return nil, err } - return &Erc20BridgeLogicRestrictedBridgeResumedIterator{contract: _Erc20BridgeLogicRestricted.contract, event: "Bridge_Resumed", logs: logs, sub: sub}, nil + return &Erc20BridgeLogicRestrictedBridgeResumedIterator{contract: _Erc20BridgeLogicRestricted.contract, event: "BridgeResumed", logs: logs, sub: sub}, nil } -// WatchBridgeResumed is a free log subscription operation binding the contract event 0x79c02b0e60e0f00fe0370791204f2f175fe3f06f4816f3506ad4fa1b8e8cde0f. +// WatchBridgeResumed is a free log subscription operation binding the contract event 0x287ac30ff6e68ce13e26be0638f2f8fb754a569fd9c2dc77bf8241411a647876. // -// Solidity: event Bridge_Resumed() +// Solidity: event BridgeResumed() func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchBridgeResumed(opts *bind.WatchOpts, sink chan<- *Erc20BridgeLogicRestrictedBridgeResumed) (event.Subscription, error) { - logs, sub, err := _Erc20BridgeLogicRestricted.contract.WatchLogs(opts, "Bridge_Resumed") + logs, sub, err := _Erc20BridgeLogicRestricted.contract.WatchLogs(opts, "BridgeResumed") if err != nil { return nil, err } @@ -1555,7 +1462,7 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchBrid case log := <-logs: // New log arrived, parse the event and forward to the user event := new(Erc20BridgeLogicRestrictedBridgeResumed) - if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "Bridge_Resumed", log); err != nil { + if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "BridgeResumed", log); err != nil { return err } event.Raw = log @@ -1576,12 +1483,12 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchBrid }), nil } -// ParseBridgeResumed is a log parse operation binding the contract event 0x79c02b0e60e0f00fe0370791204f2f175fe3f06f4816f3506ad4fa1b8e8cde0f. +// ParseBridgeResumed is a log parse operation binding the contract event 0x287ac30ff6e68ce13e26be0638f2f8fb754a569fd9c2dc77bf8241411a647876. // -// Solidity: event Bridge_Resumed() +// Solidity: event BridgeResumed() func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) ParseBridgeResumed(log types.Log) (*Erc20BridgeLogicRestrictedBridgeResumed, error) { event := new(Erc20BridgeLogicRestrictedBridgeResumed) - if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "Bridge_Resumed", log); err != nil { + if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "BridgeResumed", log); err != nil { return nil, err } event.Raw = log @@ -1660,24 +1567,24 @@ type Erc20BridgeLogicRestrictedBridgeStopped struct { Raw types.Log // Blockchain specific contextual infos } -// FilterBridgeStopped is a free log retrieval operation binding the contract event 0x129d99581c8e70519df1f0733d3212f33d0ed3ea6144adacc336c647f1d36382. +// FilterBridgeStopped is a free log retrieval operation binding the contract event 0xc491bbb4be1472096d01e3f0b6f3c2ba9720a559c3422c36408dff58e42d3873. // -// Solidity: event Bridge_Stopped() +// Solidity: event BridgeStopped() func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) FilterBridgeStopped(opts *bind.FilterOpts) (*Erc20BridgeLogicRestrictedBridgeStoppedIterator, error) { - logs, sub, err := _Erc20BridgeLogicRestricted.contract.FilterLogs(opts, "Bridge_Stopped") + logs, sub, err := _Erc20BridgeLogicRestricted.contract.FilterLogs(opts, "BridgeStopped") if err != nil { return nil, err } - return &Erc20BridgeLogicRestrictedBridgeStoppedIterator{contract: _Erc20BridgeLogicRestricted.contract, event: "Bridge_Stopped", logs: logs, sub: sub}, nil + return &Erc20BridgeLogicRestrictedBridgeStoppedIterator{contract: _Erc20BridgeLogicRestricted.contract, event: "BridgeStopped", logs: logs, sub: sub}, nil } -// WatchBridgeStopped is a free log subscription operation binding the contract event 0x129d99581c8e70519df1f0733d3212f33d0ed3ea6144adacc336c647f1d36382. +// WatchBridgeStopped is a free log subscription operation binding the contract event 0xc491bbb4be1472096d01e3f0b6f3c2ba9720a559c3422c36408dff58e42d3873. // -// Solidity: event Bridge_Stopped() +// Solidity: event BridgeStopped() func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchBridgeStopped(opts *bind.WatchOpts, sink chan<- *Erc20BridgeLogicRestrictedBridgeStopped) (event.Subscription, error) { - logs, sub, err := _Erc20BridgeLogicRestricted.contract.WatchLogs(opts, "Bridge_Stopped") + logs, sub, err := _Erc20BridgeLogicRestricted.contract.WatchLogs(opts, "BridgeStopped") if err != nil { return nil, err } @@ -1688,7 +1595,7 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchBrid case log := <-logs: // New log arrived, parse the event and forward to the user event := new(Erc20BridgeLogicRestrictedBridgeStopped) - if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "Bridge_Stopped", log); err != nil { + if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "BridgeStopped", log); err != nil { return err } event.Raw = log @@ -1709,12 +1616,12 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchBrid }), nil } -// ParseBridgeStopped is a log parse operation binding the contract event 0x129d99581c8e70519df1f0733d3212f33d0ed3ea6144adacc336c647f1d36382. +// ParseBridgeStopped is a log parse operation binding the contract event 0xc491bbb4be1472096d01e3f0b6f3c2ba9720a559c3422c36408dff58e42d3873. // -// Solidity: event Bridge_Stopped() +// Solidity: event BridgeStopped() func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) ParseBridgeStopped(log types.Log) (*Erc20BridgeLogicRestrictedBridgeStopped, error) { event := new(Erc20BridgeLogicRestrictedBridgeStopped) - if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "Bridge_Stopped", log); err != nil { + if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "BridgeStopped", log); err != nil { return nil, err } event.Raw = log @@ -1794,24 +1701,24 @@ type Erc20BridgeLogicRestrictedBridgeWithdrawDelaySet struct { Raw types.Log // Blockchain specific contextual infos } -// FilterBridgeWithdrawDelaySet is a free log retrieval operation binding the contract event 0x1c7e8f73a01b8af4e18dd34455a42a45ad742bdb79cfda77bbdf50db2391fc88. +// FilterBridgeWithdrawDelaySet is a free log retrieval operation binding the contract event 0xd7ce7fbb38daf3a282293f127641ae35e6f17cee1b51904e7b9c633f97df3b85. // -// Solidity: event Bridge_Withdraw_Delay_Set(uint256 withdraw_delay) +// Solidity: event BridgeWithdrawDelaySet(uint256 withdraw_delay) func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) FilterBridgeWithdrawDelaySet(opts *bind.FilterOpts) (*Erc20BridgeLogicRestrictedBridgeWithdrawDelaySetIterator, error) { - logs, sub, err := _Erc20BridgeLogicRestricted.contract.FilterLogs(opts, "Bridge_Withdraw_Delay_Set") + logs, sub, err := _Erc20BridgeLogicRestricted.contract.FilterLogs(opts, "BridgeWithdrawDelaySet") if err != nil { return nil, err } - return &Erc20BridgeLogicRestrictedBridgeWithdrawDelaySetIterator{contract: _Erc20BridgeLogicRestricted.contract, event: "Bridge_Withdraw_Delay_Set", logs: logs, sub: sub}, nil + return &Erc20BridgeLogicRestrictedBridgeWithdrawDelaySetIterator{contract: _Erc20BridgeLogicRestricted.contract, event: "BridgeWithdrawDelaySet", logs: logs, sub: sub}, nil } -// WatchBridgeWithdrawDelaySet is a free log subscription operation binding the contract event 0x1c7e8f73a01b8af4e18dd34455a42a45ad742bdb79cfda77bbdf50db2391fc88. +// WatchBridgeWithdrawDelaySet is a free log subscription operation binding the contract event 0xd7ce7fbb38daf3a282293f127641ae35e6f17cee1b51904e7b9c633f97df3b85. // -// Solidity: event Bridge_Withdraw_Delay_Set(uint256 withdraw_delay) +// Solidity: event BridgeWithdrawDelaySet(uint256 withdraw_delay) func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchBridgeWithdrawDelaySet(opts *bind.WatchOpts, sink chan<- *Erc20BridgeLogicRestrictedBridgeWithdrawDelaySet) (event.Subscription, error) { - logs, sub, err := _Erc20BridgeLogicRestricted.contract.WatchLogs(opts, "Bridge_Withdraw_Delay_Set") + logs, sub, err := _Erc20BridgeLogicRestricted.contract.WatchLogs(opts, "BridgeWithdrawDelaySet") if err != nil { return nil, err } @@ -1822,7 +1729,7 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchBrid case log := <-logs: // New log arrived, parse the event and forward to the user event := new(Erc20BridgeLogicRestrictedBridgeWithdrawDelaySet) - if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "Bridge_Withdraw_Delay_Set", log); err != nil { + if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "BridgeWithdrawDelaySet", log); err != nil { return err } event.Raw = log @@ -1843,12 +1750,12 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchBrid }), nil } -// ParseBridgeWithdrawDelaySet is a log parse operation binding the contract event 0x1c7e8f73a01b8af4e18dd34455a42a45ad742bdb79cfda77bbdf50db2391fc88. +// ParseBridgeWithdrawDelaySet is a log parse operation binding the contract event 0xd7ce7fbb38daf3a282293f127641ae35e6f17cee1b51904e7b9c633f97df3b85. // -// Solidity: event Bridge_Withdraw_Delay_Set(uint256 withdraw_delay) +// Solidity: event BridgeWithdrawDelaySet(uint256 withdraw_delay) func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) ParseBridgeWithdrawDelaySet(log types.Log) (*Erc20BridgeLogicRestrictedBridgeWithdrawDelaySet, error) { event := new(Erc20BridgeLogicRestrictedBridgeWithdrawDelaySet) - if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "Bridge_Withdraw_Delay_Set", log); err != nil { + if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "BridgeWithdrawDelaySet", log); err != nil { return nil, err } event.Raw = log @@ -1928,9 +1835,9 @@ type Erc20BridgeLogicRestrictedDepositorExempted struct { Raw types.Log // Blockchain specific contextual infos } -// FilterDepositorExempted is a free log retrieval operation binding the contract event 0xf56e0868b913034a60dbca9c89ee79f8b0fa18dadbc5f6665f2f9a2cf3f51cdb. +// FilterDepositorExempted is a free log retrieval operation binding the contract event 0x9864ffa3d25fb42ecb8e42e8c6655954e8c7427d44a7a9f8edfe0cea4a0108f8. // -// Solidity: event Depositor_Exempted(address indexed depositor) +// Solidity: event DepositorExempted(address indexed depositor) func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) FilterDepositorExempted(opts *bind.FilterOpts, depositor []common.Address) (*Erc20BridgeLogicRestrictedDepositorExemptedIterator, error) { var depositorRule []interface{} @@ -1938,16 +1845,16 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) FilterDep depositorRule = append(depositorRule, depositorItem) } - logs, sub, err := _Erc20BridgeLogicRestricted.contract.FilterLogs(opts, "Depositor_Exempted", depositorRule) + logs, sub, err := _Erc20BridgeLogicRestricted.contract.FilterLogs(opts, "DepositorExempted", depositorRule) if err != nil { return nil, err } - return &Erc20BridgeLogicRestrictedDepositorExemptedIterator{contract: _Erc20BridgeLogicRestricted.contract, event: "Depositor_Exempted", logs: logs, sub: sub}, nil + return &Erc20BridgeLogicRestrictedDepositorExemptedIterator{contract: _Erc20BridgeLogicRestricted.contract, event: "DepositorExempted", logs: logs, sub: sub}, nil } -// WatchDepositorExempted is a free log subscription operation binding the contract event 0xf56e0868b913034a60dbca9c89ee79f8b0fa18dadbc5f6665f2f9a2cf3f51cdb. +// WatchDepositorExempted is a free log subscription operation binding the contract event 0x9864ffa3d25fb42ecb8e42e8c6655954e8c7427d44a7a9f8edfe0cea4a0108f8. // -// Solidity: event Depositor_Exempted(address indexed depositor) +// Solidity: event DepositorExempted(address indexed depositor) func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchDepositorExempted(opts *bind.WatchOpts, sink chan<- *Erc20BridgeLogicRestrictedDepositorExempted, depositor []common.Address) (event.Subscription, error) { var depositorRule []interface{} @@ -1955,7 +1862,7 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchDepo depositorRule = append(depositorRule, depositorItem) } - logs, sub, err := _Erc20BridgeLogicRestricted.contract.WatchLogs(opts, "Depositor_Exempted", depositorRule) + logs, sub, err := _Erc20BridgeLogicRestricted.contract.WatchLogs(opts, "DepositorExempted", depositorRule) if err != nil { return nil, err } @@ -1966,7 +1873,7 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchDepo case log := <-logs: // New log arrived, parse the event and forward to the user event := new(Erc20BridgeLogicRestrictedDepositorExempted) - if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "Depositor_Exempted", log); err != nil { + if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "DepositorExempted", log); err != nil { return err } event.Raw = log @@ -1987,12 +1894,12 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchDepo }), nil } -// ParseDepositorExempted is a log parse operation binding the contract event 0xf56e0868b913034a60dbca9c89ee79f8b0fa18dadbc5f6665f2f9a2cf3f51cdb. +// ParseDepositorExempted is a log parse operation binding the contract event 0x9864ffa3d25fb42ecb8e42e8c6655954e8c7427d44a7a9f8edfe0cea4a0108f8. // -// Solidity: event Depositor_Exempted(address indexed depositor) +// Solidity: event DepositorExempted(address indexed depositor) func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) ParseDepositorExempted(log types.Log) (*Erc20BridgeLogicRestrictedDepositorExempted, error) { event := new(Erc20BridgeLogicRestrictedDepositorExempted) - if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "Depositor_Exempted", log); err != nil { + if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "DepositorExempted", log); err != nil { return nil, err } event.Raw = log @@ -2072,9 +1979,9 @@ type Erc20BridgeLogicRestrictedDepositorExemptionRevoked struct { Raw types.Log // Blockchain specific contextual infos } -// FilterDepositorExemptionRevoked is a free log retrieval operation binding the contract event 0xe74b113dca87276d976f476a9b4b9da3c780a3262eaabad051ee4e98912936a4. +// FilterDepositorExemptionRevoked is a free log retrieval operation binding the contract event 0xd661c54cb18e99cf2cc5b8c6b57f7a094e8a1b967b5de45a609f6d0220e998d4. // -// Solidity: event Depositor_Exemption_Revoked(address indexed depositor) +// Solidity: event DepositorExemptionRevoked(address indexed depositor) func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) FilterDepositorExemptionRevoked(opts *bind.FilterOpts, depositor []common.Address) (*Erc20BridgeLogicRestrictedDepositorExemptionRevokedIterator, error) { var depositorRule []interface{} @@ -2082,16 +1989,16 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) FilterDep depositorRule = append(depositorRule, depositorItem) } - logs, sub, err := _Erc20BridgeLogicRestricted.contract.FilterLogs(opts, "Depositor_Exemption_Revoked", depositorRule) + logs, sub, err := _Erc20BridgeLogicRestricted.contract.FilterLogs(opts, "DepositorExemptionRevoked", depositorRule) if err != nil { return nil, err } - return &Erc20BridgeLogicRestrictedDepositorExemptionRevokedIterator{contract: _Erc20BridgeLogicRestricted.contract, event: "Depositor_Exemption_Revoked", logs: logs, sub: sub}, nil + return &Erc20BridgeLogicRestrictedDepositorExemptionRevokedIterator{contract: _Erc20BridgeLogicRestricted.contract, event: "DepositorExemptionRevoked", logs: logs, sub: sub}, nil } -// WatchDepositorExemptionRevoked is a free log subscription operation binding the contract event 0xe74b113dca87276d976f476a9b4b9da3c780a3262eaabad051ee4e98912936a4. +// WatchDepositorExemptionRevoked is a free log subscription operation binding the contract event 0xd661c54cb18e99cf2cc5b8c6b57f7a094e8a1b967b5de45a609f6d0220e998d4. // -// Solidity: event Depositor_Exemption_Revoked(address indexed depositor) +// Solidity: event DepositorExemptionRevoked(address indexed depositor) func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchDepositorExemptionRevoked(opts *bind.WatchOpts, sink chan<- *Erc20BridgeLogicRestrictedDepositorExemptionRevoked, depositor []common.Address) (event.Subscription, error) { var depositorRule []interface{} @@ -2099,7 +2006,7 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchDepo depositorRule = append(depositorRule, depositorItem) } - logs, sub, err := _Erc20BridgeLogicRestricted.contract.WatchLogs(opts, "Depositor_Exemption_Revoked", depositorRule) + logs, sub, err := _Erc20BridgeLogicRestricted.contract.WatchLogs(opts, "DepositorExemptionRevoked", depositorRule) if err != nil { return nil, err } @@ -2110,7 +2017,7 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchDepo case log := <-logs: // New log arrived, parse the event and forward to the user event := new(Erc20BridgeLogicRestrictedDepositorExemptionRevoked) - if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "Depositor_Exemption_Revoked", log); err != nil { + if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "DepositorExemptionRevoked", log); err != nil { return err } event.Raw = log @@ -2131,12 +2038,12 @@ func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) WatchDepo }), nil } -// ParseDepositorExemptionRevoked is a log parse operation binding the contract event 0xe74b113dca87276d976f476a9b4b9da3c780a3262eaabad051ee4e98912936a4. +// ParseDepositorExemptionRevoked is a log parse operation binding the contract event 0xd661c54cb18e99cf2cc5b8c6b57f7a094e8a1b967b5de45a609f6d0220e998d4. // -// Solidity: event Depositor_Exemption_Revoked(address indexed depositor) +// Solidity: event DepositorExemptionRevoked(address indexed depositor) func (_Erc20BridgeLogicRestricted *Erc20BridgeLogicRestrictedFilterer) ParseDepositorExemptionRevoked(log types.Log) (*Erc20BridgeLogicRestrictedDepositorExemptionRevoked, error) { event := new(Erc20BridgeLogicRestrictedDepositorExemptionRevoked) - if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "Depositor_Exemption_Revoked", log); err != nil { + if err := _Erc20BridgeLogicRestricted.contract.UnpackLog(event, "DepositorExemptionRevoked", log); err != nil { return nil, err } event.Raw = log diff --git a/core/contracts/multisig_control/multisig_control.go b/core/contracts/multisig_control/multisig_control.go index 454c8fc2ff9..928fff3648d 100644 --- a/core/contracts/multisig_control/multisig_control.go +++ b/core/contracts/multisig_control/multisig_control.go @@ -31,7 +31,7 @@ var ( // MultisigControlMetaData contains all meta data concerning the MultisigControl contract. var MultisigControlMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"NonceBurnt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"new_signer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"SignerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"old_signer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"SignerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"new_threshold\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"ThresholdSet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"new_signer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"}],\"name\":\"add_signer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"}],\"name\":\"burn_nonce\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"get_current_threshold\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"get_valid_signer_count\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"is_nonce_used\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer_address\",\"type\":\"address\"}],\"name\":\"is_valid_signer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"old_signer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"}],\"name\":\"remove_signer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"new_threshold\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"}],\"name\":\"set_threshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"signers\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"verify_signatures\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"type\":\"function\",\"name\":\"addSigner\",\"inputs\":[{\"name\":\"newSigner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"signatures\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"burnNonce\",\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"signatures\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getCurrentThreshold\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getValidSignerCount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isNonceUsed\",\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isValidSigner\",\"inputs\":[{\"name\":\"signer_address\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeSigner\",\"inputs\":[{\"name\":\"oldSigner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"signatures\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setThreshold\",\"inputs\":[{\"name\":\"newThreshold\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"signatures\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifySignatures\",\"inputs\":[{\"name\":\"signatures\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"message\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"NonceBurnt\",\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SignerAdded\",\"inputs\":[{\"name\":\"newSigner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SignerRemoved\",\"inputs\":[{\"name\":\"oldSigner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ThresholdSet\",\"inputs\":[{\"name\":\"newThreshold\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false}]", } // MultisigControlABI is the input ABI used to generate the binding from. @@ -180,12 +180,12 @@ func (_MultisigControl *MultisigControlTransactorRaw) Transact(opts *bind.Transa return _MultisigControl.Contract.contract.Transact(opts, method, params...) } -// GetCurrentThreshold is a free data retrieval call binding the contract method 0xdbe528df. +// GetCurrentThreshold is a free data retrieval call binding the contract method 0x1b71bf6e. // -// Solidity: function get_current_threshold() view returns(uint16) +// Solidity: function getCurrentThreshold() view returns(uint16) func (_MultisigControl *MultisigControlCaller) GetCurrentThreshold(opts *bind.CallOpts) (uint16, error) { var out []interface{} - err := _MultisigControl.contract.Call(opts, &out, "get_current_threshold") + err := _MultisigControl.contract.Call(opts, &out, "getCurrentThreshold") if err != nil { return *new(uint16), err @@ -197,26 +197,26 @@ func (_MultisigControl *MultisigControlCaller) GetCurrentThreshold(opts *bind.Ca } -// GetCurrentThreshold is a free data retrieval call binding the contract method 0xdbe528df. +// GetCurrentThreshold is a free data retrieval call binding the contract method 0x1b71bf6e. // -// Solidity: function get_current_threshold() view returns(uint16) +// Solidity: function getCurrentThreshold() view returns(uint16) func (_MultisigControl *MultisigControlSession) GetCurrentThreshold() (uint16, error) { return _MultisigControl.Contract.GetCurrentThreshold(&_MultisigControl.CallOpts) } -// GetCurrentThreshold is a free data retrieval call binding the contract method 0xdbe528df. +// GetCurrentThreshold is a free data retrieval call binding the contract method 0x1b71bf6e. // -// Solidity: function get_current_threshold() view returns(uint16) +// Solidity: function getCurrentThreshold() view returns(uint16) func (_MultisigControl *MultisigControlCallerSession) GetCurrentThreshold() (uint16, error) { return _MultisigControl.Contract.GetCurrentThreshold(&_MultisigControl.CallOpts) } -// GetValidSignerCount is a free data retrieval call binding the contract method 0xb04e3dd1. +// GetValidSignerCount is a free data retrieval call binding the contract method 0x86778ed0. // -// Solidity: function get_valid_signer_count() view returns(uint8) +// Solidity: function getValidSignerCount() view returns(uint8) func (_MultisigControl *MultisigControlCaller) GetValidSignerCount(opts *bind.CallOpts) (uint8, error) { var out []interface{} - err := _MultisigControl.contract.Call(opts, &out, "get_valid_signer_count") + err := _MultisigControl.contract.Call(opts, &out, "getValidSignerCount") if err != nil { return *new(uint8), err @@ -228,26 +228,26 @@ func (_MultisigControl *MultisigControlCaller) GetValidSignerCount(opts *bind.Ca } -// GetValidSignerCount is a free data retrieval call binding the contract method 0xb04e3dd1. +// GetValidSignerCount is a free data retrieval call binding the contract method 0x86778ed0. // -// Solidity: function get_valid_signer_count() view returns(uint8) +// Solidity: function getValidSignerCount() view returns(uint8) func (_MultisigControl *MultisigControlSession) GetValidSignerCount() (uint8, error) { return _MultisigControl.Contract.GetValidSignerCount(&_MultisigControl.CallOpts) } -// GetValidSignerCount is a free data retrieval call binding the contract method 0xb04e3dd1. +// GetValidSignerCount is a free data retrieval call binding the contract method 0x86778ed0. // -// Solidity: function get_valid_signer_count() view returns(uint8) +// Solidity: function getValidSignerCount() view returns(uint8) func (_MultisigControl *MultisigControlCallerSession) GetValidSignerCount() (uint8, error) { return _MultisigControl.Contract.GetValidSignerCount(&_MultisigControl.CallOpts) } -// IsNonceUsed is a free data retrieval call binding the contract method 0x5b9fe26b. +// IsNonceUsed is a free data retrieval call binding the contract method 0x5d00bb12. // -// Solidity: function is_nonce_used(uint256 nonce) view returns(bool) +// Solidity: function isNonceUsed(uint256 nonce) view returns(bool) func (_MultisigControl *MultisigControlCaller) IsNonceUsed(opts *bind.CallOpts, nonce *big.Int) (bool, error) { var out []interface{} - err := _MultisigControl.contract.Call(opts, &out, "is_nonce_used", nonce) + err := _MultisigControl.contract.Call(opts, &out, "isNonceUsed", nonce) if err != nil { return *new(bool), err @@ -259,26 +259,26 @@ func (_MultisigControl *MultisigControlCaller) IsNonceUsed(opts *bind.CallOpts, } -// IsNonceUsed is a free data retrieval call binding the contract method 0x5b9fe26b. +// IsNonceUsed is a free data retrieval call binding the contract method 0x5d00bb12. // -// Solidity: function is_nonce_used(uint256 nonce) view returns(bool) +// Solidity: function isNonceUsed(uint256 nonce) view returns(bool) func (_MultisigControl *MultisigControlSession) IsNonceUsed(nonce *big.Int) (bool, error) { return _MultisigControl.Contract.IsNonceUsed(&_MultisigControl.CallOpts, nonce) } -// IsNonceUsed is a free data retrieval call binding the contract method 0x5b9fe26b. +// IsNonceUsed is a free data retrieval call binding the contract method 0x5d00bb12. // -// Solidity: function is_nonce_used(uint256 nonce) view returns(bool) +// Solidity: function isNonceUsed(uint256 nonce) view returns(bool) func (_MultisigControl *MultisigControlCallerSession) IsNonceUsed(nonce *big.Int) (bool, error) { return _MultisigControl.Contract.IsNonceUsed(&_MultisigControl.CallOpts, nonce) } -// IsValidSigner is a free data retrieval call binding the contract method 0x5f061559. +// IsValidSigner is a free data retrieval call binding the contract method 0xd5f50582. // -// Solidity: function is_valid_signer(address signer_address) view returns(bool) +// Solidity: function isValidSigner(address signer_address) view returns(bool) func (_MultisigControl *MultisigControlCaller) IsValidSigner(opts *bind.CallOpts, signer_address common.Address) (bool, error) { var out []interface{} - err := _MultisigControl.contract.Call(opts, &out, "is_valid_signer", signer_address) + err := _MultisigControl.contract.Call(opts, &out, "isValidSigner", signer_address) if err != nil { return *new(bool), err @@ -290,152 +290,121 @@ func (_MultisigControl *MultisigControlCaller) IsValidSigner(opts *bind.CallOpts } -// IsValidSigner is a free data retrieval call binding the contract method 0x5f061559. +// IsValidSigner is a free data retrieval call binding the contract method 0xd5f50582. // -// Solidity: function is_valid_signer(address signer_address) view returns(bool) +// Solidity: function isValidSigner(address signer_address) view returns(bool) func (_MultisigControl *MultisigControlSession) IsValidSigner(signer_address common.Address) (bool, error) { return _MultisigControl.Contract.IsValidSigner(&_MultisigControl.CallOpts, signer_address) } -// IsValidSigner is a free data retrieval call binding the contract method 0x5f061559. +// IsValidSigner is a free data retrieval call binding the contract method 0xd5f50582. // -// Solidity: function is_valid_signer(address signer_address) view returns(bool) +// Solidity: function isValidSigner(address signer_address) view returns(bool) func (_MultisigControl *MultisigControlCallerSession) IsValidSigner(signer_address common.Address) (bool, error) { return _MultisigControl.Contract.IsValidSigner(&_MultisigControl.CallOpts, signer_address) } -// Signers is a free data retrieval call binding the contract method 0x736c0d5b. +// AddSigner is a paid mutator transaction binding the contract method 0xea72ebd0. // -// Solidity: function signers(address ) view returns(bool) -func (_MultisigControl *MultisigControlCaller) Signers(opts *bind.CallOpts, arg0 common.Address) (bool, error) { - var out []interface{} - err := _MultisigControl.contract.Call(opts, &out, "signers", arg0) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// Signers is a free data retrieval call binding the contract method 0x736c0d5b. -// -// Solidity: function signers(address ) view returns(bool) -func (_MultisigControl *MultisigControlSession) Signers(arg0 common.Address) (bool, error) { - return _MultisigControl.Contract.Signers(&_MultisigControl.CallOpts, arg0) -} - -// Signers is a free data retrieval call binding the contract method 0x736c0d5b. -// -// Solidity: function signers(address ) view returns(bool) -func (_MultisigControl *MultisigControlCallerSession) Signers(arg0 common.Address) (bool, error) { - return _MultisigControl.Contract.Signers(&_MultisigControl.CallOpts, arg0) -} - -// AddSigner is a paid mutator transaction binding the contract method 0xf8e3a660. -// -// Solidity: function add_signer(address new_signer, uint256 nonce, bytes signatures) returns() -func (_MultisigControl *MultisigControlTransactor) AddSigner(opts *bind.TransactOpts, new_signer common.Address, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _MultisigControl.contract.Transact(opts, "add_signer", new_signer, nonce, signatures) +// Solidity: function addSigner(address newSigner, uint256 nonce, bytes signatures) returns() +func (_MultisigControl *MultisigControlTransactor) AddSigner(opts *bind.TransactOpts, newSigner common.Address, nonce *big.Int, signatures []byte) (*types.Transaction, error) { + return _MultisigControl.contract.Transact(opts, "addSigner", newSigner, nonce, signatures) } -// AddSigner is a paid mutator transaction binding the contract method 0xf8e3a660. +// AddSigner is a paid mutator transaction binding the contract method 0xea72ebd0. // -// Solidity: function add_signer(address new_signer, uint256 nonce, bytes signatures) returns() -func (_MultisigControl *MultisigControlSession) AddSigner(new_signer common.Address, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _MultisigControl.Contract.AddSigner(&_MultisigControl.TransactOpts, new_signer, nonce, signatures) +// Solidity: function addSigner(address newSigner, uint256 nonce, bytes signatures) returns() +func (_MultisigControl *MultisigControlSession) AddSigner(newSigner common.Address, nonce *big.Int, signatures []byte) (*types.Transaction, error) { + return _MultisigControl.Contract.AddSigner(&_MultisigControl.TransactOpts, newSigner, nonce, signatures) } -// AddSigner is a paid mutator transaction binding the contract method 0xf8e3a660. +// AddSigner is a paid mutator transaction binding the contract method 0xea72ebd0. // -// Solidity: function add_signer(address new_signer, uint256 nonce, bytes signatures) returns() -func (_MultisigControl *MultisigControlTransactorSession) AddSigner(new_signer common.Address, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _MultisigControl.Contract.AddSigner(&_MultisigControl.TransactOpts, new_signer, nonce, signatures) +// Solidity: function addSigner(address newSigner, uint256 nonce, bytes signatures) returns() +func (_MultisigControl *MultisigControlTransactorSession) AddSigner(newSigner common.Address, nonce *big.Int, signatures []byte) (*types.Transaction, error) { + return _MultisigControl.Contract.AddSigner(&_MultisigControl.TransactOpts, newSigner, nonce, signatures) } -// BurnNonce is a paid mutator transaction binding the contract method 0x5ec51639. +// BurnNonce is a paid mutator transaction binding the contract method 0xc15ce890. // -// Solidity: function burn_nonce(uint256 nonce, bytes signatures) returns() +// Solidity: function burnNonce(uint256 nonce, bytes signatures) returns() func (_MultisigControl *MultisigControlTransactor) BurnNonce(opts *bind.TransactOpts, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _MultisigControl.contract.Transact(opts, "burn_nonce", nonce, signatures) + return _MultisigControl.contract.Transact(opts, "burnNonce", nonce, signatures) } -// BurnNonce is a paid mutator transaction binding the contract method 0x5ec51639. +// BurnNonce is a paid mutator transaction binding the contract method 0xc15ce890. // -// Solidity: function burn_nonce(uint256 nonce, bytes signatures) returns() +// Solidity: function burnNonce(uint256 nonce, bytes signatures) returns() func (_MultisigControl *MultisigControlSession) BurnNonce(nonce *big.Int, signatures []byte) (*types.Transaction, error) { return _MultisigControl.Contract.BurnNonce(&_MultisigControl.TransactOpts, nonce, signatures) } -// BurnNonce is a paid mutator transaction binding the contract method 0x5ec51639. +// BurnNonce is a paid mutator transaction binding the contract method 0xc15ce890. // -// Solidity: function burn_nonce(uint256 nonce, bytes signatures) returns() +// Solidity: function burnNonce(uint256 nonce, bytes signatures) returns() func (_MultisigControl *MultisigControlTransactorSession) BurnNonce(nonce *big.Int, signatures []byte) (*types.Transaction, error) { return _MultisigControl.Contract.BurnNonce(&_MultisigControl.TransactOpts, nonce, signatures) } -// RemoveSigner is a paid mutator transaction binding the contract method 0x98c5f73e. +// RemoveSigner is a paid mutator transaction binding the contract method 0xa3dd8ff2. // -// Solidity: function remove_signer(address old_signer, uint256 nonce, bytes signatures) returns() -func (_MultisigControl *MultisigControlTransactor) RemoveSigner(opts *bind.TransactOpts, old_signer common.Address, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _MultisigControl.contract.Transact(opts, "remove_signer", old_signer, nonce, signatures) +// Solidity: function removeSigner(address oldSigner, uint256 nonce, bytes signatures) returns() +func (_MultisigControl *MultisigControlTransactor) RemoveSigner(opts *bind.TransactOpts, oldSigner common.Address, nonce *big.Int, signatures []byte) (*types.Transaction, error) { + return _MultisigControl.contract.Transact(opts, "removeSigner", oldSigner, nonce, signatures) } -// RemoveSigner is a paid mutator transaction binding the contract method 0x98c5f73e. +// RemoveSigner is a paid mutator transaction binding the contract method 0xa3dd8ff2. // -// Solidity: function remove_signer(address old_signer, uint256 nonce, bytes signatures) returns() -func (_MultisigControl *MultisigControlSession) RemoveSigner(old_signer common.Address, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _MultisigControl.Contract.RemoveSigner(&_MultisigControl.TransactOpts, old_signer, nonce, signatures) +// Solidity: function removeSigner(address oldSigner, uint256 nonce, bytes signatures) returns() +func (_MultisigControl *MultisigControlSession) RemoveSigner(oldSigner common.Address, nonce *big.Int, signatures []byte) (*types.Transaction, error) { + return _MultisigControl.Contract.RemoveSigner(&_MultisigControl.TransactOpts, oldSigner, nonce, signatures) } -// RemoveSigner is a paid mutator transaction binding the contract method 0x98c5f73e. +// RemoveSigner is a paid mutator transaction binding the contract method 0xa3dd8ff2. // -// Solidity: function remove_signer(address old_signer, uint256 nonce, bytes signatures) returns() -func (_MultisigControl *MultisigControlTransactorSession) RemoveSigner(old_signer common.Address, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _MultisigControl.Contract.RemoveSigner(&_MultisigControl.TransactOpts, old_signer, nonce, signatures) +// Solidity: function removeSigner(address oldSigner, uint256 nonce, bytes signatures) returns() +func (_MultisigControl *MultisigControlTransactorSession) RemoveSigner(oldSigner common.Address, nonce *big.Int, signatures []byte) (*types.Transaction, error) { + return _MultisigControl.Contract.RemoveSigner(&_MultisigControl.TransactOpts, oldSigner, nonce, signatures) } -// SetThreshold is a paid mutator transaction binding the contract method 0x50ac8df8. +// SetThreshold is a paid mutator transaction binding the contract method 0xee9aea8a. // -// Solidity: function set_threshold(uint16 new_threshold, uint256 nonce, bytes signatures) returns() -func (_MultisigControl *MultisigControlTransactor) SetThreshold(opts *bind.TransactOpts, new_threshold uint16, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _MultisigControl.contract.Transact(opts, "set_threshold", new_threshold, nonce, signatures) +// Solidity: function setThreshold(uint16 newThreshold, uint256 nonce, bytes signatures) returns() +func (_MultisigControl *MultisigControlTransactor) SetThreshold(opts *bind.TransactOpts, newThreshold uint16, nonce *big.Int, signatures []byte) (*types.Transaction, error) { + return _MultisigControl.contract.Transact(opts, "setThreshold", newThreshold, nonce, signatures) } -// SetThreshold is a paid mutator transaction binding the contract method 0x50ac8df8. +// SetThreshold is a paid mutator transaction binding the contract method 0xee9aea8a. // -// Solidity: function set_threshold(uint16 new_threshold, uint256 nonce, bytes signatures) returns() -func (_MultisigControl *MultisigControlSession) SetThreshold(new_threshold uint16, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _MultisigControl.Contract.SetThreshold(&_MultisigControl.TransactOpts, new_threshold, nonce, signatures) +// Solidity: function setThreshold(uint16 newThreshold, uint256 nonce, bytes signatures) returns() +func (_MultisigControl *MultisigControlSession) SetThreshold(newThreshold uint16, nonce *big.Int, signatures []byte) (*types.Transaction, error) { + return _MultisigControl.Contract.SetThreshold(&_MultisigControl.TransactOpts, newThreshold, nonce, signatures) } -// SetThreshold is a paid mutator transaction binding the contract method 0x50ac8df8. +// SetThreshold is a paid mutator transaction binding the contract method 0xee9aea8a. // -// Solidity: function set_threshold(uint16 new_threshold, uint256 nonce, bytes signatures) returns() -func (_MultisigControl *MultisigControlTransactorSession) SetThreshold(new_threshold uint16, nonce *big.Int, signatures []byte) (*types.Transaction, error) { - return _MultisigControl.Contract.SetThreshold(&_MultisigControl.TransactOpts, new_threshold, nonce, signatures) +// Solidity: function setThreshold(uint16 newThreshold, uint256 nonce, bytes signatures) returns() +func (_MultisigControl *MultisigControlTransactorSession) SetThreshold(newThreshold uint16, nonce *big.Int, signatures []byte) (*types.Transaction, error) { + return _MultisigControl.Contract.SetThreshold(&_MultisigControl.TransactOpts, newThreshold, nonce, signatures) } -// VerifySignatures is a paid mutator transaction binding the contract method 0xba73659a. +// VerifySignatures is a paid mutator transaction binding the contract method 0x3fef2806. // -// Solidity: function verify_signatures(bytes signatures, bytes message, uint256 nonce) returns(bool) +// Solidity: function verifySignatures(bytes signatures, bytes message, uint256 nonce) returns(bool) func (_MultisigControl *MultisigControlTransactor) VerifySignatures(opts *bind.TransactOpts, signatures []byte, message []byte, nonce *big.Int) (*types.Transaction, error) { - return _MultisigControl.contract.Transact(opts, "verify_signatures", signatures, message, nonce) + return _MultisigControl.contract.Transact(opts, "verifySignatures", signatures, message, nonce) } -// VerifySignatures is a paid mutator transaction binding the contract method 0xba73659a. +// VerifySignatures is a paid mutator transaction binding the contract method 0x3fef2806. // -// Solidity: function verify_signatures(bytes signatures, bytes message, uint256 nonce) returns(bool) +// Solidity: function verifySignatures(bytes signatures, bytes message, uint256 nonce) returns(bool) func (_MultisigControl *MultisigControlSession) VerifySignatures(signatures []byte, message []byte, nonce *big.Int) (*types.Transaction, error) { return _MultisigControl.Contract.VerifySignatures(&_MultisigControl.TransactOpts, signatures, message, nonce) } -// VerifySignatures is a paid mutator transaction binding the contract method 0xba73659a. +// VerifySignatures is a paid mutator transaction binding the contract method 0x3fef2806. // -// Solidity: function verify_signatures(bytes signatures, bytes message, uint256 nonce) returns(bool) +// Solidity: function verifySignatures(bytes signatures, bytes message, uint256 nonce) returns(bool) func (_MultisigControl *MultisigControlTransactorSession) VerifySignatures(signatures []byte, message []byte, nonce *big.Int) (*types.Transaction, error) { return _MultisigControl.Contract.VerifySignatures(&_MultisigControl.TransactOpts, signatures, message, nonce) } @@ -650,7 +619,7 @@ type MultisigControlSignerAdded struct { // FilterSignerAdded is a free log retrieval operation binding the contract event 0x50999ebf9b59bf3157a58816611976f2d723378ad51457d7b0413209e0cdee59. // -// Solidity: event SignerAdded(address new_signer, uint256 nonce) +// Solidity: event SignerAdded(address newSigner, uint256 nonce) func (_MultisigControl *MultisigControlFilterer) FilterSignerAdded(opts *bind.FilterOpts) (*MultisigControlSignerAddedIterator, error) { logs, sub, err := _MultisigControl.contract.FilterLogs(opts, "SignerAdded") @@ -662,7 +631,7 @@ func (_MultisigControl *MultisigControlFilterer) FilterSignerAdded(opts *bind.Fi // WatchSignerAdded is a free log subscription operation binding the contract event 0x50999ebf9b59bf3157a58816611976f2d723378ad51457d7b0413209e0cdee59. // -// Solidity: event SignerAdded(address new_signer, uint256 nonce) +// Solidity: event SignerAdded(address newSigner, uint256 nonce) func (_MultisigControl *MultisigControlFilterer) WatchSignerAdded(opts *bind.WatchOpts, sink chan<- *MultisigControlSignerAdded) (event.Subscription, error) { logs, sub, err := _MultisigControl.contract.WatchLogs(opts, "SignerAdded") @@ -699,7 +668,7 @@ func (_MultisigControl *MultisigControlFilterer) WatchSignerAdded(opts *bind.Wat // ParseSignerAdded is a log parse operation binding the contract event 0x50999ebf9b59bf3157a58816611976f2d723378ad51457d7b0413209e0cdee59. // -// Solidity: event SignerAdded(address new_signer, uint256 nonce) +// Solidity: event SignerAdded(address newSigner, uint256 nonce) func (_MultisigControl *MultisigControlFilterer) ParseSignerAdded(log types.Log) (*MultisigControlSignerAdded, error) { event := new(MultisigControlSignerAdded) if err := _MultisigControl.contract.UnpackLog(event, "SignerAdded", log); err != nil { @@ -785,7 +754,7 @@ type MultisigControlSignerRemoved struct { // FilterSignerRemoved is a free log retrieval operation binding the contract event 0x99c1d2c0ed8107e4db2e5dbfb10a2549cd2a63cbe39cf99d2adffbcd03954418. // -// Solidity: event SignerRemoved(address old_signer, uint256 nonce) +// Solidity: event SignerRemoved(address oldSigner, uint256 nonce) func (_MultisigControl *MultisigControlFilterer) FilterSignerRemoved(opts *bind.FilterOpts) (*MultisigControlSignerRemovedIterator, error) { logs, sub, err := _MultisigControl.contract.FilterLogs(opts, "SignerRemoved") @@ -797,7 +766,7 @@ func (_MultisigControl *MultisigControlFilterer) FilterSignerRemoved(opts *bind. // WatchSignerRemoved is a free log subscription operation binding the contract event 0x99c1d2c0ed8107e4db2e5dbfb10a2549cd2a63cbe39cf99d2adffbcd03954418. // -// Solidity: event SignerRemoved(address old_signer, uint256 nonce) +// Solidity: event SignerRemoved(address oldSigner, uint256 nonce) func (_MultisigControl *MultisigControlFilterer) WatchSignerRemoved(opts *bind.WatchOpts, sink chan<- *MultisigControlSignerRemoved) (event.Subscription, error) { logs, sub, err := _MultisigControl.contract.WatchLogs(opts, "SignerRemoved") @@ -834,7 +803,7 @@ func (_MultisigControl *MultisigControlFilterer) WatchSignerRemoved(opts *bind.W // ParseSignerRemoved is a log parse operation binding the contract event 0x99c1d2c0ed8107e4db2e5dbfb10a2549cd2a63cbe39cf99d2adffbcd03954418. // -// Solidity: event SignerRemoved(address old_signer, uint256 nonce) +// Solidity: event SignerRemoved(address oldSigner, uint256 nonce) func (_MultisigControl *MultisigControlFilterer) ParseSignerRemoved(log types.Log) (*MultisigControlSignerRemoved, error) { event := new(MultisigControlSignerRemoved) if err := _MultisigControl.contract.UnpackLog(event, "SignerRemoved", log); err != nil { @@ -920,7 +889,7 @@ type MultisigControlThresholdSet struct { // FilterThresholdSet is a free log retrieval operation binding the contract event 0xf6d24c23627520a3b70e5dc66aa1249844b4bb407c2c153d9000a2b14a1e3c11. // -// Solidity: event ThresholdSet(uint16 new_threshold, uint256 nonce) +// Solidity: event ThresholdSet(uint16 newThreshold, uint256 nonce) func (_MultisigControl *MultisigControlFilterer) FilterThresholdSet(opts *bind.FilterOpts) (*MultisigControlThresholdSetIterator, error) { logs, sub, err := _MultisigControl.contract.FilterLogs(opts, "ThresholdSet") @@ -932,7 +901,7 @@ func (_MultisigControl *MultisigControlFilterer) FilterThresholdSet(opts *bind.F // WatchThresholdSet is a free log subscription operation binding the contract event 0xf6d24c23627520a3b70e5dc66aa1249844b4bb407c2c153d9000a2b14a1e3c11. // -// Solidity: event ThresholdSet(uint16 new_threshold, uint256 nonce) +// Solidity: event ThresholdSet(uint16 newThreshold, uint256 nonce) func (_MultisigControl *MultisigControlFilterer) WatchThresholdSet(opts *bind.WatchOpts, sink chan<- *MultisigControlThresholdSet) (event.Subscription, error) { logs, sub, err := _MultisigControl.contract.WatchLogs(opts, "ThresholdSet") @@ -969,7 +938,7 @@ func (_MultisigControl *MultisigControlFilterer) WatchThresholdSet(opts *bind.Wa // ParseThresholdSet is a log parse operation binding the contract event 0xf6d24c23627520a3b70e5dc66aa1249844b4bb407c2c153d9000a2b14a1e3c11. // -// Solidity: event ThresholdSet(uint16 new_threshold, uint256 nonce) +// Solidity: event ThresholdSet(uint16 newThreshold, uint256 nonce) func (_MultisigControl *MultisigControlFilterer) ParseThresholdSet(log types.Log) (*MultisigControlThresholdSet, error) { event := new(MultisigControlThresholdSet) if err := _MultisigControl.contract.UnpackLog(event, "ThresholdSet", log); err != nil { From 62e04ab77fb95f49b76cb5d19a3258f261ef69eb Mon Sep 17 00:00:00 2001 From: Jeremy Letang Date: Thu, 15 Aug 2024 15:11:03 +0100 Subject: [PATCH 4/8] chore: fix test and use same signing scheme accross bridges Signed-off-by: Jeremy Letang --- core/assets/erc20/erc20.go | 6 +++--- core/assets/erc20/erc20_test.go | 6 ++---- core/bridges/erc20_asset_pool_test.go | 4 ++-- core/bridges/erc20_logic_test.go | 12 ++++++------ core/bridges/erc20_multisigcontrol_test.go | 12 ++++++------ core/validators/signatures.go | 16 ++++++++-------- 6 files changed, 27 insertions(+), 29 deletions(-) diff --git a/core/assets/erc20/erc20.go b/core/assets/erc20/erc20.go index 7377f164189..c0e02483c68 100644 --- a/core/assets/erc20/erc20.go +++ b/core/assets/erc20/erc20.go @@ -145,7 +145,7 @@ func (e *ERC20) SignListAsset() (msg []byte, sig []byte, err error) { } source := e.asset.Details.GetERC20() - bundle, err := bridges.NewERC20Logic(e.wallet, bridgeAddress, e.chainID, e.ethClient.IsEthereum()). + bundle, err := bridges.NewERC20Logic(e.wallet, bridgeAddress, e.chainID, false). ListAsset(e.address, e.asset.ID, source.LifetimeLimit, source.WithdrawThreshold, nonce) if err != nil { return nil, nil, err @@ -156,7 +156,7 @@ func (e *ERC20) SignListAsset() (msg []byte, sig []byte, err error) { func (e *ERC20) SignSetAssetLimits(nonce *num.Uint, lifetimeLimit *num.Uint, withdrawThreshold *num.Uint) (msg []byte, sig []byte, err error) { bridgeAddress := e.ethClient.CollateralBridgeAddress().Hex() - bundle, err := bridges.NewERC20Logic(e.wallet, bridgeAddress, e.chainID, e.ethClient.IsEthereum()). + bundle, err := bridges.NewERC20Logic(e.wallet, bridgeAddress, e.chainID, false). SetAssetLimits(e.address, lifetimeLimit, withdrawThreshold, nonce) if err != nil { return nil, nil, err @@ -173,7 +173,7 @@ func (e *ERC20) SignWithdrawal( ) (msg []byte, sig []byte, err error) { nonce, _ := num.UintFromBig(withdrawRef) bridgeAddress := e.ethClient.CollateralBridgeAddress().Hex() - bundle, err := bridges.NewERC20Logic(e.wallet, bridgeAddress, e.chainID, e.ethClient.IsEthereum()). + bundle, err := bridges.NewERC20Logic(e.wallet, bridgeAddress, e.chainID, false). WithdrawAsset(e.address, amount, ethPartyAddress, now, nonce) if err != nil { return nil, nil, err diff --git a/core/assets/erc20/erc20_test.go b/core/assets/erc20/erc20_test.go index 252dd637af6..129dc4ad689 100644 --- a/core/assets/erc20/erc20_test.go +++ b/core/assets/erc20/erc20_test.go @@ -99,8 +99,7 @@ func testWithdrawAsset(t *testing.T) { assert.NotNil(t, msg) assert.NotNil(t, sig) assert.True(t, verifySignature(msg, sig)) - assert.Equal(t, - "68154aa30a66d8546a338e2f50ac3e0bde710975755562e12c8508c5e4e43aa741b98d1f7384d8cf6a33e86fc1ed6f833ad627a9fb9b5a56aaaf0024511a2402", + assert.Equal(t, "4b7423e2f005a25150f56fdcea72ccabfb466d94a4a3d1aa3541eed2f1292deabd9de643ccc00d64561806c302c8c9773a028fd0e2778e2b2a6f6b3948c95b06", hex.EncodeToString(sig), ) } @@ -113,8 +112,7 @@ func testListAsset(t *testing.T) { assert.NotNil(t, msg) assert.NotNil(t, sig) assert.True(t, verifySignature(msg, sig)) - assert.Equal(t, - "e6048f597145d7d1e1ddfe41abf9ae950e9b6e93598c8b1e4fe2d9af8493b240a4d85322eb40c6bf76b0eac2481fa42014956f10a38675769b0c995e191d650b", + assert.Equal(t, "125419bebd3623144c1da43d9cc32fc7cab4b870ade32eda8e2a3b175c22b9dac556c47c195bf44f7d7114964411235e690294683cf252f005809f49c4536400", hex.EncodeToString(sig), ) } diff --git a/core/bridges/erc20_asset_pool_test.go b/core/bridges/erc20_asset_pool_test.go index d93162c5b73..de4394bf740 100644 --- a/core/bridges/erc20_asset_pool_test.go +++ b/core/bridges/erc20_asset_pool_test.go @@ -37,12 +37,12 @@ func TestAssetPoolSetBridgeAddress(t *testing.T) { { name: "v1 scheme", v1: true, - expected: "2488c05dd36a754db037f22a1d649109573e299a3c135efdb81c6f64632b26101c0b4ce19c896d370abae8d457682b21a4a3322f48380f29932b311b6ab47707", + expected: "d0d9cfac8f805bd28a8c534069157d900b8c60d29580ebbee73ad5be71d1d2c1b20d5f10339b0ff570cea9f3422c1c599bd76b99c37cd19c8a3901bd75603404", }, { name: "v2 scheme", v1: false, - expected: "4b01dfa1a3b77ecc624f678805a74418862cbcb1e32b929e7dce7fbbfa73806ec1f5db1d40d28f4ebcb09d83f59815f04438142612ebc1683158a23c9fbf3a0c", + expected: "52e2d9005416e7afe750b4fcf69d9e8e0fe2809127f87c327f10cfa5e76da55069ef723cdc07bafcfb4e44798f2d1b52cf618787cbccf19c6c8f2d1cd0530906", }, } diff --git a/core/bridges/erc20_logic_test.go b/core/bridges/erc20_logic_test.go index e1d97c24674..aa88e5de414 100644 --- a/core/bridges/erc20_logic_test.go +++ b/core/bridges/erc20_logic_test.go @@ -47,12 +47,12 @@ func testListAsset(t *testing.T) { { name: "v1 scheme", v1: true, - expected: "7df8b88552c2f981e64b13f1ce3ee5dcb71e8f59ec057010b7b469120afff7d479f234714785cfc605230dfb2d17f9cc7858143196a13f357ce008e3f3f78a00", + expected: "a39fa614b7b4bb0cf5819840164ca48472d1bda98a49053f891dfb004f053d2c29a60df5423927dad057f1d3d6a04c6e6d82f1bf128db5d5a7a01bcc8b70ab0e", }, { name: "v2 scheme", v1: false, - expected: "03d8d648da4402bebd096f067cebf3e3b70f2c4e1cad6ca9eb757f554b6ca9efb84010887aeef543cf72cb5d78a741d0683befc6f5e0ca2d0347832232af610c", + expected: "d6810cef5534e232396ab0c572ca079fa41f728a20d98da3bfb59b81f183a96adee103d5f94348e9a8ce823446392109bc8bf10a27076cd0e232a1f808e0810c", }, } @@ -86,12 +86,12 @@ func testRemoveAsset(t *testing.T) { { name: "v1 scheme", v1: true, - expected: "9012eb20763500caf1a4d7640470449c7220872d7136e17c70231c269051cf80e08760d60850578ebf494e24610a54225c7d994f15f57d9f451e8f717eb3f904", + expected: "a1c183d1c076c518297fa75f0fa3fddf6e5e83e76800a2efdbce36be12d4a23e2b61bce8097fea701f5a274ec89d70f92ffdd83a82a4d2c65f82b905109c3d0f", }, { name: "v2 scheme", v1: false, - expected: "aa07e175a9a4c3dcb0f5dcbd24cc6636e699ee6a1daa9a80267cec8f0be130b86465fa56296743879f56d94d6be64a0b10b76bcee40d0d09ec078b2814b89500", + expected: "f11d5e0fa1c68edd1b43db30a0d02aaff8cef26c6140d30a4570615fa12a0e4e858a30b73a3763590a88614f366e9f433978653445b901e058dc07fe77595901", }, } @@ -122,12 +122,12 @@ func testWithdrawAsset(t *testing.T) { { name: "v1 scheme", v1: true, - expected: "0ff08571ab504acdce063a5a5a00dd8878d64ccb09ea6887aacd1fd41b517cd13f4e12edfaa4d06fef5d24087ba9e7c980532daa0a6f1fa329b8d75961f4ab03", + expected: "8c70e1bb8a74a9112ef475cdca37f63149453f5d3729164847aabf329c8932774922bb3cf41dfd7112fa8a0bdbe3f845b170e8f38406ae51fd7da00177dbc807", }, { name: "v2 scheme", v1: false, - expected: "9f2d7ec17059fd5d4697337a46899f73681dece748ea1342b3be24b5f34f0b934ad448f7e9bd3a113102d46d8433dd26458cf06c3fd7a1622d086faab1a77b08", + expected: "057bcb000d6961d4c8cd67f5a8a8ffac501f7077c23dcb4aab0127f1f4530e865d8627bccfb71559b9ddca0cb938b96c709fdf419d2f350ec9ab6416b888c70f", }, } diff --git a/core/bridges/erc20_multisigcontrol_test.go b/core/bridges/erc20_multisigcontrol_test.go index 998b24e760d..1e40e318540 100644 --- a/core/bridges/erc20_multisigcontrol_test.go +++ b/core/bridges/erc20_multisigcontrol_test.go @@ -49,12 +49,12 @@ func testSetThreshold(t *testing.T) { { name: "v1 scheme", v1: true, - expected: "a2c61b473f15a1729e8593d65748e7a9813102e0d7304598af556525206db599fb79b9750349c6cb564a2f3ecdf233dd19b1598302e0cb91218adff1c609ac09", + expected: "537eee3a9151d3f9a0a076c9521d3ca014efaefb20fd9be1b36c1e2475897f82b79b0de759b24a52a1a66c272c85628acd182a3cef2ae92b91a595f8d8123c06", }, { name: "v2 scheme", v1: false, - expected: "aa79559d350a9b139d04d7883b7ec26b3948bba503fddcc55f8a868a69ef48dad32ffb4233a041401e482e71232fc339aa6deffda31bcd978596a6a0a6d64b0c", + expected: "e1bc702b74ca31f08d1d3534b6b147f641cf94713a809dd5b7ed5cb6e61b1892f1d2327ef14194bac488f41a661b805c6ca2f3daba7108eee46949229a126c0e", }, } @@ -84,12 +84,12 @@ func testAddSigner(t *testing.T) { { name: "v1 scheme", v1: true, - expected: "7bdc018935610f23667b31d4eee248160ab39caa1e70ad20da49bf8971d5a16b30f71a09d9aaf5b532defdb7710d85c226e98cb90a49bc4b4401b33f3c5a1601", + expected: "52201353f14009c7638a6460af9340871de8d34a198d4957a142aa8098922829d4963eff0e6951fdecfe04566c865225b4c41dd2393b40d4de76fb9819142d0c", }, { name: "v2 scheme", v1: false, - expected: "f86654970ab8aa7b8f1ac72cd1349cd667acd21b7ff2078653d488f3ab65a446df1b4878692d7f07e2f0111bed069fd7cf5c32f07ae88ed059624480cd0edd07", + expected: "67e5a71935eaf134f4cbfadbefa96e510c97d6198accfcec76b046ee46ecd59fe4ae6f371973a8f4be7a67dd20b38c421b0f24061f1c95fe1e9322d04997e407", }, } @@ -120,12 +120,12 @@ func testRemoveSigner(t *testing.T) { { name: "v1 scheme", v1: true, - expected: "98ea2303c68dbb0a88bdb7dad8c6e2db9698cd992667399a378e682dbdf16e74a9d304a32e36b48de81c0e99449a7a37c1a7ef94af1e85aa88a808f8d7126c0c", + expected: "4bf8057aa87a4ec5049766b0eb40426c9ba0464cda2ce203d16c590f3153657689143161908923b0c6ab32dec57c4c5aca7e4aaef24b8d22362413908868ea00", }, { name: "v2 scheme", v1: false, - expected: "e17efd360ce488a7299175473f257544391e3823db314e31cc69e6ae2730ead994e89bfab5813ea1379c4b6e499d131308ebe516ba6142f9f77479083685020b", + expected: "648f08b810bcbe589b79f7476f48de6e2c3528fbb059427f3876745dec51128952210d5e509e307d0dc2f6ba67f65bda7a28d96a8d31a365d04398cdde78150b", }, } diff --git a/core/validators/signatures.go b/core/validators/signatures.go index 287a4860a3a..7f0ab56f75a 100644 --- a/core/validators/signatures.go +++ b/core/validators/signatures.go @@ -179,12 +179,12 @@ func (s *ERC20Signatures) offerValidatorAddedSignatures(resID string) []byte { s.log.Panic("expected added signature but got removed signature instead", logging.String("ethereumAddress", sig.EthAddress)) } - isBridge, isEthereum := s.isBridge(sig.chainID) + isBridge, _ := s.isBridge(sig.chainID) if !isBridge { s.log.Panic("unexpected bridge chainID", logging.String("chain-id", sig.chainID)) } - signature, err := bridges.NewERC20MultiSigControl(s.signer, sig.chainID, isEthereum).AddSigner(sig.EthAddress, sig.SubmitterAddress, sig.Nonce.Clone()) + signature, err := bridges.NewERC20MultiSigControl(s.signer, sig.chainID, false).AddSigner(sig.EthAddress, sig.SubmitterAddress, sig.Nonce.Clone()) if err != nil { s.log.Panic("could not sign remove signer event, wallet not configured properly", logging.Error(err)) @@ -207,12 +207,12 @@ func (s *ERC20Signatures) offerValidatorRemovedSignatures(resID string) []byte { s.log.Panic("expected removed signature but got added signature instead", logging.String("ethereumAddress", sig.EthAddress)) } - isBridge, isEthereum := s.isBridge(sig.chainID) + isBridge, _ := s.isBridge(sig.chainID) if !isBridge { s.log.Panic("unexpected bridge chainID", logging.String("chain-id", sig.chainID)) } - signature, err := bridges.NewERC20MultiSigControl(s.signer, sig.chainID, isEthereum).RemoveSigner(sig.EthAddress, sig.SubmitterAddress, sig.Nonce.Clone()) + signature, err := bridges.NewERC20MultiSigControl(s.signer, sig.chainID, false).RemoveSigner(sig.EthAddress, sig.SubmitterAddress, sig.Nonce.Clone()) if err != nil { s.log.Panic("could not sign remove signer event, wallet not configured properly", logging.Error(err)) @@ -335,7 +335,7 @@ func (s *ERC20Signatures) EmitValidatorAddedSignatures(ctx context.Context, subm return ErrNoPendingSignaturesForNodeID } - isBridge, isEthereum := s.isBridge(chainID) + isBridge, _ := s.isBridge(chainID) if !isBridge { return ErrUnknownChainID } @@ -357,7 +357,7 @@ func (s *ERC20Signatures) EmitValidatorAddedSignatures(ctx context.Context, subm } if s.isValidatorSetup { - signature, err := bridges.NewERC20MultiSigControl(s.signer, chainID, isEthereum).AddSigner(pending.EthAddress, submitter, nonce) + signature, err := bridges.NewERC20MultiSigControl(s.signer, chainID, false).AddSigner(pending.EthAddress, submitter, nonce) if err != nil { s.log.Panic("could not sign remove signer event, wallet not configured properly", logging.Error(err)) @@ -398,7 +398,7 @@ func (s *ERC20Signatures) EmitValidatorRemovedSignatures(ctx context.Context, su return ErrNoPendingSignaturesForNodeID } - isBridge, isEthereum := s.isBridge(chainID) + isBridge, _ := s.isBridge(chainID) if !isBridge { return ErrUnknownChainID } @@ -419,7 +419,7 @@ func (s *ERC20Signatures) EmitValidatorRemovedSignatures(ctx context.Context, su } if s.isValidatorSetup { - signature, err := bridges.NewERC20MultiSigControl(s.signer, chainID, isEthereum).RemoveSigner(pending.EthAddress, submitter, nonce) + signature, err := bridges.NewERC20MultiSigControl(s.signer, chainID, false).RemoveSigner(pending.EthAddress, submitter, nonce) if err != nil { s.log.Panic("could not sign remove signer event, wallet not configured properly", logging.Error(err)) From 939926c92304a306299c2adfd8aed4cff090c3cb Mon Sep 17 00:00:00 2001 From: Jeremy Letang Date: Thu, 15 Aug 2024 15:34:48 +0100 Subject: [PATCH 5/8] chore: linter Signed-off-by: Jeremy Letang --- core/validators/signatures.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/validators/signatures.go b/core/validators/signatures.go index 7f0ab56f75a..94149906730 100644 --- a/core/validators/signatures.go +++ b/core/validators/signatures.go @@ -132,12 +132,12 @@ type NodeIDAddress struct { } // isBridge returns whether the given chainID corresponds to one of the bridges, and returns if it is the Ethereum bridge. -func (s *ERC20Signatures) isBridge(chainID string) (isBridge bool, isEthereum bool) { +func (s *ERC20Signatures) isBridge(chainID string) (isBridge bool) { switch chainID { case s.primaryMultisig.ChainID(): - isBridge, isEthereum = true, true + isBridge = true case s.secondaryMultisig.ChainID(): - isBridge, isEthereum = true, false + isBridge = true } return } @@ -179,7 +179,7 @@ func (s *ERC20Signatures) offerValidatorAddedSignatures(resID string) []byte { s.log.Panic("expected added signature but got removed signature instead", logging.String("ethereumAddress", sig.EthAddress)) } - isBridge, _ := s.isBridge(sig.chainID) + isBridge := s.isBridge(sig.chainID) if !isBridge { s.log.Panic("unexpected bridge chainID", logging.String("chain-id", sig.chainID)) } @@ -207,7 +207,7 @@ func (s *ERC20Signatures) offerValidatorRemovedSignatures(resID string) []byte { s.log.Panic("expected removed signature but got added signature instead", logging.String("ethereumAddress", sig.EthAddress)) } - isBridge, _ := s.isBridge(sig.chainID) + isBridge := s.isBridge(sig.chainID) if !isBridge { s.log.Panic("unexpected bridge chainID", logging.String("chain-id", sig.chainID)) } @@ -335,7 +335,7 @@ func (s *ERC20Signatures) EmitValidatorAddedSignatures(ctx context.Context, subm return ErrNoPendingSignaturesForNodeID } - isBridge, _ := s.isBridge(chainID) + isBridge := s.isBridge(chainID) if !isBridge { return ErrUnknownChainID } @@ -398,7 +398,7 @@ func (s *ERC20Signatures) EmitValidatorRemovedSignatures(ctx context.Context, su return ErrNoPendingSignaturesForNodeID } - isBridge, _ := s.isBridge(chainID) + isBridge := s.isBridge(chainID) if !isBridge { return ErrUnknownChainID } From 6f4764a6a47f02635e3f4d58b3080c5b07ff813b Mon Sep 17 00:00:00 2001 From: wwestgarth Date: Fri, 16 Aug 2024 13:22:08 +0100 Subject: [PATCH 6/8] chore: update eventnames in filterer --- core/evtforward/ethereum/filterer.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/evtforward/ethereum/filterer.go b/core/evtforward/ethereum/filterer.go index aed7c46d53d..43dc2b7ebcc 100644 --- a/core/evtforward/ethereum/filterer.go +++ b/core/evtforward/ethereum/filterer.go @@ -42,18 +42,18 @@ import ( const ( logFiltererLogger = "log-filterer" - eventAssetListed = "Asset_Listed" - eventAssetRemoved = "Asset_Removed" - eventAssetDeposited = "Asset_Deposited" - eventAssetWithdrawn = "Asset_Withdrawn" + eventAssetListed = "AssetListed" + eventAssetRemoved = "AssetRemoved" + eventAssetDeposited = "AssetDeposited" + eventAssetWithdrawn = "AssetWithdrawn" eventStakeDeposited = "StakeDeposited" eventStakeRemoved = "StakeRemoved" eventSignerAdded = "SignerAdded" eventSignerRemoved = "SignerRemoved" eventThresholdSet = "ThresholdSet" - eventAssetLimitsUpdated = "Asset_Limits_Updated" - eventBridgeStopped = "Bridge_Stopped" - eventBridgeResumed = "Bridge_Resumed" + eventAssetLimitsUpdated = "AssetLimitsUpdated" + eventBridgeStopped = "BridgeStopped" + eventBridgeResumed = "BridgeResumed" ) // Assets ... From 07ef744d41cb6e2c35edbb3b375f83ce83cf569a Mon Sep 17 00:00:00 2001 From: wwestgarth Date: Fri, 16 Aug 2024 14:18:07 +0100 Subject: [PATCH 7/8] fix: reset proto-netparam before loading JSON into it --- core/netparams/values.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/netparams/values.go b/core/netparams/values.go index ca5ec81ca1d..6f9b7bff49b 100644 --- a/core/netparams/values.go +++ b/core/netparams/values.go @@ -747,6 +747,10 @@ func (j *JSON) GetDispatch() func(context.Context, interface{}) error { // there can't be errors here, as all dispatcher // should have been check earlier when being register fn := rawfn.(func(context.Context, interface{}) error) + + // reset the proto struct before unmarshalling the JSON into it + j.value.Reset() + json.Unmarshal([]byte(j.rawval), j.value) return fn(ctx, j.value) } From a96f44139125ee3f1cd56e8b38c707dc0b7f2acf Mon Sep 17 00:00:00 2001 From: wwestgarth Date: Fri, 16 Aug 2024 14:19:32 +0100 Subject: [PATCH 8/8] chore: disable bridge contract bytecode check --- core/client/eth/client.go | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/core/client/eth/client.go b/core/client/eth/client.go index faae6b04690..1150fb63144 100644 --- a/core/client/eth/client.go +++ b/core/client/eth/client.go @@ -96,14 +96,6 @@ func (c *PrimaryClient) UpdateEthereumConfig(ctx context.Context, ethConfig *typ return fmt.Errorf("updated chain ID does not match the one set during start up, expected %v got %v", ethConfig.ChainID(), chainID) } - if err := c.verifyCollateralContract(ctx, ethConfig); err != nil { - return fmt.Errorf("failed to verify collateral bridge contract: %w", err) - } - - if err := c.verifyMultisigContract(ctx, ethConfig); err != nil { - return fmt.Errorf("failed to verify multisig control contract: %w", err) - } - c.ethConfig = ethConfig return nil @@ -171,19 +163,3 @@ func (c *PrimaryClient) VerifyContract(ctx context.Context, address ethcommon.Ad return nil } - -func (c *PrimaryClient) verifyCollateralContract(ctx context.Context, ethConfig *types.EthereumConfig) error { - if address := ethConfig.CollateralBridge(); address.HasAddress() { - return c.VerifyContract(ctx, address.Address(), ContractHashes["collateral"]) - } - - return nil -} - -func (c *PrimaryClient) verifyMultisigContract(ctx context.Context, ethConfig *types.EthereumConfig) error { - if address := ethConfig.MultiSigControl(); address.HasAddress() { - return c.VerifyContract(ctx, address.Address(), ContractHashes["multisig"]) - } - - return nil -}