v2

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SwapRouterABI = SwapRouterMetaData.ABI

SwapRouterABI is the input ABI used to generate the binding from. Deprecated: Use SwapRouterMetaData.ABI instead.

View Source
var SwapRouterMetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMinimum\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"payer\",\"type\":\"address\"}],\"name\":\"v2SwapExactInput\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMaximum\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"payer\",\"type\":\"address\"}],\"name\":\"v2SwapExactOutput\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
}

SwapRouterMetaData contains all meta data concerning the SwapRouter contract.

Functions

func UnpackV2SwapExactIn

func UnpackV2SwapExactIn(params *SwapRouterExactInputParams, input []byte) error

func UnpackV2SwapExactOut

func UnpackV2SwapExactOut(params *SwapRouterExactOutputParams, input []byte) error

Types

type SwapRouter

type SwapRouter struct {
	SwapRouterCaller     // Read-only binding to the contract
	SwapRouterTransactor // Write-only binding to the contract
	SwapRouterFilterer   // Log filterer for contract events
}

SwapRouter is an auto generated Go binding around an Ethereum contract.

func NewSwapRouter

func NewSwapRouter(address common.Address, backend bind.ContractBackend) (*SwapRouter, error)

NewSwapRouter creates a new instance of SwapRouter, bound to a specific deployed contract.

type SwapRouterCaller

type SwapRouterCaller struct {
	// contains filtered or unexported fields
}

SwapRouterCaller is an auto generated read-only Go binding around an Ethereum contract.

func NewSwapRouterCaller

func NewSwapRouterCaller(address common.Address, caller bind.ContractCaller) (*SwapRouterCaller, error)

NewSwapRouterCaller creates a new read-only instance of SwapRouter, bound to a specific deployed contract.

type SwapRouterCallerRaw

type SwapRouterCallerRaw struct {
	Contract *SwapRouterCaller // Generic read-only contract binding to access the raw methods on
}

SwapRouterCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*SwapRouterCallerRaw) Call

func (_SwapRouter *SwapRouterCallerRaw) 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 SwapRouterCallerSession

type SwapRouterCallerSession struct {
	Contract *SwapRouterCaller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts     // Call 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 SwapRouterExactInputParams

type SwapRouterExactInputParams struct {
	Recipient        common.Address
	AmountIn         *big.Int
	AmountOutMinimum *big.Int
	Path             []common.Address
	Payer            common.Address
}

type SwapRouterExactOutputParams

type SwapRouterExactOutputParams struct {
	Recipient       common.Address
	AmountOut       *big.Int
	AmountInMaximum *big.Int
	Path            []common.Address
	Payer           common.Address
}

type SwapRouterFilterer

type SwapRouterFilterer struct {
	// contains filtered or unexported fields
}

SwapRouterFilterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewSwapRouterFilterer

func NewSwapRouterFilterer(address common.Address, filterer bind.ContractFilterer) (*SwapRouterFilterer, error)

NewSwapRouterFilterer creates a new log filterer instance of SwapRouter, bound to a specific deployed contract.

type SwapRouterRaw

type SwapRouterRaw struct {
	Contract *SwapRouter // Generic contract binding to access the raw methods on
}

SwapRouterRaw is an auto generated low-level Go binding around an Ethereum contract.

func (*SwapRouterRaw) Call

func (_SwapRouter *SwapRouterRaw) 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 (*SwapRouterRaw) Transact

func (_SwapRouter *SwapRouterRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*SwapRouterRaw) Transfer

func (_SwapRouter *SwapRouterRaw) 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 SwapRouterSession

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
}

SwapRouterSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*SwapRouterSession) V2SwapExactInput

func (_SwapRouter *SwapRouterSession) V2SwapExactInput(recipient common.Address, amountIn *big.Int, amountOutMinimum *big.Int, path []common.Address, payer common.Address) (*types.Transaction, error)

V2SwapExactInput is a paid mutator transaction binding the contract method 0xb1542aef.

Solidity: function v2SwapExactInput(address recipient, uint256 amountIn, uint256 amountOutMinimum, address[] path, address payer) returns()

func (*SwapRouterSession) V2SwapExactOutput

func (_SwapRouter *SwapRouterSession) V2SwapExactOutput(recipient common.Address, amountOut *big.Int, amountInMaximum *big.Int, path []common.Address, payer common.Address) (*types.Transaction, error)

V2SwapExactOutput is a paid mutator transaction binding the contract method 0x343e4d26.

Solidity: function v2SwapExactOutput(address recipient, uint256 amountOut, uint256 amountInMaximum, address[] path, address payer) returns()

type SwapRouterTransactor

type SwapRouterTransactor struct {
	// contains filtered or unexported fields
}

SwapRouterTransactor is an auto generated write-only Go binding around an Ethereum contract.

func NewSwapRouterTransactor

func NewSwapRouterTransactor(address common.Address, transactor bind.ContractTransactor) (*SwapRouterTransactor, error)

NewSwapRouterTransactor creates a new write-only instance of SwapRouter, bound to a specific deployed contract.

func (*SwapRouterTransactor) V2SwapExactInput

func (_SwapRouter *SwapRouterTransactor) V2SwapExactInput(opts *bind.TransactOpts, recipient common.Address, amountIn *big.Int, amountOutMinimum *big.Int, path []common.Address, payer common.Address) (*types.Transaction, error)

V2SwapExactInput is a paid mutator transaction binding the contract method 0xb1542aef.

Solidity: function v2SwapExactInput(address recipient, uint256 amountIn, uint256 amountOutMinimum, address[] path, address payer) returns()

func (*SwapRouterTransactor) V2SwapExactOutput

func (_SwapRouter *SwapRouterTransactor) V2SwapExactOutput(opts *bind.TransactOpts, recipient common.Address, amountOut *big.Int, amountInMaximum *big.Int, path []common.Address, payer common.Address) (*types.Transaction, error)

V2SwapExactOutput is a paid mutator transaction binding the contract method 0x343e4d26.

Solidity: function v2SwapExactOutput(address recipient, uint256 amountOut, uint256 amountInMaximum, address[] path, address payer) returns()

type SwapRouterTransactorRaw

type SwapRouterTransactorRaw struct {
	Contract *SwapRouterTransactor // Generic write-only contract binding to access the raw methods on
}

SwapRouterTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*SwapRouterTransactorRaw) Transact

func (_SwapRouter *SwapRouterTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*SwapRouterTransactorRaw) Transfer

func (_SwapRouter *SwapRouterTransactorRaw) 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 SwapRouterTransactorSession

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
}

SwapRouterTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*SwapRouterTransactorSession) V2SwapExactInput

func (_SwapRouter *SwapRouterTransactorSession) V2SwapExactInput(recipient common.Address, amountIn *big.Int, amountOutMinimum *big.Int, path []common.Address, payer common.Address) (*types.Transaction, error)

V2SwapExactInput is a paid mutator transaction binding the contract method 0xb1542aef.

Solidity: function v2SwapExactInput(address recipient, uint256 amountIn, uint256 amountOutMinimum, address[] path, address payer) returns()

func (*SwapRouterTransactorSession) V2SwapExactOutput

func (_SwapRouter *SwapRouterTransactorSession) V2SwapExactOutput(recipient common.Address, amountOut *big.Int, amountInMaximum *big.Int, path []common.Address, payer common.Address) (*types.Transaction, error)

V2SwapExactOutput is a paid mutator transaction binding the contract method 0x343e4d26.

Solidity: function v2SwapExactOutput(address recipient, uint256 amountOut, uint256 amountInMaximum, address[] path, address payer) returns()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL