// Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. package mocktokenminter import ( "errors" "math/big" "strings" ethereum "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/event" ) // Reference imports to suppress errors if they are not otherwise used. var ( _ = errors.New _ = big.NewInt _ = strings.NewReader _ = ethereum.NotFound _ = bind.Bind _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription ) // IERC20MetaData contains all meta data concerning the IERC20 contract. var IERC20MetaData = &bind.MetaData{ ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", Sigs: map[string]string{ "dd62ed3e": "allowance(address,address)", "095ea7b3": "approve(address,uint256)", "70a08231": "balanceOf(address)", "18160ddd": "totalSupply()", "a9059cbb": "transfer(address,uint256)", "23b872dd": "transferFrom(address,address,uint256)", }, } // IERC20ABI is the input ABI used to generate the binding from. // Deprecated: Use IERC20MetaData.ABI instead. var IERC20ABI = IERC20MetaData.ABI // Deprecated: Use IERC20MetaData.Sigs instead. // IERC20FuncSigs maps the 4-byte function signature to its string representation. var IERC20FuncSigs = IERC20MetaData.Sigs // IERC20 is an auto generated Go binding around an Ethereum contract. type IERC20 struct { IERC20Caller // Read-only binding to the contract IERC20Transactor // Write-only binding to the contract IERC20Filterer // Log filterer for contract events } // IERC20Caller is an auto generated read-only Go binding around an Ethereum contract. type IERC20Caller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // IERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. type IERC20Transactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // IERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. type IERC20Filterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // IERC20Session is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. type IERC20Session struct { Contract *IERC20 // Generic contract binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // IERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. type IERC20CallerSession struct { Contract *IERC20Caller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } // IERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. type IERC20TransactorSession struct { Contract *IERC20Transactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // IERC20Raw is an auto generated low-level Go binding around an Ethereum contract. type IERC20Raw struct { Contract *IERC20 // Generic contract binding to access the raw methods on } // IERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. type IERC20CallerRaw struct { Contract *IERC20Caller // Generic read-only contract binding to access the raw methods on } // IERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. type IERC20TransactorRaw struct { Contract *IERC20Transactor // Generic write-only contract binding to access the raw methods on } // NewIERC20 creates a new instance of IERC20, bound to a specific deployed contract. func NewIERC20(address common.Address, backend bind.ContractBackend) (*IERC20, error) { contract, err := bindIERC20(address, backend, backend, backend) if err != nil { return nil, err } return &IERC20{IERC20Caller: IERC20Caller{contract: contract}, IERC20Transactor: IERC20Transactor{contract: contract}, IERC20Filterer: IERC20Filterer{contract: contract}}, nil } // NewIERC20Caller creates a new read-only instance of IERC20, bound to a specific deployed contract. func NewIERC20Caller(address common.Address, caller bind.ContractCaller) (*IERC20Caller, error) { contract, err := bindIERC20(address, caller, nil, nil) if err != nil { return nil, err } return &IERC20Caller{contract: contract}, nil } // NewIERC20Transactor creates a new write-only instance of IERC20, bound to a specific deployed contract. func NewIERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC20Transactor, error) { contract, err := bindIERC20(address, nil, transactor, nil) if err != nil { return nil, err } return &IERC20Transactor{contract: contract}, nil } // NewIERC20Filterer creates a new log filterer instance of IERC20, bound to a specific deployed contract. func NewIERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC20Filterer, error) { contract, err := bindIERC20(address, nil, nil, filterer) if err != nil { return nil, err } return &IERC20Filterer{contract: contract}, nil } // bindIERC20 binds a generic wrapper to an already deployed contract. func bindIERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { parsed, err := abi.JSON(strings.NewReader(IERC20ABI)) if err != nil { return nil, err } return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. func (_IERC20 *IERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _IERC20.Contract.IERC20Caller.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. func (_IERC20 *IERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _IERC20.Contract.IERC20Transactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_IERC20 *IERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _IERC20.Contract.IERC20Transactor.contract.Transact(opts, method, params...) } // Call invokes the (constant) contract method with params as input values and // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. func (_IERC20 *IERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _IERC20.Contract.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. func (_IERC20 *IERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _IERC20.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_IERC20 *IERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _IERC20.Contract.contract.Transact(opts, method, params...) } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) func (_IERC20 *IERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { var out []interface{} err := _IERC20.contract.Call(opts, &out, "allowance", owner, spender) if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) func (_IERC20 *IERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) func (_IERC20 *IERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) func (_IERC20 *IERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { var out []interface{} err := _IERC20.contract.Call(opts, &out, "balanceOf", account) if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) func (_IERC20 *IERC20Session) BalanceOf(account common.Address) (*big.Int, error) { return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) func (_IERC20 *IERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_IERC20 *IERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _IERC20.contract.Call(opts, &out, "totalSupply") if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_IERC20 *IERC20Session) TotalSupply() (*big.Int, error) { return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_IERC20 *IERC20CallerSession) TotalSupply() (*big.Int, error) { return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 amount) returns(bool) func (_IERC20 *IERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { return _IERC20.contract.Transact(opts, "approve", spender, amount) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 amount) returns(bool) func (_IERC20 *IERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 amount) returns(bool) func (_IERC20 *IERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 amount) returns(bool) func (_IERC20 *IERC20Transactor) Transfer(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { return _IERC20.contract.Transact(opts, "transfer", to, amount) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 amount) returns(bool) func (_IERC20 *IERC20Session) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error) { return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, to, amount) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 amount) returns(bool) func (_IERC20 *IERC20TransactorSession) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error) { return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, to, amount) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool) func (_IERC20 *IERC20Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { return _IERC20.contract.Transact(opts, "transferFrom", from, to, amount) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool) func (_IERC20 *IERC20Session) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, from, to, amount) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool) func (_IERC20 *IERC20TransactorSession) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, from, to, amount) } // IERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC20 contract. type IERC20ApprovalIterator struct { Event *IERC20Approval // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data logs chan types.Log // Log channel receiving the found contract events sub ethereum.Subscription // Subscription for errors, completion and termination done bool // Whether the subscription completed delivering logs fail error // Occurred error to stop iteration } // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. func (it *IERC20ApprovalIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false } // If the iterator completed, deliver directly whatever's available if it.done { select { case log := <-it.logs: it.Event = new(IERC20Approval) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false } it.Event.Raw = log return true default: return false } } // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: it.Event = new(IERC20Approval) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false } it.Event.Raw = log return true case err := <-it.sub.Err(): it.done = true it.fail = err return it.Next() } } // Error returns any retrieval or parsing error occurred during filtering. func (it *IERC20ApprovalIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *IERC20ApprovalIterator) Close() error { it.sub.Unsubscribe() return nil } // IERC20Approval represents a Approval event raised by the IERC20 contract. type IERC20Approval struct { Owner common.Address Spender common.Address Value *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_IERC20 *IERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*IERC20ApprovalIterator, error) { var ownerRule []interface{} for _, ownerItem := range owner { ownerRule = append(ownerRule, ownerItem) } var spenderRule []interface{} for _, spenderItem := range spender { spenderRule = append(spenderRule, spenderItem) } logs, sub, err := _IERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) if err != nil { return nil, err } return &IERC20ApprovalIterator{contract: _IERC20.contract, event: "Approval", logs: logs, sub: sub}, nil } // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_IERC20 *IERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { var ownerRule []interface{} for _, ownerItem := range owner { ownerRule = append(ownerRule, ownerItem) } var spenderRule []interface{} for _, spenderItem := range spender { spenderRule = append(spenderRule, spenderItem) } logs, sub, err := _IERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) if err != nil { return nil, err } return event.NewSubscription(func(quit <-chan struct{}) error { defer sub.Unsubscribe() for { select { case log := <-logs: // New log arrived, parse the event and forward to the user event := new(IERC20Approval) if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil { return err } event.Raw = log select { case sink <- event: case err := <-sub.Err(): return err case <-quit: return nil } case err := <-sub.Err(): return err case <-quit: return nil } } }), nil } // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_IERC20 *IERC20Filterer) ParseApproval(log types.Log) (*IERC20Approval, error) { event := new(IERC20Approval) if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil { return nil, err } event.Raw = log return event, nil } // IERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC20 contract. type IERC20TransferIterator struct { Event *IERC20Transfer // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data logs chan types.Log // Log channel receiving the found contract events sub ethereum.Subscription // Subscription for errors, completion and termination done bool // Whether the subscription completed delivering logs fail error // Occurred error to stop iteration } // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. func (it *IERC20TransferIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false } // If the iterator completed, deliver directly whatever's available if it.done { select { case log := <-it.logs: it.Event = new(IERC20Transfer) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false } it.Event.Raw = log return true default: return false } } // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: it.Event = new(IERC20Transfer) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false } it.Event.Raw = log return true case err := <-it.sub.Err(): it.done = true it.fail = err return it.Next() } } // Error returns any retrieval or parsing error occurred during filtering. func (it *IERC20TransferIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *IERC20TransferIterator) Close() error { it.sub.Unsubscribe() return nil } // IERC20Transfer represents a Transfer event raised by the IERC20 contract. type IERC20Transfer struct { From common.Address To common.Address Value *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_IERC20 *IERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IERC20TransferIterator, error) { var fromRule []interface{} for _, fromItem := range from { fromRule = append(fromRule, fromItem) } var toRule []interface{} for _, toItem := range to { toRule = append(toRule, toItem) } logs, sub, err := _IERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) if err != nil { return nil, err } return &IERC20TransferIterator{contract: _IERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil } // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_IERC20 *IERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { var fromRule []interface{} for _, fromItem := range from { fromRule = append(fromRule, fromItem) } var toRule []interface{} for _, toItem := range to { toRule = append(toRule, toItem) } logs, sub, err := _IERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) if err != nil { return nil, err } return event.NewSubscription(func(quit <-chan struct{}) error { defer sub.Unsubscribe() for { select { case log := <-logs: // New log arrived, parse the event and forward to the user event := new(IERC20Transfer) if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil { return err } event.Raw = log select { case sink <- event: case err := <-sub.Err(): return err case <-quit: return nil } case err := <-sub.Err(): return err case <-quit: return nil } } }), nil } // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_IERC20 *IERC20Filterer) ParseTransfer(log types.Log) (*IERC20Transfer, error) { event := new(IERC20Transfer) if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil { return nil, err } event.Raw = log return event, nil } // IMintBurnTokenMetaData contains all meta data concerning the IMintBurnToken contract. var IMintBurnTokenMetaData = &bind.MetaData{ ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", Sigs: map[string]string{ "dd62ed3e": "allowance(address,address)", "095ea7b3": "approve(address,uint256)", "70a08231": "balanceOf(address)", "42966c68": "burn(uint256)", "40c10f19": "mint(address,uint256)", "18160ddd": "totalSupply()", "a9059cbb": "transfer(address,uint256)", "23b872dd": "transferFrom(address,address,uint256)", }, } // IMintBurnTokenABI is the input ABI used to generate the binding from. // Deprecated: Use IMintBurnTokenMetaData.ABI instead. var IMintBurnTokenABI = IMintBurnTokenMetaData.ABI // Deprecated: Use IMintBurnTokenMetaData.Sigs instead. // IMintBurnTokenFuncSigs maps the 4-byte function signature to its string representation. var IMintBurnTokenFuncSigs = IMintBurnTokenMetaData.Sigs // IMintBurnToken is an auto generated Go binding around an Ethereum contract. type IMintBurnToken struct { IMintBurnTokenCaller // Read-only binding to the contract IMintBurnTokenTransactor // Write-only binding to the contract IMintBurnTokenFilterer // Log filterer for contract events } // IMintBurnTokenCaller is an auto generated read-only Go binding around an Ethereum contract. type IMintBurnTokenCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // IMintBurnTokenTransactor is an auto generated write-only Go binding around an Ethereum contract. type IMintBurnTokenTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // IMintBurnTokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events. type IMintBurnTokenFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // IMintBurnTokenSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. type IMintBurnTokenSession struct { Contract *IMintBurnToken // Generic contract binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // IMintBurnTokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. type IMintBurnTokenCallerSession struct { Contract *IMintBurnTokenCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } // IMintBurnTokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. type IMintBurnTokenTransactorSession struct { Contract *IMintBurnTokenTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // IMintBurnTokenRaw is an auto generated low-level Go binding around an Ethereum contract. type IMintBurnTokenRaw struct { Contract *IMintBurnToken // Generic contract binding to access the raw methods on } // IMintBurnTokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. type IMintBurnTokenCallerRaw struct { Contract *IMintBurnTokenCaller // Generic read-only contract binding to access the raw methods on } // IMintBurnTokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. type IMintBurnTokenTransactorRaw struct { Contract *IMintBurnTokenTransactor // Generic write-only contract binding to access the raw methods on } // NewIMintBurnToken creates a new instance of IMintBurnToken, bound to a specific deployed contract. func NewIMintBurnToken(address common.Address, backend bind.ContractBackend) (*IMintBurnToken, error) { contract, err := bindIMintBurnToken(address, backend, backend, backend) if err != nil { return nil, err } return &IMintBurnToken{IMintBurnTokenCaller: IMintBurnTokenCaller{contract: contract}, IMintBurnTokenTransactor: IMintBurnTokenTransactor{contract: contract}, IMintBurnTokenFilterer: IMintBurnTokenFilterer{contract: contract}}, nil } // NewIMintBurnTokenCaller creates a new read-only instance of IMintBurnToken, bound to a specific deployed contract. func NewIMintBurnTokenCaller(address common.Address, caller bind.ContractCaller) (*IMintBurnTokenCaller, error) { contract, err := bindIMintBurnToken(address, caller, nil, nil) if err != nil { return nil, err } return &IMintBurnTokenCaller{contract: contract}, nil } // NewIMintBurnTokenTransactor creates a new write-only instance of IMintBurnToken, bound to a specific deployed contract. func NewIMintBurnTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*IMintBurnTokenTransactor, error) { contract, err := bindIMintBurnToken(address, nil, transactor, nil) if err != nil { return nil, err } return &IMintBurnTokenTransactor{contract: contract}, nil } // NewIMintBurnTokenFilterer creates a new log filterer instance of IMintBurnToken, bound to a specific deployed contract. func NewIMintBurnTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*IMintBurnTokenFilterer, error) { contract, err := bindIMintBurnToken(address, nil, nil, filterer) if err != nil { return nil, err } return &IMintBurnTokenFilterer{contract: contract}, nil } // bindIMintBurnToken binds a generic wrapper to an already deployed contract. func bindIMintBurnToken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { parsed, err := abi.JSON(strings.NewReader(IMintBurnTokenABI)) if err != nil { return nil, err } return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. func (_IMintBurnToken *IMintBurnTokenRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _IMintBurnToken.Contract.IMintBurnTokenCaller.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. func (_IMintBurnToken *IMintBurnTokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _IMintBurnToken.Contract.IMintBurnTokenTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_IMintBurnToken *IMintBurnTokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _IMintBurnToken.Contract.IMintBurnTokenTransactor.contract.Transact(opts, method, params...) } // Call invokes the (constant) contract method with params as input values and // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. func (_IMintBurnToken *IMintBurnTokenCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _IMintBurnToken.Contract.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. func (_IMintBurnToken *IMintBurnTokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _IMintBurnToken.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_IMintBurnToken *IMintBurnTokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _IMintBurnToken.Contract.contract.Transact(opts, method, params...) } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) func (_IMintBurnToken *IMintBurnTokenCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { var out []interface{} err := _IMintBurnToken.contract.Call(opts, &out, "allowance", owner, spender) if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) func (_IMintBurnToken *IMintBurnTokenSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { return _IMintBurnToken.Contract.Allowance(&_IMintBurnToken.CallOpts, owner, spender) } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) func (_IMintBurnToken *IMintBurnTokenCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { return _IMintBurnToken.Contract.Allowance(&_IMintBurnToken.CallOpts, owner, spender) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) func (_IMintBurnToken *IMintBurnTokenCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { var out []interface{} err := _IMintBurnToken.contract.Call(opts, &out, "balanceOf", account) if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) func (_IMintBurnToken *IMintBurnTokenSession) BalanceOf(account common.Address) (*big.Int, error) { return _IMintBurnToken.Contract.BalanceOf(&_IMintBurnToken.CallOpts, account) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) func (_IMintBurnToken *IMintBurnTokenCallerSession) BalanceOf(account common.Address) (*big.Int, error) { return _IMintBurnToken.Contract.BalanceOf(&_IMintBurnToken.CallOpts, account) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_IMintBurnToken *IMintBurnTokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _IMintBurnToken.contract.Call(opts, &out, "totalSupply") if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_IMintBurnToken *IMintBurnTokenSession) TotalSupply() (*big.Int, error) { return _IMintBurnToken.Contract.TotalSupply(&_IMintBurnToken.CallOpts) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_IMintBurnToken *IMintBurnTokenCallerSession) TotalSupply() (*big.Int, error) { return _IMintBurnToken.Contract.TotalSupply(&_IMintBurnToken.CallOpts) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 amount) returns(bool) func (_IMintBurnToken *IMintBurnTokenTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { return _IMintBurnToken.contract.Transact(opts, "approve", spender, amount) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 amount) returns(bool) func (_IMintBurnToken *IMintBurnTokenSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { return _IMintBurnToken.Contract.Approve(&_IMintBurnToken.TransactOpts, spender, amount) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 amount) returns(bool) func (_IMintBurnToken *IMintBurnTokenTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { return _IMintBurnToken.Contract.Approve(&_IMintBurnToken.TransactOpts, spender, amount) } // Burn is a paid mutator transaction binding the contract method 0x42966c68. // // Solidity: function burn(uint256 amount) returns() func (_IMintBurnToken *IMintBurnTokenTransactor) Burn(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { return _IMintBurnToken.contract.Transact(opts, "burn", amount) } // Burn is a paid mutator transaction binding the contract method 0x42966c68. // // Solidity: function burn(uint256 amount) returns() func (_IMintBurnToken *IMintBurnTokenSession) Burn(amount *big.Int) (*types.Transaction, error) { return _IMintBurnToken.Contract.Burn(&_IMintBurnToken.TransactOpts, amount) } // Burn is a paid mutator transaction binding the contract method 0x42966c68. // // Solidity: function burn(uint256 amount) returns() func (_IMintBurnToken *IMintBurnTokenTransactorSession) Burn(amount *big.Int) (*types.Transaction, error) { return _IMintBurnToken.Contract.Burn(&_IMintBurnToken.TransactOpts, amount) } // Mint is a paid mutator transaction binding the contract method 0x40c10f19. // // Solidity: function mint(address to, uint256 amount) returns(bool) func (_IMintBurnToken *IMintBurnTokenTransactor) Mint(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { return _IMintBurnToken.contract.Transact(opts, "mint", to, amount) } // Mint is a paid mutator transaction binding the contract method 0x40c10f19. // // Solidity: function mint(address to, uint256 amount) returns(bool) func (_IMintBurnToken *IMintBurnTokenSession) Mint(to common.Address, amount *big.Int) (*types.Transaction, error) { return _IMintBurnToken.Contract.Mint(&_IMintBurnToken.TransactOpts, to, amount) } // Mint is a paid mutator transaction binding the contract method 0x40c10f19. // // Solidity: function mint(address to, uint256 amount) returns(bool) func (_IMintBurnToken *IMintBurnTokenTransactorSession) Mint(to common.Address, amount *big.Int) (*types.Transaction, error) { return _IMintBurnToken.Contract.Mint(&_IMintBurnToken.TransactOpts, to, amount) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 amount) returns(bool) func (_IMintBurnToken *IMintBurnTokenTransactor) Transfer(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { return _IMintBurnToken.contract.Transact(opts, "transfer", to, amount) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 amount) returns(bool) func (_IMintBurnToken *IMintBurnTokenSession) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error) { return _IMintBurnToken.Contract.Transfer(&_IMintBurnToken.TransactOpts, to, amount) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 amount) returns(bool) func (_IMintBurnToken *IMintBurnTokenTransactorSession) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error) { return _IMintBurnToken.Contract.Transfer(&_IMintBurnToken.TransactOpts, to, amount) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool) func (_IMintBurnToken *IMintBurnTokenTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { return _IMintBurnToken.contract.Transact(opts, "transferFrom", from, to, amount) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool) func (_IMintBurnToken *IMintBurnTokenSession) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { return _IMintBurnToken.Contract.TransferFrom(&_IMintBurnToken.TransactOpts, from, to, amount) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool) func (_IMintBurnToken *IMintBurnTokenTransactorSession) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { return _IMintBurnToken.Contract.TransferFrom(&_IMintBurnToken.TransactOpts, from, to, amount) } // IMintBurnTokenApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IMintBurnToken contract. type IMintBurnTokenApprovalIterator struct { Event *IMintBurnTokenApproval // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data logs chan types.Log // Log channel receiving the found contract events sub ethereum.Subscription // Subscription for errors, completion and termination done bool // Whether the subscription completed delivering logs fail error // Occurred error to stop iteration } // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. func (it *IMintBurnTokenApprovalIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false } // If the iterator completed, deliver directly whatever's available if it.done { select { case log := <-it.logs: it.Event = new(IMintBurnTokenApproval) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false } it.Event.Raw = log return true default: return false } } // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: it.Event = new(IMintBurnTokenApproval) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false } it.Event.Raw = log return true case err := <-it.sub.Err(): it.done = true it.fail = err return it.Next() } } // Error returns any retrieval or parsing error occurred during filtering. func (it *IMintBurnTokenApprovalIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *IMintBurnTokenApprovalIterator) Close() error { it.sub.Unsubscribe() return nil } // IMintBurnTokenApproval represents a Approval event raised by the IMintBurnToken contract. type IMintBurnTokenApproval struct { Owner common.Address Spender common.Address Value *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_IMintBurnToken *IMintBurnTokenFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*IMintBurnTokenApprovalIterator, error) { var ownerRule []interface{} for _, ownerItem := range owner { ownerRule = append(ownerRule, ownerItem) } var spenderRule []interface{} for _, spenderItem := range spender { spenderRule = append(spenderRule, spenderItem) } logs, sub, err := _IMintBurnToken.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) if err != nil { return nil, err } return &IMintBurnTokenApprovalIterator{contract: _IMintBurnToken.contract, event: "Approval", logs: logs, sub: sub}, nil } // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_IMintBurnToken *IMintBurnTokenFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IMintBurnTokenApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { var ownerRule []interface{} for _, ownerItem := range owner { ownerRule = append(ownerRule, ownerItem) } var spenderRule []interface{} for _, spenderItem := range spender { spenderRule = append(spenderRule, spenderItem) } logs, sub, err := _IMintBurnToken.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) if err != nil { return nil, err } return event.NewSubscription(func(quit <-chan struct{}) error { defer sub.Unsubscribe() for { select { case log := <-logs: // New log arrived, parse the event and forward to the user event := new(IMintBurnTokenApproval) if err := _IMintBurnToken.contract.UnpackLog(event, "Approval", log); err != nil { return err } event.Raw = log select { case sink <- event: case err := <-sub.Err(): return err case <-quit: return nil } case err := <-sub.Err(): return err case <-quit: return nil } } }), nil } // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_IMintBurnToken *IMintBurnTokenFilterer) ParseApproval(log types.Log) (*IMintBurnTokenApproval, error) { event := new(IMintBurnTokenApproval) if err := _IMintBurnToken.contract.UnpackLog(event, "Approval", log); err != nil { return nil, err } event.Raw = log return event, nil } // IMintBurnTokenTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IMintBurnToken contract. type IMintBurnTokenTransferIterator struct { Event *IMintBurnTokenTransfer // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data logs chan types.Log // Log channel receiving the found contract events sub ethereum.Subscription // Subscription for errors, completion and termination done bool // Whether the subscription completed delivering logs fail error // Occurred error to stop iteration } // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. func (it *IMintBurnTokenTransferIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false } // If the iterator completed, deliver directly whatever's available if it.done { select { case log := <-it.logs: it.Event = new(IMintBurnTokenTransfer) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false } it.Event.Raw = log return true default: return false } } // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: it.Event = new(IMintBurnTokenTransfer) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false } it.Event.Raw = log return true case err := <-it.sub.Err(): it.done = true it.fail = err return it.Next() } } // Error returns any retrieval or parsing error occurred during filtering. func (it *IMintBurnTokenTransferIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *IMintBurnTokenTransferIterator) Close() error { it.sub.Unsubscribe() return nil } // IMintBurnTokenTransfer represents a Transfer event raised by the IMintBurnToken contract. type IMintBurnTokenTransfer struct { From common.Address To common.Address Value *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_IMintBurnToken *IMintBurnTokenFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IMintBurnTokenTransferIterator, error) { var fromRule []interface{} for _, fromItem := range from { fromRule = append(fromRule, fromItem) } var toRule []interface{} for _, toItem := range to { toRule = append(toRule, toItem) } logs, sub, err := _IMintBurnToken.contract.FilterLogs(opts, "Transfer", fromRule, toRule) if err != nil { return nil, err } return &IMintBurnTokenTransferIterator{contract: _IMintBurnToken.contract, event: "Transfer", logs: logs, sub: sub}, nil } // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_IMintBurnToken *IMintBurnTokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IMintBurnTokenTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { var fromRule []interface{} for _, fromItem := range from { fromRule = append(fromRule, fromItem) } var toRule []interface{} for _, toItem := range to { toRule = append(toRule, toItem) } logs, sub, err := _IMintBurnToken.contract.WatchLogs(opts, "Transfer", fromRule, toRule) if err != nil { return nil, err } return event.NewSubscription(func(quit <-chan struct{}) error { defer sub.Unsubscribe() for { select { case log := <-logs: // New log arrived, parse the event and forward to the user event := new(IMintBurnTokenTransfer) if err := _IMintBurnToken.contract.UnpackLog(event, "Transfer", log); err != nil { return err } event.Raw = log select { case sink <- event: case err := <-sub.Err(): return err case <-quit: return nil } case err := <-sub.Err(): return err case <-quit: return nil } } }), nil } // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_IMintBurnToken *IMintBurnTokenFilterer) ParseTransfer(log types.Log) (*IMintBurnTokenTransfer, error) { event := new(IMintBurnTokenTransfer) if err := _IMintBurnToken.contract.UnpackLog(event, "Transfer", log); err != nil { return nil, err } event.Raw = log return event, nil } // ITokenMinterMetaData contains all meta data concerning the ITokenMinter contract. var ITokenMinterMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"burnToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"burnLimitsPerMessage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"remoteDomain\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"remoteToken\",\"type\":\"bytes32\"}],\"name\":\"getLocalToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"sourceDomain\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"burnToken\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"mintToken\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", Sigs: map[string]string{ "9dc29fac": "burn(address,uint256)", "a56ec632": "burnLimitsPerMessage(address)", "78a0565e": "getLocalToken(uint32,bytes32)", "d54de06f": "mint(uint32,bytes32,address,uint256)", }, } // ITokenMinterABI is the input ABI used to generate the binding from. // Deprecated: Use ITokenMinterMetaData.ABI instead. var ITokenMinterABI = ITokenMinterMetaData.ABI // Deprecated: Use ITokenMinterMetaData.Sigs instead. // ITokenMinterFuncSigs maps the 4-byte function signature to its string representation. var ITokenMinterFuncSigs = ITokenMinterMetaData.Sigs // ITokenMinter is an auto generated Go binding around an Ethereum contract. type ITokenMinter struct { ITokenMinterCaller // Read-only binding to the contract ITokenMinterTransactor // Write-only binding to the contract ITokenMinterFilterer // Log filterer for contract events } // ITokenMinterCaller is an auto generated read-only Go binding around an Ethereum contract. type ITokenMinterCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // ITokenMinterTransactor is an auto generated write-only Go binding around an Ethereum contract. type ITokenMinterTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // ITokenMinterFilterer is an auto generated log filtering Go binding around an Ethereum contract events. type ITokenMinterFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // ITokenMinterSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. type ITokenMinterSession struct { Contract *ITokenMinter // Generic contract binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // ITokenMinterCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. type ITokenMinterCallerSession struct { Contract *ITokenMinterCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } // ITokenMinterTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. type ITokenMinterTransactorSession struct { Contract *ITokenMinterTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // ITokenMinterRaw is an auto generated low-level Go binding around an Ethereum contract. type ITokenMinterRaw struct { Contract *ITokenMinter // Generic contract binding to access the raw methods on } // ITokenMinterCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. type ITokenMinterCallerRaw struct { Contract *ITokenMinterCaller // Generic read-only contract binding to access the raw methods on } // ITokenMinterTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. type ITokenMinterTransactorRaw struct { Contract *ITokenMinterTransactor // Generic write-only contract binding to access the raw methods on } // NewITokenMinter creates a new instance of ITokenMinter, bound to a specific deployed contract. func NewITokenMinter(address common.Address, backend bind.ContractBackend) (*ITokenMinter, error) { contract, err := bindITokenMinter(address, backend, backend, backend) if err != nil { return nil, err } return &ITokenMinter{ITokenMinterCaller: ITokenMinterCaller{contract: contract}, ITokenMinterTransactor: ITokenMinterTransactor{contract: contract}, ITokenMinterFilterer: ITokenMinterFilterer{contract: contract}}, nil } // NewITokenMinterCaller creates a new read-only instance of ITokenMinter, bound to a specific deployed contract. func NewITokenMinterCaller(address common.Address, caller bind.ContractCaller) (*ITokenMinterCaller, error) { contract, err := bindITokenMinter(address, caller, nil, nil) if err != nil { return nil, err } return &ITokenMinterCaller{contract: contract}, nil } // NewITokenMinterTransactor creates a new write-only instance of ITokenMinter, bound to a specific deployed contract. func NewITokenMinterTransactor(address common.Address, transactor bind.ContractTransactor) (*ITokenMinterTransactor, error) { contract, err := bindITokenMinter(address, nil, transactor, nil) if err != nil { return nil, err } return &ITokenMinterTransactor{contract: contract}, nil } // NewITokenMinterFilterer creates a new log filterer instance of ITokenMinter, bound to a specific deployed contract. func NewITokenMinterFilterer(address common.Address, filterer bind.ContractFilterer) (*ITokenMinterFilterer, error) { contract, err := bindITokenMinter(address, nil, nil, filterer) if err != nil { return nil, err } return &ITokenMinterFilterer{contract: contract}, nil } // bindITokenMinter binds a generic wrapper to an already deployed contract. func bindITokenMinter(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { parsed, err := abi.JSON(strings.NewReader(ITokenMinterABI)) if err != nil { return nil, err } return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. func (_ITokenMinter *ITokenMinterRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _ITokenMinter.Contract.ITokenMinterCaller.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. func (_ITokenMinter *ITokenMinterRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _ITokenMinter.Contract.ITokenMinterTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_ITokenMinter *ITokenMinterRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _ITokenMinter.Contract.ITokenMinterTransactor.contract.Transact(opts, method, params...) } // Call invokes the (constant) contract method with params as input values and // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. func (_ITokenMinter *ITokenMinterCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _ITokenMinter.Contract.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. func (_ITokenMinter *ITokenMinterTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _ITokenMinter.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_ITokenMinter *ITokenMinterTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _ITokenMinter.Contract.contract.Transact(opts, method, params...) } // BurnLimitsPerMessage is a free data retrieval call binding the contract method 0xa56ec632. // // Solidity: function burnLimitsPerMessage(address token) view returns(uint256) func (_ITokenMinter *ITokenMinterCaller) BurnLimitsPerMessage(opts *bind.CallOpts, token common.Address) (*big.Int, error) { var out []interface{} err := _ITokenMinter.contract.Call(opts, &out, "burnLimitsPerMessage", token) if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // BurnLimitsPerMessage is a free data retrieval call binding the contract method 0xa56ec632. // // Solidity: function burnLimitsPerMessage(address token) view returns(uint256) func (_ITokenMinter *ITokenMinterSession) BurnLimitsPerMessage(token common.Address) (*big.Int, error) { return _ITokenMinter.Contract.BurnLimitsPerMessage(&_ITokenMinter.CallOpts, token) } // BurnLimitsPerMessage is a free data retrieval call binding the contract method 0xa56ec632. // // Solidity: function burnLimitsPerMessage(address token) view returns(uint256) func (_ITokenMinter *ITokenMinterCallerSession) BurnLimitsPerMessage(token common.Address) (*big.Int, error) { return _ITokenMinter.Contract.BurnLimitsPerMessage(&_ITokenMinter.CallOpts, token) } // GetLocalToken is a free data retrieval call binding the contract method 0x78a0565e. // // Solidity: function getLocalToken(uint32 remoteDomain, bytes32 remoteToken) view returns(address) func (_ITokenMinter *ITokenMinterCaller) GetLocalToken(opts *bind.CallOpts, remoteDomain uint32, remoteToken [32]byte) (common.Address, error) { var out []interface{} err := _ITokenMinter.contract.Call(opts, &out, "getLocalToken", remoteDomain, remoteToken) if err != nil { return *new(common.Address), err } out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) return out0, err } // GetLocalToken is a free data retrieval call binding the contract method 0x78a0565e. // // Solidity: function getLocalToken(uint32 remoteDomain, bytes32 remoteToken) view returns(address) func (_ITokenMinter *ITokenMinterSession) GetLocalToken(remoteDomain uint32, remoteToken [32]byte) (common.Address, error) { return _ITokenMinter.Contract.GetLocalToken(&_ITokenMinter.CallOpts, remoteDomain, remoteToken) } // GetLocalToken is a free data retrieval call binding the contract method 0x78a0565e. // // Solidity: function getLocalToken(uint32 remoteDomain, bytes32 remoteToken) view returns(address) func (_ITokenMinter *ITokenMinterCallerSession) GetLocalToken(remoteDomain uint32, remoteToken [32]byte) (common.Address, error) { return _ITokenMinter.Contract.GetLocalToken(&_ITokenMinter.CallOpts, remoteDomain, remoteToken) } // Burn is a paid mutator transaction binding the contract method 0x9dc29fac. // // Solidity: function burn(address burnToken, uint256 amount) returns() func (_ITokenMinter *ITokenMinterTransactor) Burn(opts *bind.TransactOpts, burnToken common.Address, amount *big.Int) (*types.Transaction, error) { return _ITokenMinter.contract.Transact(opts, "burn", burnToken, amount) } // Burn is a paid mutator transaction binding the contract method 0x9dc29fac. // // Solidity: function burn(address burnToken, uint256 amount) returns() func (_ITokenMinter *ITokenMinterSession) Burn(burnToken common.Address, amount *big.Int) (*types.Transaction, error) { return _ITokenMinter.Contract.Burn(&_ITokenMinter.TransactOpts, burnToken, amount) } // Burn is a paid mutator transaction binding the contract method 0x9dc29fac. // // Solidity: function burn(address burnToken, uint256 amount) returns() func (_ITokenMinter *ITokenMinterTransactorSession) Burn(burnToken common.Address, amount *big.Int) (*types.Transaction, error) { return _ITokenMinter.Contract.Burn(&_ITokenMinter.TransactOpts, burnToken, amount) } // Mint is a paid mutator transaction binding the contract method 0xd54de06f. // // Solidity: function mint(uint32 sourceDomain, bytes32 burnToken, address to, uint256 amount) returns(address mintToken) func (_ITokenMinter *ITokenMinterTransactor) Mint(opts *bind.TransactOpts, sourceDomain uint32, burnToken [32]byte, to common.Address, amount *big.Int) (*types.Transaction, error) { return _ITokenMinter.contract.Transact(opts, "mint", sourceDomain, burnToken, to, amount) } // Mint is a paid mutator transaction binding the contract method 0xd54de06f. // // Solidity: function mint(uint32 sourceDomain, bytes32 burnToken, address to, uint256 amount) returns(address mintToken) func (_ITokenMinter *ITokenMinterSession) Mint(sourceDomain uint32, burnToken [32]byte, to common.Address, amount *big.Int) (*types.Transaction, error) { return _ITokenMinter.Contract.Mint(&_ITokenMinter.TransactOpts, sourceDomain, burnToken, to, amount) } // Mint is a paid mutator transaction binding the contract method 0xd54de06f. // // Solidity: function mint(uint32 sourceDomain, bytes32 burnToken, address to, uint256 amount) returns(address mintToken) func (_ITokenMinter *ITokenMinterTransactorSession) Mint(sourceDomain uint32, burnToken [32]byte, to common.Address, amount *big.Int) (*types.Transaction, error) { return _ITokenMinter.Contract.Mint(&_ITokenMinter.TransactOpts, sourceDomain, burnToken, to, amount) } // MockTokenMinterMetaData contains all meta data concerning the MockTokenMinter contract. var MockTokenMinterMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"localTokenMessenger_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"burnToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"burnLimitsPerMessage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"remoteDomain\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"remoteToken\",\"type\":\"bytes32\"}],\"name\":\"getLocalToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"localTokenMessenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"sourceDomain\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"burnToken\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"mintToken\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"limit\",\"type\":\"uint256\"}],\"name\":\"setBurnLimitPerMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"remoteDomain\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"remoteToken\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"}],\"name\":\"setLocalToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", Sigs: map[string]string{ "9dc29fac": "burn(address,uint256)", "a56ec632": "burnLimitsPerMessage(address)", "78a0565e": "getLocalToken(uint32,bytes32)", "770fc1f0": "localTokenMessenger()", "d54de06f": "mint(uint32,bytes32,address,uint256)", "c7823e2b": "setBurnLimitPerMessage(address,uint256)", "6a879ac4": "setLocalToken(uint32,bytes32,address)", }, Bin: "0x608060405234801561001057600080fd5b506040516106ee3803806106ee83398101604081905261002f91610054565b600180546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b61065b806100936000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80639dc29fac1161005b5780639dc29fac14610186578063a56ec63214610199578063c7823e2b146101c7578063d54de06f146101fe57600080fd5b80636a879ac414610082578063770fc1f0146100f557806378a0565e1461013f575b600080fd5b6100f361009036600461051b565b63ffffffff929092166000908152602081815260408083209383529290522080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055565b005b6001546101159073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b61011561014d366004610557565b63ffffffff91909116600090815260208181526040808320938352929052205473ffffffffffffffffffffffffffffffffffffffff1690565b6100f3610194366004610581565b610211565b6101b96101a736600461059d565b60026020526000908152604090205481565b604051908152602001610136565b6100f36101d5366004610581565b73ffffffffffffffffffffffffffffffffffffffff909116600090815260026020526040902055565b61011561020c3660046105bf565b61031b565b60015473ffffffffffffffffffffffffffffffffffffffff163314610297576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f43616c6c6572206e6f74206c6f63616c20546f6b656e4d657373656e6765720060448201526064015b60405180910390fd5b6040517f42966c680000000000000000000000000000000000000000000000000000000081526004810182905273ffffffffffffffffffffffffffffffffffffffff8316906342966c6890602401600060405180830381600087803b1580156102ff57600080fd5b505af1158015610313573d6000803e3d6000fd5b505050505050565b60015460009073ffffffffffffffffffffffffffffffffffffffff16331461039f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f43616c6c6572206e6f74206c6f63616c20546f6b656e4d657373656e67657200604482015260640161028e565b5063ffffffff841660009081526020818152604080832086845290915290205473ffffffffffffffffffffffffffffffffffffffff168061043c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4d696e7420746f6b656e206e6f7420737570706f727465640000000000000000604482015260640161028e565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490528216906340c10f19906044016020604051808303816000875af11580156104b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d59190610603565b50949350505050565b803563ffffffff811681146104f257600080fd5b919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146104f257600080fd5b60008060006060848603121561053057600080fd5b610539846104de565b92506020840135915061054e604085016104f7565b90509250925092565b6000806040838503121561056a57600080fd5b610573836104de565b946020939093013593505050565b6000806040838503121561059457600080fd5b610573836104f7565b6000602082840312156105af57600080fd5b6105b8826104f7565b9392505050565b600080600080608085870312156105d557600080fd5b6105de856104de565b9350602085013592506105f3604086016104f7565b9396929550929360600135925050565b60006020828403121561061557600080fd5b815180151581146105b857600080fdfea2646970667358221220dd305bbb874df5df5ebd93550fd296a25a4152acafb318f1ae3083cbd42e7b0364736f6c63430008110033", } // MockTokenMinterABI is the input ABI used to generate the binding from. // Deprecated: Use MockTokenMinterMetaData.ABI instead. var MockTokenMinterABI = MockTokenMinterMetaData.ABI // Deprecated: Use MockTokenMinterMetaData.Sigs instead. // MockTokenMinterFuncSigs maps the 4-byte function signature to its string representation. var MockTokenMinterFuncSigs = MockTokenMinterMetaData.Sigs // MockTokenMinterBin is the compiled bytecode used for deploying new contracts. // Deprecated: Use MockTokenMinterMetaData.Bin instead. var MockTokenMinterBin = MockTokenMinterMetaData.Bin // DeployMockTokenMinter deploys a new Ethereum contract, binding an instance of MockTokenMinter to it. func DeployMockTokenMinter(auth *bind.TransactOpts, backend bind.ContractBackend, localTokenMessenger_ common.Address) (common.Address, *types.Transaction, *MockTokenMinter, error) { parsed, err := MockTokenMinterMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err } if parsed == nil { return common.Address{}, nil, nil, errors.New("GetABI returned nil") } address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(MockTokenMinterBin), backend, localTokenMessenger_) if err != nil { return common.Address{}, nil, nil, err } return address, tx, &MockTokenMinter{MockTokenMinterCaller: MockTokenMinterCaller{contract: contract}, MockTokenMinterTransactor: MockTokenMinterTransactor{contract: contract}, MockTokenMinterFilterer: MockTokenMinterFilterer{contract: contract}}, nil } // MockTokenMinter is an auto generated Go binding around an Ethereum contract. type MockTokenMinter struct { MockTokenMinterCaller // Read-only binding to the contract MockTokenMinterTransactor // Write-only binding to the contract MockTokenMinterFilterer // Log filterer for contract events } // MockTokenMinterCaller is an auto generated read-only Go binding around an Ethereum contract. type MockTokenMinterCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // MockTokenMinterTransactor is an auto generated write-only Go binding around an Ethereum contract. type MockTokenMinterTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // MockTokenMinterFilterer is an auto generated log filtering Go binding around an Ethereum contract events. type MockTokenMinterFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // MockTokenMinterSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. type MockTokenMinterSession struct { Contract *MockTokenMinter // Generic contract binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // MockTokenMinterCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. type MockTokenMinterCallerSession struct { Contract *MockTokenMinterCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } // MockTokenMinterTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. type MockTokenMinterTransactorSession struct { Contract *MockTokenMinterTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // MockTokenMinterRaw is an auto generated low-level Go binding around an Ethereum contract. type MockTokenMinterRaw struct { Contract *MockTokenMinter // Generic contract binding to access the raw methods on } // MockTokenMinterCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. type MockTokenMinterCallerRaw struct { Contract *MockTokenMinterCaller // Generic read-only contract binding to access the raw methods on } // MockTokenMinterTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. type MockTokenMinterTransactorRaw struct { Contract *MockTokenMinterTransactor // Generic write-only contract binding to access the raw methods on } // NewMockTokenMinter creates a new instance of MockTokenMinter, bound to a specific deployed contract. func NewMockTokenMinter(address common.Address, backend bind.ContractBackend) (*MockTokenMinter, error) { contract, err := bindMockTokenMinter(address, backend, backend, backend) if err != nil { return nil, err } return &MockTokenMinter{MockTokenMinterCaller: MockTokenMinterCaller{contract: contract}, MockTokenMinterTransactor: MockTokenMinterTransactor{contract: contract}, MockTokenMinterFilterer: MockTokenMinterFilterer{contract: contract}}, nil } // NewMockTokenMinterCaller creates a new read-only instance of MockTokenMinter, bound to a specific deployed contract. func NewMockTokenMinterCaller(address common.Address, caller bind.ContractCaller) (*MockTokenMinterCaller, error) { contract, err := bindMockTokenMinter(address, caller, nil, nil) if err != nil { return nil, err } return &MockTokenMinterCaller{contract: contract}, nil } // NewMockTokenMinterTransactor creates a new write-only instance of MockTokenMinter, bound to a specific deployed contract. func NewMockTokenMinterTransactor(address common.Address, transactor bind.ContractTransactor) (*MockTokenMinterTransactor, error) { contract, err := bindMockTokenMinter(address, nil, transactor, nil) if err != nil { return nil, err } return &MockTokenMinterTransactor{contract: contract}, nil } // NewMockTokenMinterFilterer creates a new log filterer instance of MockTokenMinter, bound to a specific deployed contract. func NewMockTokenMinterFilterer(address common.Address, filterer bind.ContractFilterer) (*MockTokenMinterFilterer, error) { contract, err := bindMockTokenMinter(address, nil, nil, filterer) if err != nil { return nil, err } return &MockTokenMinterFilterer{contract: contract}, nil } // bindMockTokenMinter binds a generic wrapper to an already deployed contract. func bindMockTokenMinter(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { parsed, err := abi.JSON(strings.NewReader(MockTokenMinterABI)) if err != nil { return nil, err } return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. func (_MockTokenMinter *MockTokenMinterRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _MockTokenMinter.Contract.MockTokenMinterCaller.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. func (_MockTokenMinter *MockTokenMinterRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _MockTokenMinter.Contract.MockTokenMinterTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_MockTokenMinter *MockTokenMinterRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _MockTokenMinter.Contract.MockTokenMinterTransactor.contract.Transact(opts, method, params...) } // Call invokes the (constant) contract method with params as input values and // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. func (_MockTokenMinter *MockTokenMinterCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _MockTokenMinter.Contract.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. func (_MockTokenMinter *MockTokenMinterTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _MockTokenMinter.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_MockTokenMinter *MockTokenMinterTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _MockTokenMinter.Contract.contract.Transact(opts, method, params...) } // BurnLimitsPerMessage is a free data retrieval call binding the contract method 0xa56ec632. // // Solidity: function burnLimitsPerMessage(address ) view returns(uint256) func (_MockTokenMinter *MockTokenMinterCaller) BurnLimitsPerMessage(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { var out []interface{} err := _MockTokenMinter.contract.Call(opts, &out, "burnLimitsPerMessage", arg0) if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // BurnLimitsPerMessage is a free data retrieval call binding the contract method 0xa56ec632. // // Solidity: function burnLimitsPerMessage(address ) view returns(uint256) func (_MockTokenMinter *MockTokenMinterSession) BurnLimitsPerMessage(arg0 common.Address) (*big.Int, error) { return _MockTokenMinter.Contract.BurnLimitsPerMessage(&_MockTokenMinter.CallOpts, arg0) } // BurnLimitsPerMessage is a free data retrieval call binding the contract method 0xa56ec632. // // Solidity: function burnLimitsPerMessage(address ) view returns(uint256) func (_MockTokenMinter *MockTokenMinterCallerSession) BurnLimitsPerMessage(arg0 common.Address) (*big.Int, error) { return _MockTokenMinter.Contract.BurnLimitsPerMessage(&_MockTokenMinter.CallOpts, arg0) } // GetLocalToken is a free data retrieval call binding the contract method 0x78a0565e. // // Solidity: function getLocalToken(uint32 remoteDomain, bytes32 remoteToken) view returns(address) func (_MockTokenMinter *MockTokenMinterCaller) GetLocalToken(opts *bind.CallOpts, remoteDomain uint32, remoteToken [32]byte) (common.Address, error) { var out []interface{} err := _MockTokenMinter.contract.Call(opts, &out, "getLocalToken", remoteDomain, remoteToken) if err != nil { return *new(common.Address), err } out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) return out0, err } // GetLocalToken is a free data retrieval call binding the contract method 0x78a0565e. // // Solidity: function getLocalToken(uint32 remoteDomain, bytes32 remoteToken) view returns(address) func (_MockTokenMinter *MockTokenMinterSession) GetLocalToken(remoteDomain uint32, remoteToken [32]byte) (common.Address, error) { return _MockTokenMinter.Contract.GetLocalToken(&_MockTokenMinter.CallOpts, remoteDomain, remoteToken) } // GetLocalToken is a free data retrieval call binding the contract method 0x78a0565e. // // Solidity: function getLocalToken(uint32 remoteDomain, bytes32 remoteToken) view returns(address) func (_MockTokenMinter *MockTokenMinterCallerSession) GetLocalToken(remoteDomain uint32, remoteToken [32]byte) (common.Address, error) { return _MockTokenMinter.Contract.GetLocalToken(&_MockTokenMinter.CallOpts, remoteDomain, remoteToken) } // LocalTokenMessenger is a free data retrieval call binding the contract method 0x770fc1f0. // // Solidity: function localTokenMessenger() view returns(address) func (_MockTokenMinter *MockTokenMinterCaller) LocalTokenMessenger(opts *bind.CallOpts) (common.Address, error) { var out []interface{} err := _MockTokenMinter.contract.Call(opts, &out, "localTokenMessenger") if err != nil { return *new(common.Address), err } out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) return out0, err } // LocalTokenMessenger is a free data retrieval call binding the contract method 0x770fc1f0. // // Solidity: function localTokenMessenger() view returns(address) func (_MockTokenMinter *MockTokenMinterSession) LocalTokenMessenger() (common.Address, error) { return _MockTokenMinter.Contract.LocalTokenMessenger(&_MockTokenMinter.CallOpts) } // LocalTokenMessenger is a free data retrieval call binding the contract method 0x770fc1f0. // // Solidity: function localTokenMessenger() view returns(address) func (_MockTokenMinter *MockTokenMinterCallerSession) LocalTokenMessenger() (common.Address, error) { return _MockTokenMinter.Contract.LocalTokenMessenger(&_MockTokenMinter.CallOpts) } // Burn is a paid mutator transaction binding the contract method 0x9dc29fac. // // Solidity: function burn(address burnToken, uint256 amount) returns() func (_MockTokenMinter *MockTokenMinterTransactor) Burn(opts *bind.TransactOpts, burnToken common.Address, amount *big.Int) (*types.Transaction, error) { return _MockTokenMinter.contract.Transact(opts, "burn", burnToken, amount) } // Burn is a paid mutator transaction binding the contract method 0x9dc29fac. // // Solidity: function burn(address burnToken, uint256 amount) returns() func (_MockTokenMinter *MockTokenMinterSession) Burn(burnToken common.Address, amount *big.Int) (*types.Transaction, error) { return _MockTokenMinter.Contract.Burn(&_MockTokenMinter.TransactOpts, burnToken, amount) } // Burn is a paid mutator transaction binding the contract method 0x9dc29fac. // // Solidity: function burn(address burnToken, uint256 amount) returns() func (_MockTokenMinter *MockTokenMinterTransactorSession) Burn(burnToken common.Address, amount *big.Int) (*types.Transaction, error) { return _MockTokenMinter.Contract.Burn(&_MockTokenMinter.TransactOpts, burnToken, amount) } // Mint is a paid mutator transaction binding the contract method 0xd54de06f. // // Solidity: function mint(uint32 sourceDomain, bytes32 burnToken, address to, uint256 amount) returns(address mintToken) func (_MockTokenMinter *MockTokenMinterTransactor) Mint(opts *bind.TransactOpts, sourceDomain uint32, burnToken [32]byte, to common.Address, amount *big.Int) (*types.Transaction, error) { return _MockTokenMinter.contract.Transact(opts, "mint", sourceDomain, burnToken, to, amount) } // Mint is a paid mutator transaction binding the contract method 0xd54de06f. // // Solidity: function mint(uint32 sourceDomain, bytes32 burnToken, address to, uint256 amount) returns(address mintToken) func (_MockTokenMinter *MockTokenMinterSession) Mint(sourceDomain uint32, burnToken [32]byte, to common.Address, amount *big.Int) (*types.Transaction, error) { return _MockTokenMinter.Contract.Mint(&_MockTokenMinter.TransactOpts, sourceDomain, burnToken, to, amount) } // Mint is a paid mutator transaction binding the contract method 0xd54de06f. // // Solidity: function mint(uint32 sourceDomain, bytes32 burnToken, address to, uint256 amount) returns(address mintToken) func (_MockTokenMinter *MockTokenMinterTransactorSession) Mint(sourceDomain uint32, burnToken [32]byte, to common.Address, amount *big.Int) (*types.Transaction, error) { return _MockTokenMinter.Contract.Mint(&_MockTokenMinter.TransactOpts, sourceDomain, burnToken, to, amount) } // SetBurnLimitPerMessage is a paid mutator transaction binding the contract method 0xc7823e2b. // // Solidity: function setBurnLimitPerMessage(address token, uint256 limit) returns() func (_MockTokenMinter *MockTokenMinterTransactor) SetBurnLimitPerMessage(opts *bind.TransactOpts, token common.Address, limit *big.Int) (*types.Transaction, error) { return _MockTokenMinter.contract.Transact(opts, "setBurnLimitPerMessage", token, limit) } // SetBurnLimitPerMessage is a paid mutator transaction binding the contract method 0xc7823e2b. // // Solidity: function setBurnLimitPerMessage(address token, uint256 limit) returns() func (_MockTokenMinter *MockTokenMinterSession) SetBurnLimitPerMessage(token common.Address, limit *big.Int) (*types.Transaction, error) { return _MockTokenMinter.Contract.SetBurnLimitPerMessage(&_MockTokenMinter.TransactOpts, token, limit) } // SetBurnLimitPerMessage is a paid mutator transaction binding the contract method 0xc7823e2b. // // Solidity: function setBurnLimitPerMessage(address token, uint256 limit) returns() func (_MockTokenMinter *MockTokenMinterTransactorSession) SetBurnLimitPerMessage(token common.Address, limit *big.Int) (*types.Transaction, error) { return _MockTokenMinter.Contract.SetBurnLimitPerMessage(&_MockTokenMinter.TransactOpts, token, limit) } // SetLocalToken is a paid mutator transaction binding the contract method 0x6a879ac4. // // Solidity: function setLocalToken(uint32 remoteDomain, bytes32 remoteToken, address localToken) returns() func (_MockTokenMinter *MockTokenMinterTransactor) SetLocalToken(opts *bind.TransactOpts, remoteDomain uint32, remoteToken [32]byte, localToken common.Address) (*types.Transaction, error) { return _MockTokenMinter.contract.Transact(opts, "setLocalToken", remoteDomain, remoteToken, localToken) } // SetLocalToken is a paid mutator transaction binding the contract method 0x6a879ac4. // // Solidity: function setLocalToken(uint32 remoteDomain, bytes32 remoteToken, address localToken) returns() func (_MockTokenMinter *MockTokenMinterSession) SetLocalToken(remoteDomain uint32, remoteToken [32]byte, localToken common.Address) (*types.Transaction, error) { return _MockTokenMinter.Contract.SetLocalToken(&_MockTokenMinter.TransactOpts, remoteDomain, remoteToken, localToken) } // SetLocalToken is a paid mutator transaction binding the contract method 0x6a879ac4. // // Solidity: function setLocalToken(uint32 remoteDomain, bytes32 remoteToken, address localToken) returns() func (_MockTokenMinter *MockTokenMinterTransactorSession) SetLocalToken(remoteDomain uint32, remoteToken [32]byte, localToken common.Address) (*types.Transaction, error) { return _MockTokenMinter.Contract.SetLocalToken(&_MockTokenMinter.TransactOpts, remoteDomain, remoteToken, localToken) }