Documentation ¶
Index ¶
- Variables
- type ISwapRouterExactInputParams
- type ISwapRouterExactInputSingleParams
- type ISwapRouterExactOutputParams
- type ISwapRouterExactOutputSingleParams
- type UniswapRouter
- type UniswapRouterCaller
- type UniswapRouterCallerRaw
- type UniswapRouterCallerSession
- type UniswapRouterFilterer
- type UniswapRouterRaw
- func (_UniswapRouter *UniswapRouterRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, ...) error
- func (_UniswapRouter *UniswapRouterRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (_UniswapRouter *UniswapRouterRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type UniswapRouterSession
- func (_UniswapRouter *UniswapRouterSession) ExactInput(params ISwapRouterExactInputParams) (*types.Transaction, error)
- func (_UniswapRouter *UniswapRouterSession) ExactInputSingle(params ISwapRouterExactInputSingleParams) (*types.Transaction, error)
- func (_UniswapRouter *UniswapRouterSession) ExactOutput(params ISwapRouterExactOutputParams) (*types.Transaction, error)
- func (_UniswapRouter *UniswapRouterSession) ExactOutputSingle(params ISwapRouterExactOutputSingleParams) (*types.Transaction, error)
- func (_UniswapRouter *UniswapRouterSession) UniswapV3SwapCallback(amount0Delta *big.Int, amount1Delta *big.Int, data []byte) (*types.Transaction, error)
- type UniswapRouterTransactor
- func (_UniswapRouter *UniswapRouterTransactor) ExactInput(opts *bind.TransactOpts, params ISwapRouterExactInputParams) (*types.Transaction, error)
- func (_UniswapRouter *UniswapRouterTransactor) ExactInputSingle(opts *bind.TransactOpts, params ISwapRouterExactInputSingleParams) (*types.Transaction, error)
- func (_UniswapRouter *UniswapRouterTransactor) ExactOutput(opts *bind.TransactOpts, params ISwapRouterExactOutputParams) (*types.Transaction, error)
- func (_UniswapRouter *UniswapRouterTransactor) ExactOutputSingle(opts *bind.TransactOpts, params ISwapRouterExactOutputSingleParams) (*types.Transaction, error)
- func (_UniswapRouter *UniswapRouterTransactor) UniswapV3SwapCallback(opts *bind.TransactOpts, amount0Delta *big.Int, amount1Delta *big.Int, ...) (*types.Transaction, error)
- type UniswapRouterTransactorRaw
- type UniswapRouterTransactorSession
- func (_UniswapRouter *UniswapRouterTransactorSession) ExactInput(params ISwapRouterExactInputParams) (*types.Transaction, error)
- func (_UniswapRouter *UniswapRouterTransactorSession) ExactInputSingle(params ISwapRouterExactInputSingleParams) (*types.Transaction, error)
- func (_UniswapRouter *UniswapRouterTransactorSession) ExactOutput(params ISwapRouterExactOutputParams) (*types.Transaction, error)
- func (_UniswapRouter *UniswapRouterTransactorSession) ExactOutputSingle(params ISwapRouterExactOutputSingleParams) (*types.Transaction, error)
- func (_UniswapRouter *UniswapRouterTransactorSession) UniswapV3SwapCallback(amount0Delta *big.Int, amount1Delta *big.Int, data []byte) (*types.Transaction, error)
Constants ¶
This section is empty.
Variables ¶
var UniswapRouterABI = UniswapRouterMetaData.ABI
UniswapRouterABI is the input ABI used to generate the binding from. Deprecated: Use UniswapRouterMetaData.ABI instead.
var UniswapRouterMetaData = &bind.MetaData{
ABI: "[{\"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\":\"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\":\"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\"},{\"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\":[{\"internalType\":\"int256\",\"name\":\"amount0Delta\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"amount1Delta\",\"type\":\"int256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"uniswapV3SwapCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
}
UniswapRouterMetaData contains all meta data concerning the UniswapRouter contract.
Functions ¶
This section is empty.
Types ¶
type ISwapRouterExactInputParams ¶
type ISwapRouterExactInputParams struct { Path []byte Recipient common.Address Deadline *big.Int AmountIn *big.Int AmountOutMinimum *big.Int }
ISwapRouterExactInputParams is an auto generated low-level Go binding around an user-defined struct.
type ISwapRouterExactInputSingleParams ¶
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 }
ISwapRouterExactInputSingleParams is an auto generated low-level Go binding around an user-defined struct.
type ISwapRouterExactOutputParams ¶
type ISwapRouterExactOutputParams struct { Path []byte Recipient common.Address Deadline *big.Int AmountOut *big.Int AmountInMaximum *big.Int }
ISwapRouterExactOutputParams is an auto generated low-level Go binding around an user-defined struct.
type ISwapRouterExactOutputSingleParams ¶
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 }
ISwapRouterExactOutputSingleParams is an auto generated low-level Go binding around an user-defined struct.
type UniswapRouter ¶
type UniswapRouter struct { UniswapRouterCaller // Read-only binding to the contract UniswapRouterTransactor // Write-only binding to the contract UniswapRouterFilterer // Log filterer for contract events }
UniswapRouter is an auto generated Go binding around an Ethereum contract.
func NewUniswapRouter ¶
func NewUniswapRouter(address common.Address, backend bind.ContractBackend) (*UniswapRouter, error)
NewUniswapRouter creates a new instance of UniswapRouter, bound to a specific deployed contract.
type UniswapRouterCaller ¶
type UniswapRouterCaller struct {
// contains filtered or unexported fields
}
UniswapRouterCaller is an auto generated read-only Go binding around an Ethereum contract.
func NewUniswapRouterCaller ¶
func NewUniswapRouterCaller(address common.Address, caller bind.ContractCaller) (*UniswapRouterCaller, error)
NewUniswapRouterCaller creates a new read-only instance of UniswapRouter, bound to a specific deployed contract.
type UniswapRouterCallerRaw ¶
type UniswapRouterCallerRaw struct {
Contract *UniswapRouterCaller // Generic read-only contract binding to access the raw methods on
}
UniswapRouterCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
func (*UniswapRouterCallerRaw) Call ¶
func (_UniswapRouter *UniswapRouterCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error
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.
type UniswapRouterCallerSession ¶
type UniswapRouterCallerSession struct { Contract *UniswapRouterCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
UniswapRouterCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
type UniswapRouterFilterer ¶
type UniswapRouterFilterer struct {
// contains filtered or unexported fields
}
UniswapRouterFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
func NewUniswapRouterFilterer ¶
func NewUniswapRouterFilterer(address common.Address, filterer bind.ContractFilterer) (*UniswapRouterFilterer, error)
NewUniswapRouterFilterer creates a new log filterer instance of UniswapRouter, bound to a specific deployed contract.
type UniswapRouterRaw ¶
type UniswapRouterRaw struct {
Contract *UniswapRouter // Generic contract binding to access the raw methods on
}
UniswapRouterRaw is an auto generated low-level Go binding around an Ethereum contract.
func (*UniswapRouterRaw) Call ¶
func (_UniswapRouter *UniswapRouterRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error
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 (*UniswapRouterRaw) Transact ¶
func (_UniswapRouter *UniswapRouterRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*UniswapRouterRaw) Transfer ¶
func (_UniswapRouter *UniswapRouterRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type UniswapRouterSession ¶
type UniswapRouterSession struct { Contract *UniswapRouter // 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 }
UniswapRouterSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
func (*UniswapRouterSession) ExactInput ¶
func (_UniswapRouter *UniswapRouterSession) ExactInput(params ISwapRouterExactInputParams) (*types.Transaction, error)
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 (*UniswapRouterSession) ExactInputSingle ¶
func (_UniswapRouter *UniswapRouterSession) ExactInputSingle(params ISwapRouterExactInputSingleParams) (*types.Transaction, error)
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 (*UniswapRouterSession) ExactOutput ¶
func (_UniswapRouter *UniswapRouterSession) ExactOutput(params ISwapRouterExactOutputParams) (*types.Transaction, error)
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 (*UniswapRouterSession) ExactOutputSingle ¶
func (_UniswapRouter *UniswapRouterSession) ExactOutputSingle(params ISwapRouterExactOutputSingleParams) (*types.Transaction, error)
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 (*UniswapRouterSession) UniswapV3SwapCallback ¶
func (_UniswapRouter *UniswapRouterSession) UniswapV3SwapCallback(amount0Delta *big.Int, amount1Delta *big.Int, data []byte) (*types.Transaction, error)
UniswapV3SwapCallback is a paid mutator transaction binding the contract method 0xfa461e33.
Solidity: function uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes data) returns()
type UniswapRouterTransactor ¶
type UniswapRouterTransactor struct {
// contains filtered or unexported fields
}
UniswapRouterTransactor is an auto generated write-only Go binding around an Ethereum contract.
func NewUniswapRouterTransactor ¶
func NewUniswapRouterTransactor(address common.Address, transactor bind.ContractTransactor) (*UniswapRouterTransactor, error)
NewUniswapRouterTransactor creates a new write-only instance of UniswapRouter, bound to a specific deployed contract.
func (*UniswapRouterTransactor) ExactInput ¶
func (_UniswapRouter *UniswapRouterTransactor) ExactInput(opts *bind.TransactOpts, params ISwapRouterExactInputParams) (*types.Transaction, error)
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 (*UniswapRouterTransactor) ExactInputSingle ¶
func (_UniswapRouter *UniswapRouterTransactor) ExactInputSingle(opts *bind.TransactOpts, params ISwapRouterExactInputSingleParams) (*types.Transaction, error)
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 (*UniswapRouterTransactor) ExactOutput ¶
func (_UniswapRouter *UniswapRouterTransactor) ExactOutput(opts *bind.TransactOpts, params ISwapRouterExactOutputParams) (*types.Transaction, error)
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 (*UniswapRouterTransactor) ExactOutputSingle ¶
func (_UniswapRouter *UniswapRouterTransactor) ExactOutputSingle(opts *bind.TransactOpts, params ISwapRouterExactOutputSingleParams) (*types.Transaction, error)
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 (*UniswapRouterTransactor) UniswapV3SwapCallback ¶
func (_UniswapRouter *UniswapRouterTransactor) UniswapV3SwapCallback(opts *bind.TransactOpts, amount0Delta *big.Int, amount1Delta *big.Int, data []byte) (*types.Transaction, error)
UniswapV3SwapCallback is a paid mutator transaction binding the contract method 0xfa461e33.
Solidity: function uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes data) returns()
type UniswapRouterTransactorRaw ¶
type UniswapRouterTransactorRaw struct {
Contract *UniswapRouterTransactor // Generic write-only contract binding to access the raw methods on
}
UniswapRouterTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
func (*UniswapRouterTransactorRaw) Transact ¶
func (_UniswapRouter *UniswapRouterTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*UniswapRouterTransactorRaw) Transfer ¶
func (_UniswapRouter *UniswapRouterTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type UniswapRouterTransactorSession ¶
type UniswapRouterTransactorSession struct { Contract *UniswapRouterTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
UniswapRouterTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.
func (*UniswapRouterTransactorSession) ExactInput ¶
func (_UniswapRouter *UniswapRouterTransactorSession) ExactInput(params ISwapRouterExactInputParams) (*types.Transaction, error)
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 (*UniswapRouterTransactorSession) ExactInputSingle ¶
func (_UniswapRouter *UniswapRouterTransactorSession) ExactInputSingle(params ISwapRouterExactInputSingleParams) (*types.Transaction, error)
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 (*UniswapRouterTransactorSession) ExactOutput ¶
func (_UniswapRouter *UniswapRouterTransactorSession) ExactOutput(params ISwapRouterExactOutputParams) (*types.Transaction, error)
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 (*UniswapRouterTransactorSession) ExactOutputSingle ¶
func (_UniswapRouter *UniswapRouterTransactorSession) ExactOutputSingle(params ISwapRouterExactOutputSingleParams) (*types.Transaction, error)
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 (*UniswapRouterTransactorSession) UniswapV3SwapCallback ¶
func (_UniswapRouter *UniswapRouterTransactorSession) UniswapV3SwapCallback(amount0Delta *big.Int, amount1Delta *big.Int, data []byte) (*types.Transaction, error)
UniswapV3SwapCallback is a paid mutator transaction binding the contract method 0xfa461e33.
Solidity: function uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes data) returns()