github.com/0xPolygon/supernets2-node@v0.0.0-20230711153321-2fe574524eaa/test/contracts/bin/uniswap/v2/periphery/UniswapV2Migrator/UniswapV2Migrator.go (about)

     1  // Code generated - DO NOT EDIT.
     2  // This file is a generated binding and any manual changes will be lost.
     3  
     4  package UniswapV2Migrator
     5  
     6  import (
     7  	"errors"
     8  	"math/big"
     9  	"strings"
    10  
    11  	ethereum "github.com/ethereum/go-ethereum"
    12  	"github.com/ethereum/go-ethereum/accounts/abi"
    13  	"github.com/ethereum/go-ethereum/accounts/abi/bind"
    14  	"github.com/ethereum/go-ethereum/common"
    15  	"github.com/ethereum/go-ethereum/core/types"
    16  	"github.com/ethereum/go-ethereum/event"
    17  )
    18  
    19  // Reference imports to suppress errors if they are not otherwise used.
    20  var (
    21  	_ = errors.New
    22  	_ = big.NewInt
    23  	_ = strings.NewReader
    24  	_ = ethereum.NotFound
    25  	_ = bind.Bind
    26  	_ = common.Big1
    27  	_ = types.BloomLookup
    28  	_ = event.NewSubscription
    29  	_ = abi.ConvertType
    30  )
    31  
    32  // UniswapV2MigratorMetaData contains all meta data concerning the UniswapV2Migrator contract.
    33  var UniswapV2MigratorMetaData = &bind.MetaData{
    34  	ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_factoryV1\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_router\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"migrate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]",
    35  	Bin: "0x60c060405234801561001057600080fd5b506040516109443803806109448339818101604052604081101561003357600080fd5b5080516020909101516001600160601b0319606092831b8116608052911b1660a05260805160601c60a05160601c6108bd6100876000398061030752806103775280610409525080608352506108bd6000f3fe6080604052600436106100225760003560e01c8063b7df1d251461002e57610029565b3661002957005b600080fd5b34801561003a57600080fd5b5061007d600480360360a081101561005157600080fd5b506001600160a01b0381358116916020810135916040820135916060810135909116906080013561007f565b005b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166306f2bf62876040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156100f757600080fd5b505afa15801561010b573d6000803e3d6000fd5b505050506040513d602081101561012157600080fd5b5051604080516370a0823160e01b815233600482015290519192506000916001600160a01b038416916370a08231916024808301926020929190829003018186803b15801561016f57600080fd5b505afa158015610183573d6000803e3d6000fd5b505050506040513d602081101561019957600080fd5b5051604080516323b872dd60e01b81523360048201523060248201526044810183905290519192506001600160a01b038416916323b872dd916064808201926020929091908290030181600087803b1580156101f457600080fd5b505af1158015610208573d6000803e3d6000fd5b505050506040513d602081101561021e57600080fd5b5051610268576040805162461bcd60e51b81526020600482015260146024820152731514905394d1915497d19493d357d1905253115160621b604482015290519081900360640190fd5b60408051637c45f8ad60e11b81526004810183905260016024820181905260448201526000196064820152815160009283926001600160a01b0387169263f88bf15a9260848084019391929182900301818787803b1580156102c957600080fd5b505af11580156102dd573d6000803e3d6000fd5b505050506040513d60408110156102f357600080fd5b508051602090910151909250905061032c897f000000000000000000000000000000000000000000000000000000000000000083610462565b6040805163f305d71960e01b81526001600160a01b038b8116600483015260248201849052604482018b9052606482018a9052888116608483015260a48201889052915160009283927f00000000000000000000000000000000000000000000000000000000000000009091169163f305d71991879160c480830192606092919082900301818588803b1580156103c257600080fd5b505af11580156103d6573d6000803e3d6000fd5b50505050506040513d60608110156103ed57600080fd5b5080516020909101519092509050818311156104415761042f8b7f00000000000000000000000000000000000000000000000000000000000000006000610462565b61043c8b338486036105b6565b610455565b808411156104555761045533828603610703565b5050505050505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b178152925182516000946060949389169392918291908083835b602083106104df5780518252601f1990920191602091820191016104c0565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610541576040519150601f19603f3d011682016040523d82523d6000602084013e610546565b606091505b5091509150818015610574575080511580610574575080806020019051602081101561057157600080fd5b50515b6105af5760405162461bcd60e51b815260040180806020018281038252602b815260200180610830602b913960400191505060405180910390fd5b5050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106106335780518252601f199092019160209182019101610614565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610695576040519150601f19603f3d011682016040523d82523d6000602084013e61069a565b606091505b50915091508180156106c85750805115806106c857508080602001905160208110156106c557600080fd5b50515b6105af5760405162461bcd60e51b815260040180806020018281038252602d81526020018061085b602d913960400191505060405180910390fd5b604080516000808252602082019092526001600160a01b0384169083906040518082805190602001908083835b6020831061074f5780518252601f199092019160209182019101610730565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146107b1576040519150601f19603f3d011682016040523d82523d6000602084013e6107b6565b606091505b50509050806107f65760405162461bcd60e51b81526004018080602001828103825260348152602001806107fc6034913960400191505060405180910390fd5b50505056fe5472616e7366657248656c7065723a3a736166655472616e736665724554483a20455448207472616e73666572206661696c65645472616e7366657248656c7065723a3a73616665417070726f76653a20617070726f7665206661696c65645472616e7366657248656c7065723a3a736166655472616e736665723a207472616e73666572206661696c6564a26469706673582212201899c4ec7f4361c60e41fea7ed99f592748923c045a19f1a2483842d87af714f64736f6c63430006060033",
    36  }
    37  
    38  // UniswapV2MigratorABI is the input ABI used to generate the binding from.
    39  // Deprecated: Use UniswapV2MigratorMetaData.ABI instead.
    40  var UniswapV2MigratorABI = UniswapV2MigratorMetaData.ABI
    41  
    42  // UniswapV2MigratorBin is the compiled bytecode used for deploying new contracts.
    43  // Deprecated: Use UniswapV2MigratorMetaData.Bin instead.
    44  var UniswapV2MigratorBin = UniswapV2MigratorMetaData.Bin
    45  
    46  // DeployUniswapV2Migrator deploys a new Ethereum contract, binding an instance of UniswapV2Migrator to it.
    47  func DeployUniswapV2Migrator(auth *bind.TransactOpts, backend bind.ContractBackend, _factoryV1 common.Address, _router common.Address) (common.Address, *types.Transaction, *UniswapV2Migrator, error) {
    48  	parsed, err := UniswapV2MigratorMetaData.GetAbi()
    49  	if err != nil {
    50  		return common.Address{}, nil, nil, err
    51  	}
    52  	if parsed == nil {
    53  		return common.Address{}, nil, nil, errors.New("GetABI returned nil")
    54  	}
    55  
    56  	address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(UniswapV2MigratorBin), backend, _factoryV1, _router)
    57  	if err != nil {
    58  		return common.Address{}, nil, nil, err
    59  	}
    60  	return address, tx, &UniswapV2Migrator{UniswapV2MigratorCaller: UniswapV2MigratorCaller{contract: contract}, UniswapV2MigratorTransactor: UniswapV2MigratorTransactor{contract: contract}, UniswapV2MigratorFilterer: UniswapV2MigratorFilterer{contract: contract}}, nil
    61  }
    62  
    63  // UniswapV2Migrator is an auto generated Go binding around an Ethereum contract.
    64  type UniswapV2Migrator struct {
    65  	UniswapV2MigratorCaller     // Read-only binding to the contract
    66  	UniswapV2MigratorTransactor // Write-only binding to the contract
    67  	UniswapV2MigratorFilterer   // Log filterer for contract events
    68  }
    69  
    70  // UniswapV2MigratorCaller is an auto generated read-only Go binding around an Ethereum contract.
    71  type UniswapV2MigratorCaller struct {
    72  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    73  }
    74  
    75  // UniswapV2MigratorTransactor is an auto generated write-only Go binding around an Ethereum contract.
    76  type UniswapV2MigratorTransactor struct {
    77  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    78  }
    79  
    80  // UniswapV2MigratorFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
    81  type UniswapV2MigratorFilterer struct {
    82  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    83  }
    84  
    85  // UniswapV2MigratorSession is an auto generated Go binding around an Ethereum contract,
    86  // with pre-set call and transact options.
    87  type UniswapV2MigratorSession struct {
    88  	Contract     *UniswapV2Migrator // Generic contract binding to set the session for
    89  	CallOpts     bind.CallOpts      // Call options to use throughout this session
    90  	TransactOpts bind.TransactOpts  // Transaction auth options to use throughout this session
    91  }
    92  
    93  // UniswapV2MigratorCallerSession is an auto generated read-only Go binding around an Ethereum contract,
    94  // with pre-set call options.
    95  type UniswapV2MigratorCallerSession struct {
    96  	Contract *UniswapV2MigratorCaller // Generic contract caller binding to set the session for
    97  	CallOpts bind.CallOpts            // Call options to use throughout this session
    98  }
    99  
   100  // UniswapV2MigratorTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
   101  // with pre-set transact options.
   102  type UniswapV2MigratorTransactorSession struct {
   103  	Contract     *UniswapV2MigratorTransactor // Generic contract transactor binding to set the session for
   104  	TransactOpts bind.TransactOpts            // Transaction auth options to use throughout this session
   105  }
   106  
   107  // UniswapV2MigratorRaw is an auto generated low-level Go binding around an Ethereum contract.
   108  type UniswapV2MigratorRaw struct {
   109  	Contract *UniswapV2Migrator // Generic contract binding to access the raw methods on
   110  }
   111  
   112  // UniswapV2MigratorCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
   113  type UniswapV2MigratorCallerRaw struct {
   114  	Contract *UniswapV2MigratorCaller // Generic read-only contract binding to access the raw methods on
   115  }
   116  
   117  // UniswapV2MigratorTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
   118  type UniswapV2MigratorTransactorRaw struct {
   119  	Contract *UniswapV2MigratorTransactor // Generic write-only contract binding to access the raw methods on
   120  }
   121  
   122  // NewUniswapV2Migrator creates a new instance of UniswapV2Migrator, bound to a specific deployed contract.
   123  func NewUniswapV2Migrator(address common.Address, backend bind.ContractBackend) (*UniswapV2Migrator, error) {
   124  	contract, err := bindUniswapV2Migrator(address, backend, backend, backend)
   125  	if err != nil {
   126  		return nil, err
   127  	}
   128  	return &UniswapV2Migrator{UniswapV2MigratorCaller: UniswapV2MigratorCaller{contract: contract}, UniswapV2MigratorTransactor: UniswapV2MigratorTransactor{contract: contract}, UniswapV2MigratorFilterer: UniswapV2MigratorFilterer{contract: contract}}, nil
   129  }
   130  
   131  // NewUniswapV2MigratorCaller creates a new read-only instance of UniswapV2Migrator, bound to a specific deployed contract.
   132  func NewUniswapV2MigratorCaller(address common.Address, caller bind.ContractCaller) (*UniswapV2MigratorCaller, error) {
   133  	contract, err := bindUniswapV2Migrator(address, caller, nil, nil)
   134  	if err != nil {
   135  		return nil, err
   136  	}
   137  	return &UniswapV2MigratorCaller{contract: contract}, nil
   138  }
   139  
   140  // NewUniswapV2MigratorTransactor creates a new write-only instance of UniswapV2Migrator, bound to a specific deployed contract.
   141  func NewUniswapV2MigratorTransactor(address common.Address, transactor bind.ContractTransactor) (*UniswapV2MigratorTransactor, error) {
   142  	contract, err := bindUniswapV2Migrator(address, nil, transactor, nil)
   143  	if err != nil {
   144  		return nil, err
   145  	}
   146  	return &UniswapV2MigratorTransactor{contract: contract}, nil
   147  }
   148  
   149  // NewUniswapV2MigratorFilterer creates a new log filterer instance of UniswapV2Migrator, bound to a specific deployed contract.
   150  func NewUniswapV2MigratorFilterer(address common.Address, filterer bind.ContractFilterer) (*UniswapV2MigratorFilterer, error) {
   151  	contract, err := bindUniswapV2Migrator(address, nil, nil, filterer)
   152  	if err != nil {
   153  		return nil, err
   154  	}
   155  	return &UniswapV2MigratorFilterer{contract: contract}, nil
   156  }
   157  
   158  // bindUniswapV2Migrator binds a generic wrapper to an already deployed contract.
   159  func bindUniswapV2Migrator(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
   160  	parsed, err := UniswapV2MigratorMetaData.GetAbi()
   161  	if err != nil {
   162  		return nil, err
   163  	}
   164  	return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil
   165  }
   166  
   167  // Call invokes the (constant) contract method with params as input values and
   168  // sets the output to result. The result type might be a single field for simple
   169  // returns, a slice of interfaces for anonymous returns and a struct for named
   170  // returns.
   171  func (_UniswapV2Migrator *UniswapV2MigratorRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   172  	return _UniswapV2Migrator.Contract.UniswapV2MigratorCaller.contract.Call(opts, result, method, params...)
   173  }
   174  
   175  // Transfer initiates a plain transaction to move funds to the contract, calling
   176  // its default method if one is available.
   177  func (_UniswapV2Migrator *UniswapV2MigratorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   178  	return _UniswapV2Migrator.Contract.UniswapV2MigratorTransactor.contract.Transfer(opts)
   179  }
   180  
   181  // Transact invokes the (paid) contract method with params as input values.
   182  func (_UniswapV2Migrator *UniswapV2MigratorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   183  	return _UniswapV2Migrator.Contract.UniswapV2MigratorTransactor.contract.Transact(opts, method, params...)
   184  }
   185  
   186  // Call invokes the (constant) contract method with params as input values and
   187  // sets the output to result. The result type might be a single field for simple
   188  // returns, a slice of interfaces for anonymous returns and a struct for named
   189  // returns.
   190  func (_UniswapV2Migrator *UniswapV2MigratorCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   191  	return _UniswapV2Migrator.Contract.contract.Call(opts, result, method, params...)
   192  }
   193  
   194  // Transfer initiates a plain transaction to move funds to the contract, calling
   195  // its default method if one is available.
   196  func (_UniswapV2Migrator *UniswapV2MigratorTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   197  	return _UniswapV2Migrator.Contract.contract.Transfer(opts)
   198  }
   199  
   200  // Transact invokes the (paid) contract method with params as input values.
   201  func (_UniswapV2Migrator *UniswapV2MigratorTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   202  	return _UniswapV2Migrator.Contract.contract.Transact(opts, method, params...)
   203  }
   204  
   205  // Migrate is a paid mutator transaction binding the contract method 0xb7df1d25.
   206  //
   207  // Solidity: function migrate(address token, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns()
   208  func (_UniswapV2Migrator *UniswapV2MigratorTransactor) Migrate(opts *bind.TransactOpts, token common.Address, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) {
   209  	return _UniswapV2Migrator.contract.Transact(opts, "migrate", token, amountTokenMin, amountETHMin, to, deadline)
   210  }
   211  
   212  // Migrate is a paid mutator transaction binding the contract method 0xb7df1d25.
   213  //
   214  // Solidity: function migrate(address token, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns()
   215  func (_UniswapV2Migrator *UniswapV2MigratorSession) Migrate(token common.Address, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) {
   216  	return _UniswapV2Migrator.Contract.Migrate(&_UniswapV2Migrator.TransactOpts, token, amountTokenMin, amountETHMin, to, deadline)
   217  }
   218  
   219  // Migrate is a paid mutator transaction binding the contract method 0xb7df1d25.
   220  //
   221  // Solidity: function migrate(address token, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns()
   222  func (_UniswapV2Migrator *UniswapV2MigratorTransactorSession) Migrate(token common.Address, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) {
   223  	return _UniswapV2Migrator.Contract.Migrate(&_UniswapV2Migrator.TransactOpts, token, amountTokenMin, amountETHMin, to, deadline)
   224  }
   225  
   226  // Receive is a paid mutator transaction binding the contract receive function.
   227  //
   228  // Solidity: receive() payable returns()
   229  func (_UniswapV2Migrator *UniswapV2MigratorTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) {
   230  	return _UniswapV2Migrator.contract.RawTransact(opts, nil) // calldata is disallowed for receive function
   231  }
   232  
   233  // Receive is a paid mutator transaction binding the contract receive function.
   234  //
   235  // Solidity: receive() payable returns()
   236  func (_UniswapV2Migrator *UniswapV2MigratorSession) Receive() (*types.Transaction, error) {
   237  	return _UniswapV2Migrator.Contract.Receive(&_UniswapV2Migrator.TransactOpts)
   238  }
   239  
   240  // Receive is a paid mutator transaction binding the contract receive function.
   241  //
   242  // Solidity: receive() payable returns()
   243  func (_UniswapV2Migrator *UniswapV2MigratorTransactorSession) Receive() (*types.Transaction, error) {
   244  	return _UniswapV2Migrator.Contract.Receive(&_UniswapV2Migrator.TransactOpts)
   245  }