// Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. package uniswap_v3 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 ) // ISwapRouterExactInputParams is an auto generated low-level Go binding around an user-defined struct. type ISwapRouterExactInputParams struct { Path []byte Recipient common.Address Deadline *big.Int AmountIn *big.Int AmountOutMinimum *big.Int } // ISwapRouterExactInputSingleParams is an auto generated low-level Go binding around an user-defined struct. type ISwapRouterExactInputSingleParams struct { TokenIn common.Address TokenOut common.Address Fee *big.Int Recipient common.Address Deadline *big.Int AmountIn *big.Int AmountOutMinimum *big.Int SqrtPriceLimitX96 *big.Int } // ISwapRouterExactOutputParams is an auto generated low-level Go binding around an user-defined struct. type ISwapRouterExactOutputParams struct { Path []byte Recipient common.Address Deadline *big.Int AmountOut *big.Int AmountInMaximum *big.Int } // ISwapRouterExactOutputSingleParams is an auto generated low-level Go binding around an user-defined struct. type ISwapRouterExactOutputSingleParams struct { TokenIn common.Address TokenOut common.Address Fee *big.Int Recipient common.Address Deadline *big.Int AmountOut *big.Int AmountInMaximum *big.Int SqrtPriceLimitX96 *big.Int } // SwapRouterMetaData contains all meta data concerning the SwapRouter contract. var SwapRouterMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMinimum\",\"type\":\"uint256\"},{\"internalType\":\"uint160\",\"name\":\"sqrtPriceLimitX96\",\"type\":\"uint160\"}],\"internalType\":\"structISwapRouter.ExactInputSingleParams\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"exactInputSingle\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"path\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMinimum\",\"type\":\"uint256\"}],\"internalType\":\"structISwapRouter.ExactInputParams\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"exactInput\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMaximum\",\"type\":\"uint256\"},{\"internalType\":\"uint160\",\"name\":\"sqrtPriceLimitX96\",\"type\":\"uint160\"}],\"internalType\":\"structISwapRouter.ExactOutputSingleParams\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"exactOutputSingle\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"path\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMaximum\",\"type\":\"uint256\"}],\"internalType\":\"structISwapRouter.ExactOutputParams\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"exactOutput\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"}]", } // SwapRouterABI is the input ABI used to generate the binding from. // Deprecated: Use SwapRouterMetaData.ABI instead. var SwapRouterABI = SwapRouterMetaData.ABI // SwapRouter is an auto generated Go binding around an Ethereum contract. type SwapRouter struct { SwapRouterCaller // Read-only binding to the contract SwapRouterTransactor // Write-only binding to the contract SwapRouterFilterer // Log filterer for contract events } // SwapRouterCaller is an auto generated read-only Go binding around an Ethereum contract. type SwapRouterCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // SwapRouterTransactor is an auto generated write-only Go binding around an Ethereum contract. type SwapRouterTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // SwapRouterFilterer is an auto generated log filtering Go binding around an Ethereum contract events. type SwapRouterFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // SwapRouterSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. type SwapRouterSession struct { Contract *SwapRouter // 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 } // SwapRouterCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. type SwapRouterCallerSession struct { Contract *SwapRouterCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } // SwapRouterTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. type SwapRouterTransactorSession struct { Contract *SwapRouterTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // SwapRouterRaw is an auto generated low-level Go binding around an Ethereum contract. type SwapRouterRaw struct { Contract *SwapRouter // Generic contract binding to access the raw methods on } // SwapRouterCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. type SwapRouterCallerRaw struct { Contract *SwapRouterCaller // Generic read-only contract binding to access the raw methods on } // SwapRouterTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. type SwapRouterTransactorRaw struct { Contract *SwapRouterTransactor // Generic write-only contract binding to access the raw methods on } // NewSwapRouter creates a new instance of SwapRouter, bound to a specific deployed contract. func NewSwapRouter(address common.Address, backend bind.ContractBackend) (*SwapRouter, error) { contract, err := bindSwapRouter(address, backend, backend, backend) if err != nil { return nil, err } return &SwapRouter{SwapRouterCaller: SwapRouterCaller{contract: contract}, SwapRouterTransactor: SwapRouterTransactor{contract: contract}, SwapRouterFilterer: SwapRouterFilterer{contract: contract}}, nil } // NewSwapRouterCaller creates a new read-only instance of SwapRouter, bound to a specific deployed contract. func NewSwapRouterCaller(address common.Address, caller bind.ContractCaller) (*SwapRouterCaller, error) { contract, err := bindSwapRouter(address, caller, nil, nil) if err != nil { return nil, err } return &SwapRouterCaller{contract: contract}, nil } // NewSwapRouterTransactor creates a new write-only instance of SwapRouter, bound to a specific deployed contract. func NewSwapRouterTransactor(address common.Address, transactor bind.ContractTransactor) (*SwapRouterTransactor, error) { contract, err := bindSwapRouter(address, nil, transactor, nil) if err != nil { return nil, err } return &SwapRouterTransactor{contract: contract}, nil } // NewSwapRouterFilterer creates a new log filterer instance of SwapRouter, bound to a specific deployed contract. func NewSwapRouterFilterer(address common.Address, filterer bind.ContractFilterer) (*SwapRouterFilterer, error) { contract, err := bindSwapRouter(address, nil, nil, filterer) if err != nil { return nil, err } return &SwapRouterFilterer{contract: contract}, nil } // bindSwapRouter binds a generic wrapper to an already deployed contract. func bindSwapRouter(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { parsed, err := SwapRouterMetaData.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 (_SwapRouter *SwapRouterRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _SwapRouter.Contract.SwapRouterCaller.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 (_SwapRouter *SwapRouterRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _SwapRouter.Contract.SwapRouterTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_SwapRouter *SwapRouterRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _SwapRouter.Contract.SwapRouterTransactor.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 (_SwapRouter *SwapRouterCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _SwapRouter.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 (_SwapRouter *SwapRouterTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _SwapRouter.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_SwapRouter *SwapRouterTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _SwapRouter.Contract.contract.Transact(opts, method, params...) } // ExactInput is a paid mutator transaction binding the contract method 0xc04b8d59. // // Solidity: function exactInput((bytes,address,uint256,uint256,uint256) params) payable returns(uint256 amountOut) func (_SwapRouter *SwapRouterTransactor) ExactInput(opts *bind.TransactOpts, params ISwapRouterExactInputParams) (*types.Transaction, error) { return _SwapRouter.contract.Transact(opts, "exactInput", params) } // ExactInput is a paid mutator transaction binding the contract method 0xc04b8d59. // // Solidity: function exactInput((bytes,address,uint256,uint256,uint256) params) payable returns(uint256 amountOut) func (_SwapRouter *SwapRouterSession) ExactInput(params ISwapRouterExactInputParams) (*types.Transaction, error) { return _SwapRouter.Contract.ExactInput(&_SwapRouter.TransactOpts, params) } // ExactInput is a paid mutator transaction binding the contract method 0xc04b8d59. // // Solidity: function exactInput((bytes,address,uint256,uint256,uint256) params) payable returns(uint256 amountOut) func (_SwapRouter *SwapRouterTransactorSession) ExactInput(params ISwapRouterExactInputParams) (*types.Transaction, error) { return _SwapRouter.Contract.ExactInput(&_SwapRouter.TransactOpts, params) } // ExactInputSingle is a paid mutator transaction binding the contract method 0x414bf389. // // Solidity: function exactInputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160) params) payable returns(uint256 amountOut) func (_SwapRouter *SwapRouterTransactor) ExactInputSingle(opts *bind.TransactOpts, params ISwapRouterExactInputSingleParams) (*types.Transaction, error) { return _SwapRouter.contract.Transact(opts, "exactInputSingle", params) } // ExactInputSingle is a paid mutator transaction binding the contract method 0x414bf389. // // Solidity: function exactInputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160) params) payable returns(uint256 amountOut) func (_SwapRouter *SwapRouterSession) ExactInputSingle(params ISwapRouterExactInputSingleParams) (*types.Transaction, error) { return _SwapRouter.Contract.ExactInputSingle(&_SwapRouter.TransactOpts, params) } // ExactInputSingle is a paid mutator transaction binding the contract method 0x414bf389. // // Solidity: function exactInputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160) params) payable returns(uint256 amountOut) func (_SwapRouter *SwapRouterTransactorSession) ExactInputSingle(params ISwapRouterExactInputSingleParams) (*types.Transaction, error) { return _SwapRouter.Contract.ExactInputSingle(&_SwapRouter.TransactOpts, params) } // ExactOutput is a paid mutator transaction binding the contract method 0xf28c0498. // // Solidity: function exactOutput((bytes,address,uint256,uint256,uint256) params) payable returns(uint256 amountIn) func (_SwapRouter *SwapRouterTransactor) ExactOutput(opts *bind.TransactOpts, params ISwapRouterExactOutputParams) (*types.Transaction, error) { return _SwapRouter.contract.Transact(opts, "exactOutput", params) } // ExactOutput is a paid mutator transaction binding the contract method 0xf28c0498. // // Solidity: function exactOutput((bytes,address,uint256,uint256,uint256) params) payable returns(uint256 amountIn) func (_SwapRouter *SwapRouterSession) ExactOutput(params ISwapRouterExactOutputParams) (*types.Transaction, error) { return _SwapRouter.Contract.ExactOutput(&_SwapRouter.TransactOpts, params) } // ExactOutput is a paid mutator transaction binding the contract method 0xf28c0498. // // Solidity: function exactOutput((bytes,address,uint256,uint256,uint256) params) payable returns(uint256 amountIn) func (_SwapRouter *SwapRouterTransactorSession) ExactOutput(params ISwapRouterExactOutputParams) (*types.Transaction, error) { return _SwapRouter.Contract.ExactOutput(&_SwapRouter.TransactOpts, params) } // ExactOutputSingle is a paid mutator transaction binding the contract method 0xdb3e2198. // // Solidity: function exactOutputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160) params) payable returns(uint256 amountIn) func (_SwapRouter *SwapRouterTransactor) ExactOutputSingle(opts *bind.TransactOpts, params ISwapRouterExactOutputSingleParams) (*types.Transaction, error) { return _SwapRouter.contract.Transact(opts, "exactOutputSingle", params) } // ExactOutputSingle is a paid mutator transaction binding the contract method 0xdb3e2198. // // Solidity: function exactOutputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160) params) payable returns(uint256 amountIn) func (_SwapRouter *SwapRouterSession) ExactOutputSingle(params ISwapRouterExactOutputSingleParams) (*types.Transaction, error) { return _SwapRouter.Contract.ExactOutputSingle(&_SwapRouter.TransactOpts, params) } // ExactOutputSingle is a paid mutator transaction binding the contract method 0xdb3e2198. // // Solidity: function exactOutputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160) params) payable returns(uint256 amountIn) func (_SwapRouter *SwapRouterTransactorSession) ExactOutputSingle(params ISwapRouterExactOutputSingleParams) (*types.Transaction, error) { return _SwapRouter.Contract.ExactOutputSingle(&_SwapRouter.TransactOpts, params) }