Files
mev-beta/bindings/contracts/baseflashswapper.go
2025-10-04 09:31:02 -05:00

1366 lines
63 KiB
Go

// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package contracts
import (
"errors"
"math/big"
"strings"
ethereum "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
)
// Reference imports to suppress errors if they are not otherwise used.
var (
_ = errors.New
_ = big.NewInt
_ = strings.NewReader
_ = ethereum.NotFound
_ = bind.Bind
_ = common.Big1
_ = types.BloomLookup
_ = event.NewSubscription
_ = abi.ConvertType
)
// BaseFlashSwapperMetaData contains all meta data concerning the BaseFlashSwapper contract.
var BaseFlashSwapperMetaData = &bind.MetaData{
ABI: "[{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"EMERGENCY_TIMELOCK\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"authorizedCallers\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateFlashSwapFee\",\"inputs\":[{\"name\":\"pool\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount0\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"amount1\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"fee0\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"fee1\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"canExecuteEmergencyWithdraw\",\"inputs\":[{\"name\":\"requestId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"cancelEmergencyWithdraw\",\"inputs\":[{\"name\":\"requestId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"emergencyRequests\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executeAfter\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executed\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"emergencyWithdraw\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"executeEmergencyWithdraw\",\"inputs\":[{\"name\":\"requestId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"executeFlashSwap\",\"inputs\":[{\"name\":\"pool\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structIFlashSwapper.FlashSwapParams\",\"components\":[{\"name\":\"token0\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"token1\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount0\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"amount1\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"requestEmergencyWithdraw\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAuthorizedCaller\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"authorized\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"EmergencyWithdrawCancelled\",\"inputs\":[{\"name\":\"requestId\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"EmergencyWithdrawExecuted\",\"inputs\":[{\"name\":\"requestId\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"token\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"EmergencyWithdrawRequested\",\"inputs\":[{\"name\":\"requestId\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"token\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"executeAfter\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FlashSwapExecuted\",\"inputs\":[{\"name\":\"pool\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"token0\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"token1\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount0\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"amount1\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"AddressInsufficientBalance\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ReentrancyGuardReentrantCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SafeERC20FailedOperation\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}]}]",
}
// BaseFlashSwapperABI is the input ABI used to generate the binding from.
// Deprecated: Use BaseFlashSwapperMetaData.ABI instead.
var BaseFlashSwapperABI = BaseFlashSwapperMetaData.ABI
// BaseFlashSwapper is an auto generated Go binding around an Ethereum contract.
type BaseFlashSwapper struct {
BaseFlashSwapperCaller // Read-only binding to the contract
BaseFlashSwapperTransactor // Write-only binding to the contract
BaseFlashSwapperFilterer // Log filterer for contract events
}
// BaseFlashSwapperCaller is an auto generated read-only Go binding around an Ethereum contract.
type BaseFlashSwapperCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// BaseFlashSwapperTransactor is an auto generated write-only Go binding around an Ethereum contract.
type BaseFlashSwapperTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// BaseFlashSwapperFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type BaseFlashSwapperFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// BaseFlashSwapperSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type BaseFlashSwapperSession struct {
Contract *BaseFlashSwapper // 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
}
// BaseFlashSwapperCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type BaseFlashSwapperCallerSession struct {
Contract *BaseFlashSwapperCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// BaseFlashSwapperTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type BaseFlashSwapperTransactorSession struct {
Contract *BaseFlashSwapperTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// BaseFlashSwapperRaw is an auto generated low-level Go binding around an Ethereum contract.
type BaseFlashSwapperRaw struct {
Contract *BaseFlashSwapper // Generic contract binding to access the raw methods on
}
// BaseFlashSwapperCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type BaseFlashSwapperCallerRaw struct {
Contract *BaseFlashSwapperCaller // Generic read-only contract binding to access the raw methods on
}
// BaseFlashSwapperTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type BaseFlashSwapperTransactorRaw struct {
Contract *BaseFlashSwapperTransactor // Generic write-only contract binding to access the raw methods on
}
// NewBaseFlashSwapper creates a new instance of BaseFlashSwapper, bound to a specific deployed contract.
func NewBaseFlashSwapper(address common.Address, backend bind.ContractBackend) (*BaseFlashSwapper, error) {
contract, err := bindBaseFlashSwapper(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &BaseFlashSwapper{BaseFlashSwapperCaller: BaseFlashSwapperCaller{contract: contract}, BaseFlashSwapperTransactor: BaseFlashSwapperTransactor{contract: contract}, BaseFlashSwapperFilterer: BaseFlashSwapperFilterer{contract: contract}}, nil
}
// NewBaseFlashSwapperCaller creates a new read-only instance of BaseFlashSwapper, bound to a specific deployed contract.
func NewBaseFlashSwapperCaller(address common.Address, caller bind.ContractCaller) (*BaseFlashSwapperCaller, error) {
contract, err := bindBaseFlashSwapper(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &BaseFlashSwapperCaller{contract: contract}, nil
}
// NewBaseFlashSwapperTransactor creates a new write-only instance of BaseFlashSwapper, bound to a specific deployed contract.
func NewBaseFlashSwapperTransactor(address common.Address, transactor bind.ContractTransactor) (*BaseFlashSwapperTransactor, error) {
contract, err := bindBaseFlashSwapper(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &BaseFlashSwapperTransactor{contract: contract}, nil
}
// NewBaseFlashSwapperFilterer creates a new log filterer instance of BaseFlashSwapper, bound to a specific deployed contract.
func NewBaseFlashSwapperFilterer(address common.Address, filterer bind.ContractFilterer) (*BaseFlashSwapperFilterer, error) {
contract, err := bindBaseFlashSwapper(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &BaseFlashSwapperFilterer{contract: contract}, nil
}
// bindBaseFlashSwapper binds a generic wrapper to an already deployed contract.
func bindBaseFlashSwapper(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := BaseFlashSwapperMetaData.GetAbi()
if err != nil {
return nil, err
}
return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil
}
// Call invokes the (constant) contract method with params as input values and
// sets the output to result. The result type might be a single field for simple
// returns, a slice of interfaces for anonymous returns and a struct for named
// returns.
func (_BaseFlashSwapper *BaseFlashSwapperRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _BaseFlashSwapper.Contract.BaseFlashSwapperCaller.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 (_BaseFlashSwapper *BaseFlashSwapperRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.BaseFlashSwapperTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_BaseFlashSwapper *BaseFlashSwapperRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.BaseFlashSwapperTransactor.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 (_BaseFlashSwapper *BaseFlashSwapperCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _BaseFlashSwapper.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 (_BaseFlashSwapper *BaseFlashSwapperTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_BaseFlashSwapper *BaseFlashSwapperTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.contract.Transact(opts, method, params...)
}
// EMERGENCYTIMELOCK is a free data retrieval call binding the contract method 0x60d7442b.
//
// Solidity: function EMERGENCY_TIMELOCK() view returns(uint256)
func (_BaseFlashSwapper *BaseFlashSwapperCaller) EMERGENCYTIMELOCK(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _BaseFlashSwapper.contract.Call(opts, &out, "EMERGENCY_TIMELOCK")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// EMERGENCYTIMELOCK is a free data retrieval call binding the contract method 0x60d7442b.
//
// Solidity: function EMERGENCY_TIMELOCK() view returns(uint256)
func (_BaseFlashSwapper *BaseFlashSwapperSession) EMERGENCYTIMELOCK() (*big.Int, error) {
return _BaseFlashSwapper.Contract.EMERGENCYTIMELOCK(&_BaseFlashSwapper.CallOpts)
}
// EMERGENCYTIMELOCK is a free data retrieval call binding the contract method 0x60d7442b.
//
// Solidity: function EMERGENCY_TIMELOCK() view returns(uint256)
func (_BaseFlashSwapper *BaseFlashSwapperCallerSession) EMERGENCYTIMELOCK() (*big.Int, error) {
return _BaseFlashSwapper.Contract.EMERGENCYTIMELOCK(&_BaseFlashSwapper.CallOpts)
}
// AuthorizedCallers is a free data retrieval call binding the contract method 0x536fff6c.
//
// Solidity: function authorizedCallers(address ) view returns(bool)
func (_BaseFlashSwapper *BaseFlashSwapperCaller) AuthorizedCallers(opts *bind.CallOpts, arg0 common.Address) (bool, error) {
var out []interface{}
err := _BaseFlashSwapper.contract.Call(opts, &out, "authorizedCallers", arg0)
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
// AuthorizedCallers is a free data retrieval call binding the contract method 0x536fff6c.
//
// Solidity: function authorizedCallers(address ) view returns(bool)
func (_BaseFlashSwapper *BaseFlashSwapperSession) AuthorizedCallers(arg0 common.Address) (bool, error) {
return _BaseFlashSwapper.Contract.AuthorizedCallers(&_BaseFlashSwapper.CallOpts, arg0)
}
// AuthorizedCallers is a free data retrieval call binding the contract method 0x536fff6c.
//
// Solidity: function authorizedCallers(address ) view returns(bool)
func (_BaseFlashSwapper *BaseFlashSwapperCallerSession) AuthorizedCallers(arg0 common.Address) (bool, error) {
return _BaseFlashSwapper.Contract.AuthorizedCallers(&_BaseFlashSwapper.CallOpts, arg0)
}
// CalculateFlashSwapFee is a free data retrieval call binding the contract method 0x62e0cd29.
//
// Solidity: function calculateFlashSwapFee(address pool, uint256 amount0, uint256 amount1) view returns(uint256 fee0, uint256 fee1)
func (_BaseFlashSwapper *BaseFlashSwapperCaller) CalculateFlashSwapFee(opts *bind.CallOpts, pool common.Address, amount0 *big.Int, amount1 *big.Int) (struct {
Fee0 *big.Int
Fee1 *big.Int
}, error) {
var out []interface{}
err := _BaseFlashSwapper.contract.Call(opts, &out, "calculateFlashSwapFee", pool, amount0, amount1)
outstruct := new(struct {
Fee0 *big.Int
Fee1 *big.Int
})
if err != nil {
return *outstruct, err
}
outstruct.Fee0 = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
outstruct.Fee1 = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
return *outstruct, err
}
// CalculateFlashSwapFee is a free data retrieval call binding the contract method 0x62e0cd29.
//
// Solidity: function calculateFlashSwapFee(address pool, uint256 amount0, uint256 amount1) view returns(uint256 fee0, uint256 fee1)
func (_BaseFlashSwapper *BaseFlashSwapperSession) CalculateFlashSwapFee(pool common.Address, amount0 *big.Int, amount1 *big.Int) (struct {
Fee0 *big.Int
Fee1 *big.Int
}, error) {
return _BaseFlashSwapper.Contract.CalculateFlashSwapFee(&_BaseFlashSwapper.CallOpts, pool, amount0, amount1)
}
// CalculateFlashSwapFee is a free data retrieval call binding the contract method 0x62e0cd29.
//
// Solidity: function calculateFlashSwapFee(address pool, uint256 amount0, uint256 amount1) view returns(uint256 fee0, uint256 fee1)
func (_BaseFlashSwapper *BaseFlashSwapperCallerSession) CalculateFlashSwapFee(pool common.Address, amount0 *big.Int, amount1 *big.Int) (struct {
Fee0 *big.Int
Fee1 *big.Int
}, error) {
return _BaseFlashSwapper.Contract.CalculateFlashSwapFee(&_BaseFlashSwapper.CallOpts, pool, amount0, amount1)
}
// CanExecuteEmergencyWithdraw is a free data retrieval call binding the contract method 0x2275566d.
//
// Solidity: function canExecuteEmergencyWithdraw(bytes32 requestId) view returns(bool)
func (_BaseFlashSwapper *BaseFlashSwapperCaller) CanExecuteEmergencyWithdraw(opts *bind.CallOpts, requestId [32]byte) (bool, error) {
var out []interface{}
err := _BaseFlashSwapper.contract.Call(opts, &out, "canExecuteEmergencyWithdraw", requestId)
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
// CanExecuteEmergencyWithdraw is a free data retrieval call binding the contract method 0x2275566d.
//
// Solidity: function canExecuteEmergencyWithdraw(bytes32 requestId) view returns(bool)
func (_BaseFlashSwapper *BaseFlashSwapperSession) CanExecuteEmergencyWithdraw(requestId [32]byte) (bool, error) {
return _BaseFlashSwapper.Contract.CanExecuteEmergencyWithdraw(&_BaseFlashSwapper.CallOpts, requestId)
}
// CanExecuteEmergencyWithdraw is a free data retrieval call binding the contract method 0x2275566d.
//
// Solidity: function canExecuteEmergencyWithdraw(bytes32 requestId) view returns(bool)
func (_BaseFlashSwapper *BaseFlashSwapperCallerSession) CanExecuteEmergencyWithdraw(requestId [32]byte) (bool, error) {
return _BaseFlashSwapper.Contract.CanExecuteEmergencyWithdraw(&_BaseFlashSwapper.CallOpts, requestId)
}
// EmergencyRequests is a free data retrieval call binding the contract method 0x0557ac41.
//
// Solidity: function emergencyRequests(bytes32 ) view returns(address token, uint256 amount, uint256 executeAfter, bool executed)
func (_BaseFlashSwapper *BaseFlashSwapperCaller) EmergencyRequests(opts *bind.CallOpts, arg0 [32]byte) (struct {
Token common.Address
Amount *big.Int
ExecuteAfter *big.Int
Executed bool
}, error) {
var out []interface{}
err := _BaseFlashSwapper.contract.Call(opts, &out, "emergencyRequests", arg0)
outstruct := new(struct {
Token common.Address
Amount *big.Int
ExecuteAfter *big.Int
Executed bool
})
if err != nil {
return *outstruct, err
}
outstruct.Token = *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
outstruct.Amount = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
outstruct.ExecuteAfter = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int)
outstruct.Executed = *abi.ConvertType(out[3], new(bool)).(*bool)
return *outstruct, err
}
// EmergencyRequests is a free data retrieval call binding the contract method 0x0557ac41.
//
// Solidity: function emergencyRequests(bytes32 ) view returns(address token, uint256 amount, uint256 executeAfter, bool executed)
func (_BaseFlashSwapper *BaseFlashSwapperSession) EmergencyRequests(arg0 [32]byte) (struct {
Token common.Address
Amount *big.Int
ExecuteAfter *big.Int
Executed bool
}, error) {
return _BaseFlashSwapper.Contract.EmergencyRequests(&_BaseFlashSwapper.CallOpts, arg0)
}
// EmergencyRequests is a free data retrieval call binding the contract method 0x0557ac41.
//
// Solidity: function emergencyRequests(bytes32 ) view returns(address token, uint256 amount, uint256 executeAfter, bool executed)
func (_BaseFlashSwapper *BaseFlashSwapperCallerSession) EmergencyRequests(arg0 [32]byte) (struct {
Token common.Address
Amount *big.Int
ExecuteAfter *big.Int
Executed bool
}, error) {
return _BaseFlashSwapper.Contract.EmergencyRequests(&_BaseFlashSwapper.CallOpts, arg0)
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_BaseFlashSwapper *BaseFlashSwapperCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _BaseFlashSwapper.contract.Call(opts, &out, "owner")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_BaseFlashSwapper *BaseFlashSwapperSession) Owner() (common.Address, error) {
return _BaseFlashSwapper.Contract.Owner(&_BaseFlashSwapper.CallOpts)
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_BaseFlashSwapper *BaseFlashSwapperCallerSession) Owner() (common.Address, error) {
return _BaseFlashSwapper.Contract.Owner(&_BaseFlashSwapper.CallOpts)
}
// CancelEmergencyWithdraw is a paid mutator transaction binding the contract method 0xfbe1a43f.
//
// Solidity: function cancelEmergencyWithdraw(bytes32 requestId) returns()
func (_BaseFlashSwapper *BaseFlashSwapperTransactor) CancelEmergencyWithdraw(opts *bind.TransactOpts, requestId [32]byte) (*types.Transaction, error) {
return _BaseFlashSwapper.contract.Transact(opts, "cancelEmergencyWithdraw", requestId)
}
// CancelEmergencyWithdraw is a paid mutator transaction binding the contract method 0xfbe1a43f.
//
// Solidity: function cancelEmergencyWithdraw(bytes32 requestId) returns()
func (_BaseFlashSwapper *BaseFlashSwapperSession) CancelEmergencyWithdraw(requestId [32]byte) (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.CancelEmergencyWithdraw(&_BaseFlashSwapper.TransactOpts, requestId)
}
// CancelEmergencyWithdraw is a paid mutator transaction binding the contract method 0xfbe1a43f.
//
// Solidity: function cancelEmergencyWithdraw(bytes32 requestId) returns()
func (_BaseFlashSwapper *BaseFlashSwapperTransactorSession) CancelEmergencyWithdraw(requestId [32]byte) (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.CancelEmergencyWithdraw(&_BaseFlashSwapper.TransactOpts, requestId)
}
// EmergencyWithdraw is a paid mutator transaction binding the contract method 0x95ccea67.
//
// Solidity: function emergencyWithdraw(address token, uint256 amount) returns()
func (_BaseFlashSwapper *BaseFlashSwapperTransactor) EmergencyWithdraw(opts *bind.TransactOpts, token common.Address, amount *big.Int) (*types.Transaction, error) {
return _BaseFlashSwapper.contract.Transact(opts, "emergencyWithdraw", token, amount)
}
// EmergencyWithdraw is a paid mutator transaction binding the contract method 0x95ccea67.
//
// Solidity: function emergencyWithdraw(address token, uint256 amount) returns()
func (_BaseFlashSwapper *BaseFlashSwapperSession) EmergencyWithdraw(token common.Address, amount *big.Int) (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.EmergencyWithdraw(&_BaseFlashSwapper.TransactOpts, token, amount)
}
// EmergencyWithdraw is a paid mutator transaction binding the contract method 0x95ccea67.
//
// Solidity: function emergencyWithdraw(address token, uint256 amount) returns()
func (_BaseFlashSwapper *BaseFlashSwapperTransactorSession) EmergencyWithdraw(token common.Address, amount *big.Int) (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.EmergencyWithdraw(&_BaseFlashSwapper.TransactOpts, token, amount)
}
// ExecuteEmergencyWithdraw is a paid mutator transaction binding the contract method 0x9ad3ec48.
//
// Solidity: function executeEmergencyWithdraw(bytes32 requestId) returns()
func (_BaseFlashSwapper *BaseFlashSwapperTransactor) ExecuteEmergencyWithdraw(opts *bind.TransactOpts, requestId [32]byte) (*types.Transaction, error) {
return _BaseFlashSwapper.contract.Transact(opts, "executeEmergencyWithdraw", requestId)
}
// ExecuteEmergencyWithdraw is a paid mutator transaction binding the contract method 0x9ad3ec48.
//
// Solidity: function executeEmergencyWithdraw(bytes32 requestId) returns()
func (_BaseFlashSwapper *BaseFlashSwapperSession) ExecuteEmergencyWithdraw(requestId [32]byte) (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.ExecuteEmergencyWithdraw(&_BaseFlashSwapper.TransactOpts, requestId)
}
// ExecuteEmergencyWithdraw is a paid mutator transaction binding the contract method 0x9ad3ec48.
//
// Solidity: function executeEmergencyWithdraw(bytes32 requestId) returns()
func (_BaseFlashSwapper *BaseFlashSwapperTransactorSession) ExecuteEmergencyWithdraw(requestId [32]byte) (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.ExecuteEmergencyWithdraw(&_BaseFlashSwapper.TransactOpts, requestId)
}
// ExecuteFlashSwap is a paid mutator transaction binding the contract method 0x87d103b2.
//
// Solidity: function executeFlashSwap(address pool, (address,address,uint256,uint256,address,bytes) params) returns()
func (_BaseFlashSwapper *BaseFlashSwapperTransactor) ExecuteFlashSwap(opts *bind.TransactOpts, pool common.Address, params IFlashSwapperFlashSwapParams) (*types.Transaction, error) {
return _BaseFlashSwapper.contract.Transact(opts, "executeFlashSwap", pool, params)
}
// ExecuteFlashSwap is a paid mutator transaction binding the contract method 0x87d103b2.
//
// Solidity: function executeFlashSwap(address pool, (address,address,uint256,uint256,address,bytes) params) returns()
func (_BaseFlashSwapper *BaseFlashSwapperSession) ExecuteFlashSwap(pool common.Address, params IFlashSwapperFlashSwapParams) (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.ExecuteFlashSwap(&_BaseFlashSwapper.TransactOpts, pool, params)
}
// ExecuteFlashSwap is a paid mutator transaction binding the contract method 0x87d103b2.
//
// Solidity: function executeFlashSwap(address pool, (address,address,uint256,uint256,address,bytes) params) returns()
func (_BaseFlashSwapper *BaseFlashSwapperTransactorSession) ExecuteFlashSwap(pool common.Address, params IFlashSwapperFlashSwapParams) (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.ExecuteFlashSwap(&_BaseFlashSwapper.TransactOpts, pool, params)
}
// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
//
// Solidity: function renounceOwnership() returns()
func (_BaseFlashSwapper *BaseFlashSwapperTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
return _BaseFlashSwapper.contract.Transact(opts, "renounceOwnership")
}
// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
//
// Solidity: function renounceOwnership() returns()
func (_BaseFlashSwapper *BaseFlashSwapperSession) RenounceOwnership() (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.RenounceOwnership(&_BaseFlashSwapper.TransactOpts)
}
// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
//
// Solidity: function renounceOwnership() returns()
func (_BaseFlashSwapper *BaseFlashSwapperTransactorSession) RenounceOwnership() (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.RenounceOwnership(&_BaseFlashSwapper.TransactOpts)
}
// RequestEmergencyWithdraw is a paid mutator transaction binding the contract method 0x7c7f4ce5.
//
// Solidity: function requestEmergencyWithdraw(address token, uint256 amount) returns()
func (_BaseFlashSwapper *BaseFlashSwapperTransactor) RequestEmergencyWithdraw(opts *bind.TransactOpts, token common.Address, amount *big.Int) (*types.Transaction, error) {
return _BaseFlashSwapper.contract.Transact(opts, "requestEmergencyWithdraw", token, amount)
}
// RequestEmergencyWithdraw is a paid mutator transaction binding the contract method 0x7c7f4ce5.
//
// Solidity: function requestEmergencyWithdraw(address token, uint256 amount) returns()
func (_BaseFlashSwapper *BaseFlashSwapperSession) RequestEmergencyWithdraw(token common.Address, amount *big.Int) (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.RequestEmergencyWithdraw(&_BaseFlashSwapper.TransactOpts, token, amount)
}
// RequestEmergencyWithdraw is a paid mutator transaction binding the contract method 0x7c7f4ce5.
//
// Solidity: function requestEmergencyWithdraw(address token, uint256 amount) returns()
func (_BaseFlashSwapper *BaseFlashSwapperTransactorSession) RequestEmergencyWithdraw(token common.Address, amount *big.Int) (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.RequestEmergencyWithdraw(&_BaseFlashSwapper.TransactOpts, token, amount)
}
// SetAuthorizedCaller is a paid mutator transaction binding the contract method 0x454bbd29.
//
// Solidity: function setAuthorizedCaller(address caller, bool authorized) returns()
func (_BaseFlashSwapper *BaseFlashSwapperTransactor) SetAuthorizedCaller(opts *bind.TransactOpts, caller common.Address, authorized bool) (*types.Transaction, error) {
return _BaseFlashSwapper.contract.Transact(opts, "setAuthorizedCaller", caller, authorized)
}
// SetAuthorizedCaller is a paid mutator transaction binding the contract method 0x454bbd29.
//
// Solidity: function setAuthorizedCaller(address caller, bool authorized) returns()
func (_BaseFlashSwapper *BaseFlashSwapperSession) SetAuthorizedCaller(caller common.Address, authorized bool) (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.SetAuthorizedCaller(&_BaseFlashSwapper.TransactOpts, caller, authorized)
}
// SetAuthorizedCaller is a paid mutator transaction binding the contract method 0x454bbd29.
//
// Solidity: function setAuthorizedCaller(address caller, bool authorized) returns()
func (_BaseFlashSwapper *BaseFlashSwapperTransactorSession) SetAuthorizedCaller(caller common.Address, authorized bool) (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.SetAuthorizedCaller(&_BaseFlashSwapper.TransactOpts, caller, authorized)
}
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
func (_BaseFlashSwapper *BaseFlashSwapperTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) {
return _BaseFlashSwapper.contract.Transact(opts, "transferOwnership", newOwner)
}
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
func (_BaseFlashSwapper *BaseFlashSwapperSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.TransferOwnership(&_BaseFlashSwapper.TransactOpts, newOwner)
}
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
func (_BaseFlashSwapper *BaseFlashSwapperTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.TransferOwnership(&_BaseFlashSwapper.TransactOpts, newOwner)
}
// Receive is a paid mutator transaction binding the contract receive function.
//
// Solidity: receive() payable returns()
func (_BaseFlashSwapper *BaseFlashSwapperTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) {
return _BaseFlashSwapper.contract.RawTransact(opts, nil) // calldata is disallowed for receive function
}
// Receive is a paid mutator transaction binding the contract receive function.
//
// Solidity: receive() payable returns()
func (_BaseFlashSwapper *BaseFlashSwapperSession) Receive() (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.Receive(&_BaseFlashSwapper.TransactOpts)
}
// Receive is a paid mutator transaction binding the contract receive function.
//
// Solidity: receive() payable returns()
func (_BaseFlashSwapper *BaseFlashSwapperTransactorSession) Receive() (*types.Transaction, error) {
return _BaseFlashSwapper.Contract.Receive(&_BaseFlashSwapper.TransactOpts)
}
// BaseFlashSwapperEmergencyWithdrawCancelledIterator is returned from FilterEmergencyWithdrawCancelled and is used to iterate over the raw logs and unpacked data for EmergencyWithdrawCancelled events raised by the BaseFlashSwapper contract.
type BaseFlashSwapperEmergencyWithdrawCancelledIterator struct {
Event *BaseFlashSwapperEmergencyWithdrawCancelled // 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 *BaseFlashSwapperEmergencyWithdrawCancelledIterator) 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(BaseFlashSwapperEmergencyWithdrawCancelled)
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(BaseFlashSwapperEmergencyWithdrawCancelled)
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 *BaseFlashSwapperEmergencyWithdrawCancelledIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *BaseFlashSwapperEmergencyWithdrawCancelledIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// BaseFlashSwapperEmergencyWithdrawCancelled represents a EmergencyWithdrawCancelled event raised by the BaseFlashSwapper contract.
type BaseFlashSwapperEmergencyWithdrawCancelled struct {
RequestId [32]byte
Raw types.Log // Blockchain specific contextual infos
}
// FilterEmergencyWithdrawCancelled is a free log retrieval operation binding the contract event 0xc8fdc0bbef3c457a504d7142a467f41bd5c16eaa1b1d316b1efef96a92457f3c.
//
// Solidity: event EmergencyWithdrawCancelled(bytes32 indexed requestId)
func (_BaseFlashSwapper *BaseFlashSwapperFilterer) FilterEmergencyWithdrawCancelled(opts *bind.FilterOpts, requestId [][32]byte) (*BaseFlashSwapperEmergencyWithdrawCancelledIterator, error) {
var requestIdRule []interface{}
for _, requestIdItem := range requestId {
requestIdRule = append(requestIdRule, requestIdItem)
}
logs, sub, err := _BaseFlashSwapper.contract.FilterLogs(opts, "EmergencyWithdrawCancelled", requestIdRule)
if err != nil {
return nil, err
}
return &BaseFlashSwapperEmergencyWithdrawCancelledIterator{contract: _BaseFlashSwapper.contract, event: "EmergencyWithdrawCancelled", logs: logs, sub: sub}, nil
}
// WatchEmergencyWithdrawCancelled is a free log subscription operation binding the contract event 0xc8fdc0bbef3c457a504d7142a467f41bd5c16eaa1b1d316b1efef96a92457f3c.
//
// Solidity: event EmergencyWithdrawCancelled(bytes32 indexed requestId)
func (_BaseFlashSwapper *BaseFlashSwapperFilterer) WatchEmergencyWithdrawCancelled(opts *bind.WatchOpts, sink chan<- *BaseFlashSwapperEmergencyWithdrawCancelled, requestId [][32]byte) (event.Subscription, error) {
var requestIdRule []interface{}
for _, requestIdItem := range requestId {
requestIdRule = append(requestIdRule, requestIdItem)
}
logs, sub, err := _BaseFlashSwapper.contract.WatchLogs(opts, "EmergencyWithdrawCancelled", requestIdRule)
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(BaseFlashSwapperEmergencyWithdrawCancelled)
if err := _BaseFlashSwapper.contract.UnpackLog(event, "EmergencyWithdrawCancelled", 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
}
// ParseEmergencyWithdrawCancelled is a log parse operation binding the contract event 0xc8fdc0bbef3c457a504d7142a467f41bd5c16eaa1b1d316b1efef96a92457f3c.
//
// Solidity: event EmergencyWithdrawCancelled(bytes32 indexed requestId)
func (_BaseFlashSwapper *BaseFlashSwapperFilterer) ParseEmergencyWithdrawCancelled(log types.Log) (*BaseFlashSwapperEmergencyWithdrawCancelled, error) {
event := new(BaseFlashSwapperEmergencyWithdrawCancelled)
if err := _BaseFlashSwapper.contract.UnpackLog(event, "EmergencyWithdrawCancelled", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// BaseFlashSwapperEmergencyWithdrawExecutedIterator is returned from FilterEmergencyWithdrawExecuted and is used to iterate over the raw logs and unpacked data for EmergencyWithdrawExecuted events raised by the BaseFlashSwapper contract.
type BaseFlashSwapperEmergencyWithdrawExecutedIterator struct {
Event *BaseFlashSwapperEmergencyWithdrawExecuted // 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 *BaseFlashSwapperEmergencyWithdrawExecutedIterator) 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(BaseFlashSwapperEmergencyWithdrawExecuted)
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(BaseFlashSwapperEmergencyWithdrawExecuted)
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 *BaseFlashSwapperEmergencyWithdrawExecutedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *BaseFlashSwapperEmergencyWithdrawExecutedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// BaseFlashSwapperEmergencyWithdrawExecuted represents a EmergencyWithdrawExecuted event raised by the BaseFlashSwapper contract.
type BaseFlashSwapperEmergencyWithdrawExecuted struct {
RequestId [32]byte
Token common.Address
Amount *big.Int
Raw types.Log // Blockchain specific contextual infos
}
// FilterEmergencyWithdrawExecuted is a free log retrieval operation binding the contract event 0xac1588e122eedb6af5a0e5e3a5f41eea47cd8359422fc2450adef2b3492d1a59.
//
// Solidity: event EmergencyWithdrawExecuted(bytes32 indexed requestId, address indexed token, uint256 amount)
func (_BaseFlashSwapper *BaseFlashSwapperFilterer) FilterEmergencyWithdrawExecuted(opts *bind.FilterOpts, requestId [][32]byte, token []common.Address) (*BaseFlashSwapperEmergencyWithdrawExecutedIterator, error) {
var requestIdRule []interface{}
for _, requestIdItem := range requestId {
requestIdRule = append(requestIdRule, requestIdItem)
}
var tokenRule []interface{}
for _, tokenItem := range token {
tokenRule = append(tokenRule, tokenItem)
}
logs, sub, err := _BaseFlashSwapper.contract.FilterLogs(opts, "EmergencyWithdrawExecuted", requestIdRule, tokenRule)
if err != nil {
return nil, err
}
return &BaseFlashSwapperEmergencyWithdrawExecutedIterator{contract: _BaseFlashSwapper.contract, event: "EmergencyWithdrawExecuted", logs: logs, sub: sub}, nil
}
// WatchEmergencyWithdrawExecuted is a free log subscription operation binding the contract event 0xac1588e122eedb6af5a0e5e3a5f41eea47cd8359422fc2450adef2b3492d1a59.
//
// Solidity: event EmergencyWithdrawExecuted(bytes32 indexed requestId, address indexed token, uint256 amount)
func (_BaseFlashSwapper *BaseFlashSwapperFilterer) WatchEmergencyWithdrawExecuted(opts *bind.WatchOpts, sink chan<- *BaseFlashSwapperEmergencyWithdrawExecuted, requestId [][32]byte, token []common.Address) (event.Subscription, error) {
var requestIdRule []interface{}
for _, requestIdItem := range requestId {
requestIdRule = append(requestIdRule, requestIdItem)
}
var tokenRule []interface{}
for _, tokenItem := range token {
tokenRule = append(tokenRule, tokenItem)
}
logs, sub, err := _BaseFlashSwapper.contract.WatchLogs(opts, "EmergencyWithdrawExecuted", requestIdRule, tokenRule)
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(BaseFlashSwapperEmergencyWithdrawExecuted)
if err := _BaseFlashSwapper.contract.UnpackLog(event, "EmergencyWithdrawExecuted", 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
}
// ParseEmergencyWithdrawExecuted is a log parse operation binding the contract event 0xac1588e122eedb6af5a0e5e3a5f41eea47cd8359422fc2450adef2b3492d1a59.
//
// Solidity: event EmergencyWithdrawExecuted(bytes32 indexed requestId, address indexed token, uint256 amount)
func (_BaseFlashSwapper *BaseFlashSwapperFilterer) ParseEmergencyWithdrawExecuted(log types.Log) (*BaseFlashSwapperEmergencyWithdrawExecuted, error) {
event := new(BaseFlashSwapperEmergencyWithdrawExecuted)
if err := _BaseFlashSwapper.contract.UnpackLog(event, "EmergencyWithdrawExecuted", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// BaseFlashSwapperEmergencyWithdrawRequestedIterator is returned from FilterEmergencyWithdrawRequested and is used to iterate over the raw logs and unpacked data for EmergencyWithdrawRequested events raised by the BaseFlashSwapper contract.
type BaseFlashSwapperEmergencyWithdrawRequestedIterator struct {
Event *BaseFlashSwapperEmergencyWithdrawRequested // 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 *BaseFlashSwapperEmergencyWithdrawRequestedIterator) 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(BaseFlashSwapperEmergencyWithdrawRequested)
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(BaseFlashSwapperEmergencyWithdrawRequested)
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 *BaseFlashSwapperEmergencyWithdrawRequestedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *BaseFlashSwapperEmergencyWithdrawRequestedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// BaseFlashSwapperEmergencyWithdrawRequested represents a EmergencyWithdrawRequested event raised by the BaseFlashSwapper contract.
type BaseFlashSwapperEmergencyWithdrawRequested struct {
RequestId [32]byte
Token common.Address
Amount *big.Int
ExecuteAfter *big.Int
Raw types.Log // Blockchain specific contextual infos
}
// FilterEmergencyWithdrawRequested is a free log retrieval operation binding the contract event 0xf3e5fdcc801d2636fa5ac7da5f82875c80218c24690f9c51d37007d662c4804e.
//
// Solidity: event EmergencyWithdrawRequested(bytes32 indexed requestId, address indexed token, uint256 amount, uint256 executeAfter)
func (_BaseFlashSwapper *BaseFlashSwapperFilterer) FilterEmergencyWithdrawRequested(opts *bind.FilterOpts, requestId [][32]byte, token []common.Address) (*BaseFlashSwapperEmergencyWithdrawRequestedIterator, error) {
var requestIdRule []interface{}
for _, requestIdItem := range requestId {
requestIdRule = append(requestIdRule, requestIdItem)
}
var tokenRule []interface{}
for _, tokenItem := range token {
tokenRule = append(tokenRule, tokenItem)
}
logs, sub, err := _BaseFlashSwapper.contract.FilterLogs(opts, "EmergencyWithdrawRequested", requestIdRule, tokenRule)
if err != nil {
return nil, err
}
return &BaseFlashSwapperEmergencyWithdrawRequestedIterator{contract: _BaseFlashSwapper.contract, event: "EmergencyWithdrawRequested", logs: logs, sub: sub}, nil
}
// WatchEmergencyWithdrawRequested is a free log subscription operation binding the contract event 0xf3e5fdcc801d2636fa5ac7da5f82875c80218c24690f9c51d37007d662c4804e.
//
// Solidity: event EmergencyWithdrawRequested(bytes32 indexed requestId, address indexed token, uint256 amount, uint256 executeAfter)
func (_BaseFlashSwapper *BaseFlashSwapperFilterer) WatchEmergencyWithdrawRequested(opts *bind.WatchOpts, sink chan<- *BaseFlashSwapperEmergencyWithdrawRequested, requestId [][32]byte, token []common.Address) (event.Subscription, error) {
var requestIdRule []interface{}
for _, requestIdItem := range requestId {
requestIdRule = append(requestIdRule, requestIdItem)
}
var tokenRule []interface{}
for _, tokenItem := range token {
tokenRule = append(tokenRule, tokenItem)
}
logs, sub, err := _BaseFlashSwapper.contract.WatchLogs(opts, "EmergencyWithdrawRequested", requestIdRule, tokenRule)
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(BaseFlashSwapperEmergencyWithdrawRequested)
if err := _BaseFlashSwapper.contract.UnpackLog(event, "EmergencyWithdrawRequested", 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
}
// ParseEmergencyWithdrawRequested is a log parse operation binding the contract event 0xf3e5fdcc801d2636fa5ac7da5f82875c80218c24690f9c51d37007d662c4804e.
//
// Solidity: event EmergencyWithdrawRequested(bytes32 indexed requestId, address indexed token, uint256 amount, uint256 executeAfter)
func (_BaseFlashSwapper *BaseFlashSwapperFilterer) ParseEmergencyWithdrawRequested(log types.Log) (*BaseFlashSwapperEmergencyWithdrawRequested, error) {
event := new(BaseFlashSwapperEmergencyWithdrawRequested)
if err := _BaseFlashSwapper.contract.UnpackLog(event, "EmergencyWithdrawRequested", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// BaseFlashSwapperFlashSwapExecutedIterator is returned from FilterFlashSwapExecuted and is used to iterate over the raw logs and unpacked data for FlashSwapExecuted events raised by the BaseFlashSwapper contract.
type BaseFlashSwapperFlashSwapExecutedIterator struct {
Event *BaseFlashSwapperFlashSwapExecuted // 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 *BaseFlashSwapperFlashSwapExecutedIterator) 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(BaseFlashSwapperFlashSwapExecuted)
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(BaseFlashSwapperFlashSwapExecuted)
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 *BaseFlashSwapperFlashSwapExecutedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *BaseFlashSwapperFlashSwapExecutedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// BaseFlashSwapperFlashSwapExecuted represents a FlashSwapExecuted event raised by the BaseFlashSwapper contract.
type BaseFlashSwapperFlashSwapExecuted struct {
Pool common.Address
Token0 common.Address
Token1 common.Address
Amount0 *big.Int
Amount1 *big.Int
To common.Address
Raw types.Log // Blockchain specific contextual infos
}
// FilterFlashSwapExecuted is a free log retrieval operation binding the contract event 0xbb6869143c8313bafd99561992525080ebbf80680bcb6d01e342850dcf9caa85.
//
// Solidity: event FlashSwapExecuted(address indexed pool, address indexed token0, address indexed token1, uint256 amount0, uint256 amount1, address to)
func (_BaseFlashSwapper *BaseFlashSwapperFilterer) FilterFlashSwapExecuted(opts *bind.FilterOpts, pool []common.Address, token0 []common.Address, token1 []common.Address) (*BaseFlashSwapperFlashSwapExecutedIterator, error) {
var poolRule []interface{}
for _, poolItem := range pool {
poolRule = append(poolRule, poolItem)
}
var token0Rule []interface{}
for _, token0Item := range token0 {
token0Rule = append(token0Rule, token0Item)
}
var token1Rule []interface{}
for _, token1Item := range token1 {
token1Rule = append(token1Rule, token1Item)
}
logs, sub, err := _BaseFlashSwapper.contract.FilterLogs(opts, "FlashSwapExecuted", poolRule, token0Rule, token1Rule)
if err != nil {
return nil, err
}
return &BaseFlashSwapperFlashSwapExecutedIterator{contract: _BaseFlashSwapper.contract, event: "FlashSwapExecuted", logs: logs, sub: sub}, nil
}
// WatchFlashSwapExecuted is a free log subscription operation binding the contract event 0xbb6869143c8313bafd99561992525080ebbf80680bcb6d01e342850dcf9caa85.
//
// Solidity: event FlashSwapExecuted(address indexed pool, address indexed token0, address indexed token1, uint256 amount0, uint256 amount1, address to)
func (_BaseFlashSwapper *BaseFlashSwapperFilterer) WatchFlashSwapExecuted(opts *bind.WatchOpts, sink chan<- *BaseFlashSwapperFlashSwapExecuted, pool []common.Address, token0 []common.Address, token1 []common.Address) (event.Subscription, error) {
var poolRule []interface{}
for _, poolItem := range pool {
poolRule = append(poolRule, poolItem)
}
var token0Rule []interface{}
for _, token0Item := range token0 {
token0Rule = append(token0Rule, token0Item)
}
var token1Rule []interface{}
for _, token1Item := range token1 {
token1Rule = append(token1Rule, token1Item)
}
logs, sub, err := _BaseFlashSwapper.contract.WatchLogs(opts, "FlashSwapExecuted", poolRule, token0Rule, token1Rule)
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(BaseFlashSwapperFlashSwapExecuted)
if err := _BaseFlashSwapper.contract.UnpackLog(event, "FlashSwapExecuted", 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
}
// ParseFlashSwapExecuted is a log parse operation binding the contract event 0xbb6869143c8313bafd99561992525080ebbf80680bcb6d01e342850dcf9caa85.
//
// Solidity: event FlashSwapExecuted(address indexed pool, address indexed token0, address indexed token1, uint256 amount0, uint256 amount1, address to)
func (_BaseFlashSwapper *BaseFlashSwapperFilterer) ParseFlashSwapExecuted(log types.Log) (*BaseFlashSwapperFlashSwapExecuted, error) {
event := new(BaseFlashSwapperFlashSwapExecuted)
if err := _BaseFlashSwapper.contract.UnpackLog(event, "FlashSwapExecuted", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// BaseFlashSwapperOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the BaseFlashSwapper contract.
type BaseFlashSwapperOwnershipTransferredIterator struct {
Event *BaseFlashSwapperOwnershipTransferred // 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 *BaseFlashSwapperOwnershipTransferredIterator) 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(BaseFlashSwapperOwnershipTransferred)
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(BaseFlashSwapperOwnershipTransferred)
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 *BaseFlashSwapperOwnershipTransferredIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *BaseFlashSwapperOwnershipTransferredIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// BaseFlashSwapperOwnershipTransferred represents a OwnershipTransferred event raised by the BaseFlashSwapper contract.
type BaseFlashSwapperOwnershipTransferred struct {
PreviousOwner common.Address
NewOwner common.Address
Raw types.Log // Blockchain specific contextual infos
}
// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
func (_BaseFlashSwapper *BaseFlashSwapperFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*BaseFlashSwapperOwnershipTransferredIterator, error) {
var previousOwnerRule []interface{}
for _, previousOwnerItem := range previousOwner {
previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
}
var newOwnerRule []interface{}
for _, newOwnerItem := range newOwner {
newOwnerRule = append(newOwnerRule, newOwnerItem)
}
logs, sub, err := _BaseFlashSwapper.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
if err != nil {
return nil, err
}
return &BaseFlashSwapperOwnershipTransferredIterator{contract: _BaseFlashSwapper.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil
}
// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
func (_BaseFlashSwapper *BaseFlashSwapperFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *BaseFlashSwapperOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) {
var previousOwnerRule []interface{}
for _, previousOwnerItem := range previousOwner {
previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
}
var newOwnerRule []interface{}
for _, newOwnerItem := range newOwner {
newOwnerRule = append(newOwnerRule, newOwnerItem)
}
logs, sub, err := _BaseFlashSwapper.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(BaseFlashSwapperOwnershipTransferred)
if err := _BaseFlashSwapper.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
func (_BaseFlashSwapper *BaseFlashSwapperFilterer) ParseOwnershipTransferred(log types.Log) (*BaseFlashSwapperOwnershipTransferred, error) {
event := new(BaseFlashSwapperOwnershipTransferred)
if err := _BaseFlashSwapper.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}