Files
mev-beta/bindings/uniswap_v2/router.go
Administrator 3505921207 feat: comprehensive audit infrastructure and Phase 1 refactoring
This commit includes:

## Audit & Testing Infrastructure
- scripts/audit.sh: 12-section comprehensive codebase audit
- scripts/test.sh: 7 test types (unit, integration, race, bench, coverage, contracts, pkg)
- scripts/check-compliance.sh: SPEC.md compliance validation
- scripts/check-docs.sh: Documentation coverage checker
- scripts/dev.sh: Unified development script with all commands

## Documentation
- SPEC.md: Authoritative technical specification
- docs/AUDIT_AND_TESTING.md: Complete testing guide (600+ lines)
- docs/SCRIPTS_REFERENCE.md: All scripts documented (700+ lines)
- docs/README.md: Documentation index and navigation
- docs/DEVELOPMENT_SETUP.md: Environment setup guide
- docs/REFACTORING_PLAN.md: Systematic refactoring plan

## Phase 1 Refactoring (Critical Fixes)
- pkg/validation/helpers.go: Validation functions for addresses/amounts
- pkg/sequencer/selector_registry.go: Thread-safe selector registry
- pkg/sequencer/reader.go: Fixed race conditions with atomic metrics
- pkg/sequencer/swap_filter.go: Fixed race conditions, added error logging
- pkg/sequencer/decoder.go: Added address validation

## Changes Summary
- Fixed race conditions on 13 metric counters (atomic operations)
- Added validation at all ingress points
- Eliminated silent error handling
- Created selector registry for future ABI migration
- Reduced SPEC.md violations from 7 to 5

Build Status:  All packages compile
Compliance:  No race conditions, no silent failures
Documentation:  1,700+ lines across 5 comprehensive guides

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 07:17:13 +01:00

308 lines
22 KiB
Go

// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package uniswap_v2
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
)
// UniswapV2RouterMetaData contains all meta data concerning the UniswapV2Router contract.
var UniswapV2RouterMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMax\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapTokensForExactTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactETHForTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapETHForExactTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForETH\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMax\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapTokensForExactETH\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
}
// UniswapV2RouterABI is the input ABI used to generate the binding from.
// Deprecated: Use UniswapV2RouterMetaData.ABI instead.
var UniswapV2RouterABI = UniswapV2RouterMetaData.ABI
// UniswapV2Router is an auto generated Go binding around an Ethereum contract.
type UniswapV2Router struct {
UniswapV2RouterCaller // Read-only binding to the contract
UniswapV2RouterTransactor // Write-only binding to the contract
UniswapV2RouterFilterer // Log filterer for contract events
}
// UniswapV2RouterCaller is an auto generated read-only Go binding around an Ethereum contract.
type UniswapV2RouterCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// UniswapV2RouterTransactor is an auto generated write-only Go binding around an Ethereum contract.
type UniswapV2RouterTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// UniswapV2RouterFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type UniswapV2RouterFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// UniswapV2RouterSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type UniswapV2RouterSession struct {
Contract *UniswapV2Router // 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
}
// UniswapV2RouterCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type UniswapV2RouterCallerSession struct {
Contract *UniswapV2RouterCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// UniswapV2RouterTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type UniswapV2RouterTransactorSession struct {
Contract *UniswapV2RouterTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// UniswapV2RouterRaw is an auto generated low-level Go binding around an Ethereum contract.
type UniswapV2RouterRaw struct {
Contract *UniswapV2Router // Generic contract binding to access the raw methods on
}
// UniswapV2RouterCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type UniswapV2RouterCallerRaw struct {
Contract *UniswapV2RouterCaller // Generic read-only contract binding to access the raw methods on
}
// UniswapV2RouterTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type UniswapV2RouterTransactorRaw struct {
Contract *UniswapV2RouterTransactor // Generic write-only contract binding to access the raw methods on
}
// NewUniswapV2Router creates a new instance of UniswapV2Router, bound to a specific deployed contract.
func NewUniswapV2Router(address common.Address, backend bind.ContractBackend) (*UniswapV2Router, error) {
contract, err := bindUniswapV2Router(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &UniswapV2Router{UniswapV2RouterCaller: UniswapV2RouterCaller{contract: contract}, UniswapV2RouterTransactor: UniswapV2RouterTransactor{contract: contract}, UniswapV2RouterFilterer: UniswapV2RouterFilterer{contract: contract}}, nil
}
// NewUniswapV2RouterCaller creates a new read-only instance of UniswapV2Router, bound to a specific deployed contract.
func NewUniswapV2RouterCaller(address common.Address, caller bind.ContractCaller) (*UniswapV2RouterCaller, error) {
contract, err := bindUniswapV2Router(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &UniswapV2RouterCaller{contract: contract}, nil
}
// NewUniswapV2RouterTransactor creates a new write-only instance of UniswapV2Router, bound to a specific deployed contract.
func NewUniswapV2RouterTransactor(address common.Address, transactor bind.ContractTransactor) (*UniswapV2RouterTransactor, error) {
contract, err := bindUniswapV2Router(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &UniswapV2RouterTransactor{contract: contract}, nil
}
// NewUniswapV2RouterFilterer creates a new log filterer instance of UniswapV2Router, bound to a specific deployed contract.
func NewUniswapV2RouterFilterer(address common.Address, filterer bind.ContractFilterer) (*UniswapV2RouterFilterer, error) {
contract, err := bindUniswapV2Router(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &UniswapV2RouterFilterer{contract: contract}, nil
}
// bindUniswapV2Router binds a generic wrapper to an already deployed contract.
func bindUniswapV2Router(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := UniswapV2RouterMetaData.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 (_UniswapV2Router *UniswapV2RouterRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _UniswapV2Router.Contract.UniswapV2RouterCaller.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 (_UniswapV2Router *UniswapV2RouterRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _UniswapV2Router.Contract.UniswapV2RouterTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_UniswapV2Router *UniswapV2RouterRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _UniswapV2Router.Contract.UniswapV2RouterTransactor.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 (_UniswapV2Router *UniswapV2RouterCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _UniswapV2Router.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 (_UniswapV2Router *UniswapV2RouterTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _UniswapV2Router.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_UniswapV2Router *UniswapV2RouterTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _UniswapV2Router.Contract.contract.Transact(opts, method, params...)
}
// SwapETHForExactTokens is a paid mutator transaction binding the contract method 0xfb3bdb41.
//
// Solidity: function swapETHForExactTokens(uint256 amountOut, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts)
func (_UniswapV2Router *UniswapV2RouterTransactor) SwapETHForExactTokens(opts *bind.TransactOpts, amountOut *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) {
return _UniswapV2Router.contract.Transact(opts, "swapETHForExactTokens", amountOut, path, to, deadline)
}
// SwapETHForExactTokens is a paid mutator transaction binding the contract method 0xfb3bdb41.
//
// Solidity: function swapETHForExactTokens(uint256 amountOut, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts)
func (_UniswapV2Router *UniswapV2RouterSession) SwapETHForExactTokens(amountOut *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) {
return _UniswapV2Router.Contract.SwapETHForExactTokens(&_UniswapV2Router.TransactOpts, amountOut, path, to, deadline)
}
// SwapETHForExactTokens is a paid mutator transaction binding the contract method 0xfb3bdb41.
//
// Solidity: function swapETHForExactTokens(uint256 amountOut, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts)
func (_UniswapV2Router *UniswapV2RouterTransactorSession) SwapETHForExactTokens(amountOut *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) {
return _UniswapV2Router.Contract.SwapETHForExactTokens(&_UniswapV2Router.TransactOpts, amountOut, path, to, deadline)
}
// SwapExactETHForTokens is a paid mutator transaction binding the contract method 0x7ff36ab5.
//
// Solidity: function swapExactETHForTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts)
func (_UniswapV2Router *UniswapV2RouterTransactor) SwapExactETHForTokens(opts *bind.TransactOpts, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) {
return _UniswapV2Router.contract.Transact(opts, "swapExactETHForTokens", amountOutMin, path, to, deadline)
}
// SwapExactETHForTokens is a paid mutator transaction binding the contract method 0x7ff36ab5.
//
// Solidity: function swapExactETHForTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts)
func (_UniswapV2Router *UniswapV2RouterSession) SwapExactETHForTokens(amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) {
return _UniswapV2Router.Contract.SwapExactETHForTokens(&_UniswapV2Router.TransactOpts, amountOutMin, path, to, deadline)
}
// SwapExactETHForTokens is a paid mutator transaction binding the contract method 0x7ff36ab5.
//
// Solidity: function swapExactETHForTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts)
func (_UniswapV2Router *UniswapV2RouterTransactorSession) SwapExactETHForTokens(amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) {
return _UniswapV2Router.Contract.SwapExactETHForTokens(&_UniswapV2Router.TransactOpts, amountOutMin, path, to, deadline)
}
// SwapExactTokensForETH is a paid mutator transaction binding the contract method 0x18cbafe5.
//
// Solidity: function swapExactTokensForETH(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts)
func (_UniswapV2Router *UniswapV2RouterTransactor) SwapExactTokensForETH(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) {
return _UniswapV2Router.contract.Transact(opts, "swapExactTokensForETH", amountIn, amountOutMin, path, to, deadline)
}
// SwapExactTokensForETH is a paid mutator transaction binding the contract method 0x18cbafe5.
//
// Solidity: function swapExactTokensForETH(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts)
func (_UniswapV2Router *UniswapV2RouterSession) SwapExactTokensForETH(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) {
return _UniswapV2Router.Contract.SwapExactTokensForETH(&_UniswapV2Router.TransactOpts, amountIn, amountOutMin, path, to, deadline)
}
// SwapExactTokensForETH is a paid mutator transaction binding the contract method 0x18cbafe5.
//
// Solidity: function swapExactTokensForETH(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts)
func (_UniswapV2Router *UniswapV2RouterTransactorSession) SwapExactTokensForETH(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) {
return _UniswapV2Router.Contract.SwapExactTokensForETH(&_UniswapV2Router.TransactOpts, amountIn, amountOutMin, path, to, deadline)
}
// SwapExactTokensForTokens is a paid mutator transaction binding the contract method 0x38ed1739.
//
// Solidity: function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts)
func (_UniswapV2Router *UniswapV2RouterTransactor) SwapExactTokensForTokens(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) {
return _UniswapV2Router.contract.Transact(opts, "swapExactTokensForTokens", amountIn, amountOutMin, path, to, deadline)
}
// SwapExactTokensForTokens is a paid mutator transaction binding the contract method 0x38ed1739.
//
// Solidity: function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts)
func (_UniswapV2Router *UniswapV2RouterSession) SwapExactTokensForTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) {
return _UniswapV2Router.Contract.SwapExactTokensForTokens(&_UniswapV2Router.TransactOpts, amountIn, amountOutMin, path, to, deadline)
}
// SwapExactTokensForTokens is a paid mutator transaction binding the contract method 0x38ed1739.
//
// Solidity: function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts)
func (_UniswapV2Router *UniswapV2RouterTransactorSession) SwapExactTokensForTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) {
return _UniswapV2Router.Contract.SwapExactTokensForTokens(&_UniswapV2Router.TransactOpts, amountIn, amountOutMin, path, to, deadline)
}
// SwapTokensForExactETH is a paid mutator transaction binding the contract method 0x4a25d94a.
//
// Solidity: function swapTokensForExactETH(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts)
func (_UniswapV2Router *UniswapV2RouterTransactor) SwapTokensForExactETH(opts *bind.TransactOpts, amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) {
return _UniswapV2Router.contract.Transact(opts, "swapTokensForExactETH", amountOut, amountInMax, path, to, deadline)
}
// SwapTokensForExactETH is a paid mutator transaction binding the contract method 0x4a25d94a.
//
// Solidity: function swapTokensForExactETH(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts)
func (_UniswapV2Router *UniswapV2RouterSession) SwapTokensForExactETH(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) {
return _UniswapV2Router.Contract.SwapTokensForExactETH(&_UniswapV2Router.TransactOpts, amountOut, amountInMax, path, to, deadline)
}
// SwapTokensForExactETH is a paid mutator transaction binding the contract method 0x4a25d94a.
//
// Solidity: function swapTokensForExactETH(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts)
func (_UniswapV2Router *UniswapV2RouterTransactorSession) SwapTokensForExactETH(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) {
return _UniswapV2Router.Contract.SwapTokensForExactETH(&_UniswapV2Router.TransactOpts, amountOut, amountInMax, path, to, deadline)
}
// SwapTokensForExactTokens is a paid mutator transaction binding the contract method 0x8803dbee.
//
// Solidity: function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts)
func (_UniswapV2Router *UniswapV2RouterTransactor) SwapTokensForExactTokens(opts *bind.TransactOpts, amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) {
return _UniswapV2Router.contract.Transact(opts, "swapTokensForExactTokens", amountOut, amountInMax, path, to, deadline)
}
// SwapTokensForExactTokens is a paid mutator transaction binding the contract method 0x8803dbee.
//
// Solidity: function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts)
func (_UniswapV2Router *UniswapV2RouterSession) SwapTokensForExactTokens(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) {
return _UniswapV2Router.Contract.SwapTokensForExactTokens(&_UniswapV2Router.TransactOpts, amountOut, amountInMax, path, to, deadline)
}
// SwapTokensForExactTokens is a paid mutator transaction binding the contract method 0x8803dbee.
//
// Solidity: function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts)
func (_UniswapV2Router *UniswapV2RouterTransactorSession) SwapTokensForExactTokens(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) {
return _UniswapV2Router.Contract.SwapTokensForExactTokens(&_UniswapV2Router.TransactOpts, amountOut, amountInMax, path, to, deadline)
}