From 22b69e5bf503f0aff7f4bc501861ffe015d038fd Mon Sep 17 00:00:00 2001 From: Laurent Le Houerou Date: Tue, 9 Nov 2021 09:07:52 +0400 Subject: [PATCH] wip --- polycat/contracts/catpair.abi | 1 + polycat/contracts/catpair.go | 1833 +++++++++++++++++ polycat/contracts/catrouter.abi | 1 + polycat/contracts/catrouter.go | 767 +++++++ polycat/contracts/masterchef.abi | 1 + polycat/contracts/masterchef.go | 2604 ++++++++++++++++++++++++ polycat/contracts/masterchefv2.abi | 1 + polycat/contracts/masterchefv2.go | 3021 ++++++++++++++++++++++++++++ polycat/contracts/pawv2.abi | 1 + polycat/contracts/pawv2.go | 1039 ++++++++++ polycat/contracts/rewardlocker.abi | 1 + polycat/contracts/rewardlocker.go | 1938 ++++++++++++++++++ polycat/contracts/tankchef.abi | 1 + polycat/contracts/tankchef.go | 1323 ++++++++++++ polygon/contracts/wmatic.abi | 1 + polygon/contracts/wmatic.go | 1082 ++++++++++ 16 files changed, 13615 insertions(+) create mode 100644 polycat/contracts/catpair.abi create mode 100644 polycat/contracts/catpair.go create mode 100644 polycat/contracts/catrouter.abi create mode 100644 polycat/contracts/catrouter.go create mode 100644 polycat/contracts/masterchef.abi create mode 100644 polycat/contracts/masterchef.go create mode 100644 polycat/contracts/masterchefv2.abi create mode 100644 polycat/contracts/masterchefv2.go create mode 100644 polycat/contracts/pawv2.abi create mode 100644 polycat/contracts/pawv2.go create mode 100644 polycat/contracts/rewardlocker.abi create mode 100644 polycat/contracts/rewardlocker.go create mode 100644 polycat/contracts/tankchef.abi create mode 100644 polycat/contracts/tankchef.go create mode 100644 polygon/contracts/wmatic.abi create mode 100644 polygon/contracts/wmatic.go diff --git a/polycat/contracts/catpair.abi b/polycat/contracts/catpair.abi new file mode 100644 index 0000000..7a05a55 --- /dev/null +++ b/polycat/contracts/catpair.abi @@ -0,0 +1 @@ +[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount0Out","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1Out","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint112","name":"reserve0","type":"uint112"},{"indexed":false,"internalType":"uint112","name":"reserve1","type":"uint112"}],"name":"Sync","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINIMUM_LIQUIDITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"burn","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReserves","outputs":[{"internalType":"uint112","name":"_reserve0","type":"uint112"},{"internalType":"uint112","name":"_reserve1","type":"uint112"},{"internalType":"uint32","name":"_blockTimestampLast","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token0","type":"address"},{"internalType":"address","name":"_token1","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"kLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"price0CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price1CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"skim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount0Out","type":"uint256"},{"internalType":"uint256","name":"amount1Out","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sync","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/polycat/contracts/catpair.go b/polycat/contracts/catpair.go new file mode 100644 index 0000000..ae215bc --- /dev/null +++ b/polycat/contracts/catpair.go @@ -0,0 +1,1833 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contracts + +import ( + "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 ( + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// CatPairABI is the input ABI used to generate the binding from. +const CatPairABI = "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0In\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1In\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0Out\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1Out\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint112\",\"name\":\"reserve0\",\"type\":\"uint112\"},{\"indexed\":false,\"internalType\":\"uint112\",\"name\":\"reserve1\",\"type\":\"uint112\"}],\"name\":\"Sync\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINIMUM_LIQUIDITY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMIT_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getReserves\",\"outputs\":[{\"internalType\":\"uint112\",\"name\":\"_reserve0\",\"type\":\"uint112\"},{\"internalType\":\"uint112\",\"name\":\"_reserve1\",\"type\":\"uint112\"},{\"internalType\":\"uint32\",\"name\":\"_blockTimestampLast\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token0\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_token1\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"kLast\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"price0CumulativeLast\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"price1CumulativeLast\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"skim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0Out\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1Out\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"swap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sync\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token0\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token1\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + +// CatPair is an auto generated Go binding around an Ethereum contract. +type CatPair struct { + CatPairCaller // Read-only binding to the contract + CatPairTransactor // Write-only binding to the contract + CatPairFilterer // Log filterer for contract events +} + +// CatPairCaller is an auto generated read-only Go binding around an Ethereum contract. +type CatPairCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// CatPairTransactor is an auto generated write-only Go binding around an Ethereum contract. +type CatPairTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// CatPairFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type CatPairFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// CatPairSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type CatPairSession struct { + Contract *CatPair // 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 +} + +// CatPairCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type CatPairCallerSession struct { + Contract *CatPairCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// CatPairTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type CatPairTransactorSession struct { + Contract *CatPairTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// CatPairRaw is an auto generated low-level Go binding around an Ethereum contract. +type CatPairRaw struct { + Contract *CatPair // Generic contract binding to access the raw methods on +} + +// CatPairCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type CatPairCallerRaw struct { + Contract *CatPairCaller // Generic read-only contract binding to access the raw methods on +} + +// CatPairTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type CatPairTransactorRaw struct { + Contract *CatPairTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewCatPair creates a new instance of CatPair, bound to a specific deployed contract. +func NewCatPair(address common.Address, backend bind.ContractBackend) (*CatPair, error) { + contract, err := bindCatPair(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &CatPair{CatPairCaller: CatPairCaller{contract: contract}, CatPairTransactor: CatPairTransactor{contract: contract}, CatPairFilterer: CatPairFilterer{contract: contract}}, nil +} + +// NewCatPairCaller creates a new read-only instance of CatPair, bound to a specific deployed contract. +func NewCatPairCaller(address common.Address, caller bind.ContractCaller) (*CatPairCaller, error) { + contract, err := bindCatPair(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &CatPairCaller{contract: contract}, nil +} + +// NewCatPairTransactor creates a new write-only instance of CatPair, bound to a specific deployed contract. +func NewCatPairTransactor(address common.Address, transactor bind.ContractTransactor) (*CatPairTransactor, error) { + contract, err := bindCatPair(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &CatPairTransactor{contract: contract}, nil +} + +// NewCatPairFilterer creates a new log filterer instance of CatPair, bound to a specific deployed contract. +func NewCatPairFilterer(address common.Address, filterer bind.ContractFilterer) (*CatPairFilterer, error) { + contract, err := bindCatPair(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &CatPairFilterer{contract: contract}, nil +} + +// bindCatPair binds a generic wrapper to an already deployed contract. +func bindCatPair(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(CatPairABI)) + 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 (_CatPair *CatPairRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CatPair.Contract.CatPairCaller.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 (_CatPair *CatPairRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CatPair.Contract.CatPairTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_CatPair *CatPairRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CatPair.Contract.CatPairTransactor.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 (_CatPair *CatPairCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CatPair.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 (_CatPair *CatPairTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CatPair.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_CatPair *CatPairTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CatPair.Contract.contract.Transact(opts, method, params...) +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_CatPair *CatPairCaller) DOMAINSEPARATOR(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _CatPair.contract.Call(opts, &out, "DOMAIN_SEPARATOR") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_CatPair *CatPairSession) DOMAINSEPARATOR() ([32]byte, error) { + return _CatPair.Contract.DOMAINSEPARATOR(&_CatPair.CallOpts) +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_CatPair *CatPairCallerSession) DOMAINSEPARATOR() ([32]byte, error) { + return _CatPair.Contract.DOMAINSEPARATOR(&_CatPair.CallOpts) +} + +// MINIMUMLIQUIDITY is a free data retrieval call binding the contract method 0xba9a7a56. +// +// Solidity: function MINIMUM_LIQUIDITY() view returns(uint256) +func (_CatPair *CatPairCaller) MINIMUMLIQUIDITY(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _CatPair.contract.Call(opts, &out, "MINIMUM_LIQUIDITY") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MINIMUMLIQUIDITY is a free data retrieval call binding the contract method 0xba9a7a56. +// +// Solidity: function MINIMUM_LIQUIDITY() view returns(uint256) +func (_CatPair *CatPairSession) MINIMUMLIQUIDITY() (*big.Int, error) { + return _CatPair.Contract.MINIMUMLIQUIDITY(&_CatPair.CallOpts) +} + +// MINIMUMLIQUIDITY is a free data retrieval call binding the contract method 0xba9a7a56. +// +// Solidity: function MINIMUM_LIQUIDITY() view returns(uint256) +func (_CatPair *CatPairCallerSession) MINIMUMLIQUIDITY() (*big.Int, error) { + return _CatPair.Contract.MINIMUMLIQUIDITY(&_CatPair.CallOpts) +} + +// PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f. +// +// Solidity: function PERMIT_TYPEHASH() view returns(bytes32) +func (_CatPair *CatPairCaller) PERMITTYPEHASH(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _CatPair.contract.Call(opts, &out, "PERMIT_TYPEHASH") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f. +// +// Solidity: function PERMIT_TYPEHASH() view returns(bytes32) +func (_CatPair *CatPairSession) PERMITTYPEHASH() ([32]byte, error) { + return _CatPair.Contract.PERMITTYPEHASH(&_CatPair.CallOpts) +} + +// PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f. +// +// Solidity: function PERMIT_TYPEHASH() view returns(bytes32) +func (_CatPair *CatPairCallerSession) PERMITTYPEHASH() ([32]byte, error) { + return _CatPair.Contract.PERMITTYPEHASH(&_CatPair.CallOpts) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address , address ) view returns(uint256) +func (_CatPair *CatPairCaller) Allowance(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error) { + var out []interface{} + err := _CatPair.contract.Call(opts, &out, "allowance", arg0, arg1) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address , address ) view returns(uint256) +func (_CatPair *CatPairSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _CatPair.Contract.Allowance(&_CatPair.CallOpts, arg0, arg1) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address , address ) view returns(uint256) +func (_CatPair *CatPairCallerSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _CatPair.Contract.Allowance(&_CatPair.CallOpts, arg0, arg1) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address ) view returns(uint256) +func (_CatPair *CatPairCaller) BalanceOf(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _CatPair.contract.Call(opts, &out, "balanceOf", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address ) view returns(uint256) +func (_CatPair *CatPairSession) BalanceOf(arg0 common.Address) (*big.Int, error) { + return _CatPair.Contract.BalanceOf(&_CatPair.CallOpts, arg0) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address ) view returns(uint256) +func (_CatPair *CatPairCallerSession) BalanceOf(arg0 common.Address) (*big.Int, error) { + return _CatPair.Contract.BalanceOf(&_CatPair.CallOpts, arg0) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_CatPair *CatPairCaller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _CatPair.contract.Call(opts, &out, "decimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_CatPair *CatPairSession) Decimals() (uint8, error) { + return _CatPair.Contract.Decimals(&_CatPair.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_CatPair *CatPairCallerSession) Decimals() (uint8, error) { + return _CatPair.Contract.Decimals(&_CatPair.CallOpts) +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_CatPair *CatPairCaller) Factory(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CatPair.contract.Call(opts, &out, "factory") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_CatPair *CatPairSession) Factory() (common.Address, error) { + return _CatPair.Contract.Factory(&_CatPair.CallOpts) +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_CatPair *CatPairCallerSession) Factory() (common.Address, error) { + return _CatPair.Contract.Factory(&_CatPair.CallOpts) +} + +// GetReserves is a free data retrieval call binding the contract method 0x0902f1ac. +// +// Solidity: function getReserves() view returns(uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast) +func (_CatPair *CatPairCaller) GetReserves(opts *bind.CallOpts) (struct { + Reserve0 *big.Int + Reserve1 *big.Int + BlockTimestampLast uint32 +}, error) { + var out []interface{} + err := _CatPair.contract.Call(opts, &out, "getReserves") + + outstruct := new(struct { + Reserve0 *big.Int + Reserve1 *big.Int + BlockTimestampLast uint32 + }) + if err != nil { + return *outstruct, err + } + + outstruct.Reserve0 = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.Reserve1 = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.BlockTimestampLast = *abi.ConvertType(out[2], new(uint32)).(*uint32) + + return *outstruct, err + +} + +// GetReserves is a free data retrieval call binding the contract method 0x0902f1ac. +// +// Solidity: function getReserves() view returns(uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast) +func (_CatPair *CatPairSession) GetReserves() (struct { + Reserve0 *big.Int + Reserve1 *big.Int + BlockTimestampLast uint32 +}, error) { + return _CatPair.Contract.GetReserves(&_CatPair.CallOpts) +} + +// GetReserves is a free data retrieval call binding the contract method 0x0902f1ac. +// +// Solidity: function getReserves() view returns(uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast) +func (_CatPair *CatPairCallerSession) GetReserves() (struct { + Reserve0 *big.Int + Reserve1 *big.Int + BlockTimestampLast uint32 +}, error) { + return _CatPair.Contract.GetReserves(&_CatPair.CallOpts) +} + +// KLast is a free data retrieval call binding the contract method 0x7464fc3d. +// +// Solidity: function kLast() view returns(uint256) +func (_CatPair *CatPairCaller) KLast(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _CatPair.contract.Call(opts, &out, "kLast") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// KLast is a free data retrieval call binding the contract method 0x7464fc3d. +// +// Solidity: function kLast() view returns(uint256) +func (_CatPair *CatPairSession) KLast() (*big.Int, error) { + return _CatPair.Contract.KLast(&_CatPair.CallOpts) +} + +// KLast is a free data retrieval call binding the contract method 0x7464fc3d. +// +// Solidity: function kLast() view returns(uint256) +func (_CatPair *CatPairCallerSession) KLast() (*big.Int, error) { + return _CatPair.Contract.KLast(&_CatPair.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_CatPair *CatPairCaller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _CatPair.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_CatPair *CatPairSession) Name() (string, error) { + return _CatPair.Contract.Name(&_CatPair.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_CatPair *CatPairCallerSession) Name() (string, error) { + return _CatPair.Contract.Name(&_CatPair.CallOpts) +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address ) view returns(uint256) +func (_CatPair *CatPairCaller) Nonces(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _CatPair.contract.Call(opts, &out, "nonces", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address ) view returns(uint256) +func (_CatPair *CatPairSession) Nonces(arg0 common.Address) (*big.Int, error) { + return _CatPair.Contract.Nonces(&_CatPair.CallOpts, arg0) +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address ) view returns(uint256) +func (_CatPair *CatPairCallerSession) Nonces(arg0 common.Address) (*big.Int, error) { + return _CatPair.Contract.Nonces(&_CatPair.CallOpts, arg0) +} + +// Price0CumulativeLast is a free data retrieval call binding the contract method 0x5909c0d5. +// +// Solidity: function price0CumulativeLast() view returns(uint256) +func (_CatPair *CatPairCaller) Price0CumulativeLast(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _CatPair.contract.Call(opts, &out, "price0CumulativeLast") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Price0CumulativeLast is a free data retrieval call binding the contract method 0x5909c0d5. +// +// Solidity: function price0CumulativeLast() view returns(uint256) +func (_CatPair *CatPairSession) Price0CumulativeLast() (*big.Int, error) { + return _CatPair.Contract.Price0CumulativeLast(&_CatPair.CallOpts) +} + +// Price0CumulativeLast is a free data retrieval call binding the contract method 0x5909c0d5. +// +// Solidity: function price0CumulativeLast() view returns(uint256) +func (_CatPair *CatPairCallerSession) Price0CumulativeLast() (*big.Int, error) { + return _CatPair.Contract.Price0CumulativeLast(&_CatPair.CallOpts) +} + +// Price1CumulativeLast is a free data retrieval call binding the contract method 0x5a3d5493. +// +// Solidity: function price1CumulativeLast() view returns(uint256) +func (_CatPair *CatPairCaller) Price1CumulativeLast(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _CatPair.contract.Call(opts, &out, "price1CumulativeLast") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Price1CumulativeLast is a free data retrieval call binding the contract method 0x5a3d5493. +// +// Solidity: function price1CumulativeLast() view returns(uint256) +func (_CatPair *CatPairSession) Price1CumulativeLast() (*big.Int, error) { + return _CatPair.Contract.Price1CumulativeLast(&_CatPair.CallOpts) +} + +// Price1CumulativeLast is a free data retrieval call binding the contract method 0x5a3d5493. +// +// Solidity: function price1CumulativeLast() view returns(uint256) +func (_CatPair *CatPairCallerSession) Price1CumulativeLast() (*big.Int, error) { + return _CatPair.Contract.Price1CumulativeLast(&_CatPair.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_CatPair *CatPairCaller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _CatPair.contract.Call(opts, &out, "symbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_CatPair *CatPairSession) Symbol() (string, error) { + return _CatPair.Contract.Symbol(&_CatPair.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_CatPair *CatPairCallerSession) Symbol() (string, error) { + return _CatPair.Contract.Symbol(&_CatPair.CallOpts) +} + +// Token0 is a free data retrieval call binding the contract method 0x0dfe1681. +// +// Solidity: function token0() view returns(address) +func (_CatPair *CatPairCaller) Token0(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CatPair.contract.Call(opts, &out, "token0") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Token0 is a free data retrieval call binding the contract method 0x0dfe1681. +// +// Solidity: function token0() view returns(address) +func (_CatPair *CatPairSession) Token0() (common.Address, error) { + return _CatPair.Contract.Token0(&_CatPair.CallOpts) +} + +// Token0 is a free data retrieval call binding the contract method 0x0dfe1681. +// +// Solidity: function token0() view returns(address) +func (_CatPair *CatPairCallerSession) Token0() (common.Address, error) { + return _CatPair.Contract.Token0(&_CatPair.CallOpts) +} + +// Token1 is a free data retrieval call binding the contract method 0xd21220a7. +// +// Solidity: function token1() view returns(address) +func (_CatPair *CatPairCaller) Token1(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CatPair.contract.Call(opts, &out, "token1") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Token1 is a free data retrieval call binding the contract method 0xd21220a7. +// +// Solidity: function token1() view returns(address) +func (_CatPair *CatPairSession) Token1() (common.Address, error) { + return _CatPair.Contract.Token1(&_CatPair.CallOpts) +} + +// Token1 is a free data retrieval call binding the contract method 0xd21220a7. +// +// Solidity: function token1() view returns(address) +func (_CatPair *CatPairCallerSession) Token1() (common.Address, error) { + return _CatPair.Contract.Token1(&_CatPair.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_CatPair *CatPairCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _CatPair.contract.Call(opts, &out, "totalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_CatPair *CatPairSession) TotalSupply() (*big.Int, error) { + return _CatPair.Contract.TotalSupply(&_CatPair.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_CatPair *CatPairCallerSession) TotalSupply() (*big.Int, error) { + return _CatPair.Contract.TotalSupply(&_CatPair.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_CatPair *CatPairTransactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { + return _CatPair.contract.Transact(opts, "approve", spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_CatPair *CatPairSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _CatPair.Contract.Approve(&_CatPair.TransactOpts, spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_CatPair *CatPairTransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _CatPair.Contract.Approve(&_CatPair.TransactOpts, spender, value) +} + +// Burn is a paid mutator transaction binding the contract method 0x89afcb44. +// +// Solidity: function burn(address to) returns(uint256 amount0, uint256 amount1) +func (_CatPair *CatPairTransactor) Burn(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _CatPair.contract.Transact(opts, "burn", to) +} + +// Burn is a paid mutator transaction binding the contract method 0x89afcb44. +// +// Solidity: function burn(address to) returns(uint256 amount0, uint256 amount1) +func (_CatPair *CatPairSession) Burn(to common.Address) (*types.Transaction, error) { + return _CatPair.Contract.Burn(&_CatPair.TransactOpts, to) +} + +// Burn is a paid mutator transaction binding the contract method 0x89afcb44. +// +// Solidity: function burn(address to) returns(uint256 amount0, uint256 amount1) +func (_CatPair *CatPairTransactorSession) Burn(to common.Address) (*types.Transaction, error) { + return _CatPair.Contract.Burn(&_CatPair.TransactOpts, to) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _token0, address _token1) returns() +func (_CatPair *CatPairTransactor) Initialize(opts *bind.TransactOpts, _token0 common.Address, _token1 common.Address) (*types.Transaction, error) { + return _CatPair.contract.Transact(opts, "initialize", _token0, _token1) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _token0, address _token1) returns() +func (_CatPair *CatPairSession) Initialize(_token0 common.Address, _token1 common.Address) (*types.Transaction, error) { + return _CatPair.Contract.Initialize(&_CatPair.TransactOpts, _token0, _token1) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _token0, address _token1) returns() +func (_CatPair *CatPairTransactorSession) Initialize(_token0 common.Address, _token1 common.Address) (*types.Transaction, error) { + return _CatPair.Contract.Initialize(&_CatPair.TransactOpts, _token0, _token1) +} + +// Mint is a paid mutator transaction binding the contract method 0x6a627842. +// +// Solidity: function mint(address to) returns(uint256 liquidity) +func (_CatPair *CatPairTransactor) Mint(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _CatPair.contract.Transact(opts, "mint", to) +} + +// Mint is a paid mutator transaction binding the contract method 0x6a627842. +// +// Solidity: function mint(address to) returns(uint256 liquidity) +func (_CatPair *CatPairSession) Mint(to common.Address) (*types.Transaction, error) { + return _CatPair.Contract.Mint(&_CatPair.TransactOpts, to) +} + +// Mint is a paid mutator transaction binding the contract method 0x6a627842. +// +// Solidity: function mint(address to) returns(uint256 liquidity) +func (_CatPair *CatPairTransactorSession) Mint(to common.Address) (*types.Transaction, error) { + return _CatPair.Contract.Mint(&_CatPair.TransactOpts, to) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_CatPair *CatPairTransactor) Permit(opts *bind.TransactOpts, owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _CatPair.contract.Transact(opts, "permit", owner, spender, value, deadline, v, r, s) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_CatPair *CatPairSession) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _CatPair.Contract.Permit(&_CatPair.TransactOpts, owner, spender, value, deadline, v, r, s) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_CatPair *CatPairTransactorSession) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _CatPair.Contract.Permit(&_CatPair.TransactOpts, owner, spender, value, deadline, v, r, s) +} + +// Skim is a paid mutator transaction binding the contract method 0xbc25cf77. +// +// Solidity: function skim(address to) returns() +func (_CatPair *CatPairTransactor) Skim(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _CatPair.contract.Transact(opts, "skim", to) +} + +// Skim is a paid mutator transaction binding the contract method 0xbc25cf77. +// +// Solidity: function skim(address to) returns() +func (_CatPair *CatPairSession) Skim(to common.Address) (*types.Transaction, error) { + return _CatPair.Contract.Skim(&_CatPair.TransactOpts, to) +} + +// Skim is a paid mutator transaction binding the contract method 0xbc25cf77. +// +// Solidity: function skim(address to) returns() +func (_CatPair *CatPairTransactorSession) Skim(to common.Address) (*types.Transaction, error) { + return _CatPair.Contract.Skim(&_CatPair.TransactOpts, to) +} + +// Swap is a paid mutator transaction binding the contract method 0x022c0d9f. +// +// Solidity: function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes data) returns() +func (_CatPair *CatPairTransactor) Swap(opts *bind.TransactOpts, amount0Out *big.Int, amount1Out *big.Int, to common.Address, data []byte) (*types.Transaction, error) { + return _CatPair.contract.Transact(opts, "swap", amount0Out, amount1Out, to, data) +} + +// Swap is a paid mutator transaction binding the contract method 0x022c0d9f. +// +// Solidity: function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes data) returns() +func (_CatPair *CatPairSession) Swap(amount0Out *big.Int, amount1Out *big.Int, to common.Address, data []byte) (*types.Transaction, error) { + return _CatPair.Contract.Swap(&_CatPair.TransactOpts, amount0Out, amount1Out, to, data) +} + +// Swap is a paid mutator transaction binding the contract method 0x022c0d9f. +// +// Solidity: function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes data) returns() +func (_CatPair *CatPairTransactorSession) Swap(amount0Out *big.Int, amount1Out *big.Int, to common.Address, data []byte) (*types.Transaction, error) { + return _CatPair.Contract.Swap(&_CatPair.TransactOpts, amount0Out, amount1Out, to, data) +} + +// Sync is a paid mutator transaction binding the contract method 0xfff6cae9. +// +// Solidity: function sync() returns() +func (_CatPair *CatPairTransactor) Sync(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CatPair.contract.Transact(opts, "sync") +} + +// Sync is a paid mutator transaction binding the contract method 0xfff6cae9. +// +// Solidity: function sync() returns() +func (_CatPair *CatPairSession) Sync() (*types.Transaction, error) { + return _CatPair.Contract.Sync(&_CatPair.TransactOpts) +} + +// Sync is a paid mutator transaction binding the contract method 0xfff6cae9. +// +// Solidity: function sync() returns() +func (_CatPair *CatPairTransactorSession) Sync() (*types.Transaction, error) { + return _CatPair.Contract.Sync(&_CatPair.TransactOpts) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_CatPair *CatPairTransactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { + return _CatPair.contract.Transact(opts, "transfer", to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_CatPair *CatPairSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _CatPair.Contract.Transfer(&_CatPair.TransactOpts, to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_CatPair *CatPairTransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _CatPair.Contract.Transfer(&_CatPair.TransactOpts, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_CatPair *CatPairTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _CatPair.contract.Transact(opts, "transferFrom", from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_CatPair *CatPairSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _CatPair.Contract.TransferFrom(&_CatPair.TransactOpts, from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_CatPair *CatPairTransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _CatPair.Contract.TransferFrom(&_CatPair.TransactOpts, from, to, value) +} + +// CatPairApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the CatPair contract. +type CatPairApprovalIterator struct { + Event *CatPairApproval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *CatPairApprovalIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(CatPairApproval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(CatPairApproval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *CatPairApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CatPairApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CatPairApproval represents a Approval event raised by the CatPair contract. +type CatPairApproval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_CatPair *CatPairFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*CatPairApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _CatPair.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &CatPairApprovalIterator{contract: _CatPair.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_CatPair *CatPairFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *CatPairApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _CatPair.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(CatPairApproval) + if err := _CatPair.contract.UnpackLog(event, "Approval", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_CatPair *CatPairFilterer) ParseApproval(log types.Log) (*CatPairApproval, error) { + event := new(CatPairApproval) + if err := _CatPair.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CatPairBurnIterator is returned from FilterBurn and is used to iterate over the raw logs and unpacked data for Burn events raised by the CatPair contract. +type CatPairBurnIterator struct { + Event *CatPairBurn // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *CatPairBurnIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(CatPairBurn) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(CatPairBurn) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *CatPairBurnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CatPairBurnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CatPairBurn represents a Burn event raised by the CatPair contract. +type CatPairBurn struct { + Sender common.Address + Amount0 *big.Int + Amount1 *big.Int + To common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBurn is a free log retrieval operation binding the contract event 0xdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496. +// +// Solidity: event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to) +func (_CatPair *CatPairFilterer) FilterBurn(opts *bind.FilterOpts, sender []common.Address, to []common.Address) (*CatPairBurnIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CatPair.contract.FilterLogs(opts, "Burn", senderRule, toRule) + if err != nil { + return nil, err + } + return &CatPairBurnIterator{contract: _CatPair.contract, event: "Burn", logs: logs, sub: sub}, nil +} + +// WatchBurn is a free log subscription operation binding the contract event 0xdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496. +// +// Solidity: event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to) +func (_CatPair *CatPairFilterer) WatchBurn(opts *bind.WatchOpts, sink chan<- *CatPairBurn, sender []common.Address, to []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CatPair.contract.WatchLogs(opts, "Burn", senderRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(CatPairBurn) + if err := _CatPair.contract.UnpackLog(event, "Burn", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseBurn is a log parse operation binding the contract event 0xdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496. +// +// Solidity: event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to) +func (_CatPair *CatPairFilterer) ParseBurn(log types.Log) (*CatPairBurn, error) { + event := new(CatPairBurn) + if err := _CatPair.contract.UnpackLog(event, "Burn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CatPairMintIterator is returned from FilterMint and is used to iterate over the raw logs and unpacked data for Mint events raised by the CatPair contract. +type CatPairMintIterator struct { + Event *CatPairMint // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *CatPairMintIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(CatPairMint) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(CatPairMint) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *CatPairMintIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CatPairMintIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CatPairMint represents a Mint event raised by the CatPair contract. +type CatPairMint struct { + Sender common.Address + Amount0 *big.Int + Amount1 *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMint is a free log retrieval operation binding the contract event 0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f. +// +// Solidity: event Mint(address indexed sender, uint256 amount0, uint256 amount1) +func (_CatPair *CatPairFilterer) FilterMint(opts *bind.FilterOpts, sender []common.Address) (*CatPairMintIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _CatPair.contract.FilterLogs(opts, "Mint", senderRule) + if err != nil { + return nil, err + } + return &CatPairMintIterator{contract: _CatPair.contract, event: "Mint", logs: logs, sub: sub}, nil +} + +// WatchMint is a free log subscription operation binding the contract event 0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f. +// +// Solidity: event Mint(address indexed sender, uint256 amount0, uint256 amount1) +func (_CatPair *CatPairFilterer) WatchMint(opts *bind.WatchOpts, sink chan<- *CatPairMint, sender []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _CatPair.contract.WatchLogs(opts, "Mint", senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(CatPairMint) + if err := _CatPair.contract.UnpackLog(event, "Mint", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseMint is a log parse operation binding the contract event 0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f. +// +// Solidity: event Mint(address indexed sender, uint256 amount0, uint256 amount1) +func (_CatPair *CatPairFilterer) ParseMint(log types.Log) (*CatPairMint, error) { + event := new(CatPairMint) + if err := _CatPair.contract.UnpackLog(event, "Mint", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CatPairSwapIterator is returned from FilterSwap and is used to iterate over the raw logs and unpacked data for Swap events raised by the CatPair contract. +type CatPairSwapIterator struct { + Event *CatPairSwap // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *CatPairSwapIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(CatPairSwap) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(CatPairSwap) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *CatPairSwapIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CatPairSwapIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CatPairSwap represents a Swap event raised by the CatPair contract. +type CatPairSwap struct { + Sender common.Address + Amount0In *big.Int + Amount1In *big.Int + Amount0Out *big.Int + Amount1Out *big.Int + To common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSwap is a free log retrieval operation binding the contract event 0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822. +// +// Solidity: event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to) +func (_CatPair *CatPairFilterer) FilterSwap(opts *bind.FilterOpts, sender []common.Address, to []common.Address) (*CatPairSwapIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CatPair.contract.FilterLogs(opts, "Swap", senderRule, toRule) + if err != nil { + return nil, err + } + return &CatPairSwapIterator{contract: _CatPair.contract, event: "Swap", logs: logs, sub: sub}, nil +} + +// WatchSwap is a free log subscription operation binding the contract event 0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822. +// +// Solidity: event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to) +func (_CatPair *CatPairFilterer) WatchSwap(opts *bind.WatchOpts, sink chan<- *CatPairSwap, sender []common.Address, to []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CatPair.contract.WatchLogs(opts, "Swap", senderRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(CatPairSwap) + if err := _CatPair.contract.UnpackLog(event, "Swap", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSwap is a log parse operation binding the contract event 0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822. +// +// Solidity: event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to) +func (_CatPair *CatPairFilterer) ParseSwap(log types.Log) (*CatPairSwap, error) { + event := new(CatPairSwap) + if err := _CatPair.contract.UnpackLog(event, "Swap", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CatPairSyncIterator is returned from FilterSync and is used to iterate over the raw logs and unpacked data for Sync events raised by the CatPair contract. +type CatPairSyncIterator struct { + Event *CatPairSync // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *CatPairSyncIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(CatPairSync) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(CatPairSync) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *CatPairSyncIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CatPairSyncIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CatPairSync represents a Sync event raised by the CatPair contract. +type CatPairSync struct { + Reserve0 *big.Int + Reserve1 *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSync is a free log retrieval operation binding the contract event 0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1. +// +// Solidity: event Sync(uint112 reserve0, uint112 reserve1) +func (_CatPair *CatPairFilterer) FilterSync(opts *bind.FilterOpts) (*CatPairSyncIterator, error) { + + logs, sub, err := _CatPair.contract.FilterLogs(opts, "Sync") + if err != nil { + return nil, err + } + return &CatPairSyncIterator{contract: _CatPair.contract, event: "Sync", logs: logs, sub: sub}, nil +} + +// WatchSync is a free log subscription operation binding the contract event 0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1. +// +// Solidity: event Sync(uint112 reserve0, uint112 reserve1) +func (_CatPair *CatPairFilterer) WatchSync(opts *bind.WatchOpts, sink chan<- *CatPairSync) (event.Subscription, error) { + + logs, sub, err := _CatPair.contract.WatchLogs(opts, "Sync") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(CatPairSync) + if err := _CatPair.contract.UnpackLog(event, "Sync", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSync is a log parse operation binding the contract event 0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1. +// +// Solidity: event Sync(uint112 reserve0, uint112 reserve1) +func (_CatPair *CatPairFilterer) ParseSync(log types.Log) (*CatPairSync, error) { + event := new(CatPairSync) + if err := _CatPair.contract.UnpackLog(event, "Sync", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CatPairTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the CatPair contract. +type CatPairTransferIterator struct { + Event *CatPairTransfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *CatPairTransferIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(CatPairTransfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(CatPairTransfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *CatPairTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CatPairTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CatPairTransfer represents a Transfer event raised by the CatPair contract. +type CatPairTransfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_CatPair *CatPairFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CatPairTransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CatPair.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &CatPairTransferIterator{contract: _CatPair.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_CatPair *CatPairFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *CatPairTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CatPair.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(CatPairTransfer) + if err := _CatPair.contract.UnpackLog(event, "Transfer", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_CatPair *CatPairFilterer) ParseTransfer(log types.Log) (*CatPairTransfer, error) { + event := new(CatPairTransfer) + if err := _CatPair.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/polycat/contracts/catrouter.abi b/polycat/contracts/catrouter.abi new file mode 100644 index 0000000..383ca61 --- /dev/null +++ b/polycat/contracts/catrouter.abi @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WETH","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"amountADesired","type":"uint256"},{"internalType":"uint256","name":"amountBDesired","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"addLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountTokenDesired","type":"uint256"},{"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":"addLiquidityETH","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"reserveIn","type":"uint256"},{"internalType":"uint256","name":"reserveOut","type":"uint256"}],"name":"getAmountIn","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"reserveIn","type":"uint256"},{"internalType":"uint256","name":"reserveOut","type":"uint256"}],"name":"getAmountOut","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsIn","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsOut","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"reserveA","type":"uint256"},{"internalType":"uint256","name":"reserveB","type":"uint256"}],"name":"quote","outputs":[{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"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":"removeLiquidityETH","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"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":"removeLiquidityETHSupportingFeeOnTransferTokens","outputs":[{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityETHWithPermit","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens","outputs":[{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityWithPermit","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"nonpayable","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":"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":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactETHForTokensSupportingFeeOnTransferTokens","outputs":[],"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":"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":"swapExactTokensForETHSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"nonpayable","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":"swapExactTokensForTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","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":"swapExactTokensForTokensSupportingFeeOnTransferTokens","outputs":[],"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"},{"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"},{"stateMutability":"payable","type":"receive"}] \ No newline at end of file diff --git a/polycat/contracts/catrouter.go b/polycat/contracts/catrouter.go new file mode 100644 index 0000000..c79d109 --- /dev/null +++ b/polycat/contracts/catrouter.go @@ -0,0 +1,767 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contracts + +import ( + "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 ( + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// CatRouterABI is the input ABI used to generate the binding from. +const CatRouterABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_factory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_WETH\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountADesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBDesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenDesired\",\"type\":\"uint256\"},{\"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\":\"addLiquidityETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveOut\",\"type\":\"uint256\"}],\"name\":\"getAmountIn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveOut\",\"type\":\"uint256\"}],\"name\":\"getAmountOut\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"}],\"name\":\"getAmountsIn\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"}],\"name\":\"getAmountsOut\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveB\",\"type\":\"uint256\"}],\"name\":\"quote\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"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\":\"removeLiquidityETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"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\":\"removeLiquidityETHSupportingFeeOnTransferTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"approveMax\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"removeLiquidityETHWithPermit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"approveMax\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"approveMax\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"removeLiquidityWithPermit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"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\":\"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\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactETHForTokensSupportingFeeOnTransferTokens\",\"outputs\":[],\"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\":\"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\":\"swapExactTokensForETHSupportingFeeOnTransferTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"swapExactTokensForTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"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\":\"swapExactTokensForTokensSupportingFeeOnTransferTokens\",\"outputs\":[],\"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\"},{\"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\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]" + +// CatRouter is an auto generated Go binding around an Ethereum contract. +type CatRouter struct { + CatRouterCaller // Read-only binding to the contract + CatRouterTransactor // Write-only binding to the contract + CatRouterFilterer // Log filterer for contract events +} + +// CatRouterCaller is an auto generated read-only Go binding around an Ethereum contract. +type CatRouterCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// CatRouterTransactor is an auto generated write-only Go binding around an Ethereum contract. +type CatRouterTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// CatRouterFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type CatRouterFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// CatRouterSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type CatRouterSession struct { + Contract *CatRouter // 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 +} + +// CatRouterCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type CatRouterCallerSession struct { + Contract *CatRouterCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// CatRouterTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type CatRouterTransactorSession struct { + Contract *CatRouterTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// CatRouterRaw is an auto generated low-level Go binding around an Ethereum contract. +type CatRouterRaw struct { + Contract *CatRouter // Generic contract binding to access the raw methods on +} + +// CatRouterCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type CatRouterCallerRaw struct { + Contract *CatRouterCaller // Generic read-only contract binding to access the raw methods on +} + +// CatRouterTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type CatRouterTransactorRaw struct { + Contract *CatRouterTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewCatRouter creates a new instance of CatRouter, bound to a specific deployed contract. +func NewCatRouter(address common.Address, backend bind.ContractBackend) (*CatRouter, error) { + contract, err := bindCatRouter(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &CatRouter{CatRouterCaller: CatRouterCaller{contract: contract}, CatRouterTransactor: CatRouterTransactor{contract: contract}, CatRouterFilterer: CatRouterFilterer{contract: contract}}, nil +} + +// NewCatRouterCaller creates a new read-only instance of CatRouter, bound to a specific deployed contract. +func NewCatRouterCaller(address common.Address, caller bind.ContractCaller) (*CatRouterCaller, error) { + contract, err := bindCatRouter(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &CatRouterCaller{contract: contract}, nil +} + +// NewCatRouterTransactor creates a new write-only instance of CatRouter, bound to a specific deployed contract. +func NewCatRouterTransactor(address common.Address, transactor bind.ContractTransactor) (*CatRouterTransactor, error) { + contract, err := bindCatRouter(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &CatRouterTransactor{contract: contract}, nil +} + +// NewCatRouterFilterer creates a new log filterer instance of CatRouter, bound to a specific deployed contract. +func NewCatRouterFilterer(address common.Address, filterer bind.ContractFilterer) (*CatRouterFilterer, error) { + contract, err := bindCatRouter(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &CatRouterFilterer{contract: contract}, nil +} + +// bindCatRouter binds a generic wrapper to an already deployed contract. +func bindCatRouter(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(CatRouterABI)) + 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 (_CatRouter *CatRouterRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CatRouter.Contract.CatRouterCaller.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 (_CatRouter *CatRouterRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CatRouter.Contract.CatRouterTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_CatRouter *CatRouterRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CatRouter.Contract.CatRouterTransactor.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 (_CatRouter *CatRouterCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CatRouter.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 (_CatRouter *CatRouterTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CatRouter.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_CatRouter *CatRouterTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CatRouter.Contract.contract.Transact(opts, method, params...) +} + +// WETH is a free data retrieval call binding the contract method 0xad5c4648. +// +// Solidity: function WETH() view returns(address) +func (_CatRouter *CatRouterCaller) WETH(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CatRouter.contract.Call(opts, &out, "WETH") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// WETH is a free data retrieval call binding the contract method 0xad5c4648. +// +// Solidity: function WETH() view returns(address) +func (_CatRouter *CatRouterSession) WETH() (common.Address, error) { + return _CatRouter.Contract.WETH(&_CatRouter.CallOpts) +} + +// WETH is a free data retrieval call binding the contract method 0xad5c4648. +// +// Solidity: function WETH() view returns(address) +func (_CatRouter *CatRouterCallerSession) WETH() (common.Address, error) { + return _CatRouter.Contract.WETH(&_CatRouter.CallOpts) +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_CatRouter *CatRouterCaller) Factory(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CatRouter.contract.Call(opts, &out, "factory") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_CatRouter *CatRouterSession) Factory() (common.Address, error) { + return _CatRouter.Contract.Factory(&_CatRouter.CallOpts) +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_CatRouter *CatRouterCallerSession) Factory() (common.Address, error) { + return _CatRouter.Contract.Factory(&_CatRouter.CallOpts) +} + +// GetAmountIn is a free data retrieval call binding the contract method 0x85f8c259. +// +// Solidity: function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountIn) +func (_CatRouter *CatRouterCaller) GetAmountIn(opts *bind.CallOpts, amountOut *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + var out []interface{} + err := _CatRouter.contract.Call(opts, &out, "getAmountIn", amountOut, reserveIn, reserveOut) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetAmountIn is a free data retrieval call binding the contract method 0x85f8c259. +// +// Solidity: function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountIn) +func (_CatRouter *CatRouterSession) GetAmountIn(amountOut *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + return _CatRouter.Contract.GetAmountIn(&_CatRouter.CallOpts, amountOut, reserveIn, reserveOut) +} + +// GetAmountIn is a free data retrieval call binding the contract method 0x85f8c259. +// +// Solidity: function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountIn) +func (_CatRouter *CatRouterCallerSession) GetAmountIn(amountOut *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + return _CatRouter.Contract.GetAmountIn(&_CatRouter.CallOpts, amountOut, reserveIn, reserveOut) +} + +// GetAmountOut is a free data retrieval call binding the contract method 0x054d50d4. +// +// Solidity: function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountOut) +func (_CatRouter *CatRouterCaller) GetAmountOut(opts *bind.CallOpts, amountIn *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + var out []interface{} + err := _CatRouter.contract.Call(opts, &out, "getAmountOut", amountIn, reserveIn, reserveOut) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetAmountOut is a free data retrieval call binding the contract method 0x054d50d4. +// +// Solidity: function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountOut) +func (_CatRouter *CatRouterSession) GetAmountOut(amountIn *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + return _CatRouter.Contract.GetAmountOut(&_CatRouter.CallOpts, amountIn, reserveIn, reserveOut) +} + +// GetAmountOut is a free data retrieval call binding the contract method 0x054d50d4. +// +// Solidity: function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountOut) +func (_CatRouter *CatRouterCallerSession) GetAmountOut(amountIn *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + return _CatRouter.Contract.GetAmountOut(&_CatRouter.CallOpts, amountIn, reserveIn, reserveOut) +} + +// GetAmountsIn is a free data retrieval call binding the contract method 0x1f00ca74. +// +// Solidity: function getAmountsIn(uint256 amountOut, address[] path) view returns(uint256[] amounts) +func (_CatRouter *CatRouterCaller) GetAmountsIn(opts *bind.CallOpts, amountOut *big.Int, path []common.Address) ([]*big.Int, error) { + var out []interface{} + err := _CatRouter.contract.Call(opts, &out, "getAmountsIn", amountOut, path) + + if err != nil { + return *new([]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + + return out0, err + +} + +// GetAmountsIn is a free data retrieval call binding the contract method 0x1f00ca74. +// +// Solidity: function getAmountsIn(uint256 amountOut, address[] path) view returns(uint256[] amounts) +func (_CatRouter *CatRouterSession) GetAmountsIn(amountOut *big.Int, path []common.Address) ([]*big.Int, error) { + return _CatRouter.Contract.GetAmountsIn(&_CatRouter.CallOpts, amountOut, path) +} + +// GetAmountsIn is a free data retrieval call binding the contract method 0x1f00ca74. +// +// Solidity: function getAmountsIn(uint256 amountOut, address[] path) view returns(uint256[] amounts) +func (_CatRouter *CatRouterCallerSession) GetAmountsIn(amountOut *big.Int, path []common.Address) ([]*big.Int, error) { + return _CatRouter.Contract.GetAmountsIn(&_CatRouter.CallOpts, amountOut, path) +} + +// GetAmountsOut is a free data retrieval call binding the contract method 0xd06ca61f. +// +// Solidity: function getAmountsOut(uint256 amountIn, address[] path) view returns(uint256[] amounts) +func (_CatRouter *CatRouterCaller) GetAmountsOut(opts *bind.CallOpts, amountIn *big.Int, path []common.Address) ([]*big.Int, error) { + var out []interface{} + err := _CatRouter.contract.Call(opts, &out, "getAmountsOut", amountIn, path) + + if err != nil { + return *new([]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + + return out0, err + +} + +// GetAmountsOut is a free data retrieval call binding the contract method 0xd06ca61f. +// +// Solidity: function getAmountsOut(uint256 amountIn, address[] path) view returns(uint256[] amounts) +func (_CatRouter *CatRouterSession) GetAmountsOut(amountIn *big.Int, path []common.Address) ([]*big.Int, error) { + return _CatRouter.Contract.GetAmountsOut(&_CatRouter.CallOpts, amountIn, path) +} + +// GetAmountsOut is a free data retrieval call binding the contract method 0xd06ca61f. +// +// Solidity: function getAmountsOut(uint256 amountIn, address[] path) view returns(uint256[] amounts) +func (_CatRouter *CatRouterCallerSession) GetAmountsOut(amountIn *big.Int, path []common.Address) ([]*big.Int, error) { + return _CatRouter.Contract.GetAmountsOut(&_CatRouter.CallOpts, amountIn, path) +} + +// Quote is a free data retrieval call binding the contract method 0xad615dec. +// +// Solidity: function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) pure returns(uint256 amountB) +func (_CatRouter *CatRouterCaller) Quote(opts *bind.CallOpts, amountA *big.Int, reserveA *big.Int, reserveB *big.Int) (*big.Int, error) { + var out []interface{} + err := _CatRouter.contract.Call(opts, &out, "quote", amountA, reserveA, reserveB) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Quote is a free data retrieval call binding the contract method 0xad615dec. +// +// Solidity: function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) pure returns(uint256 amountB) +func (_CatRouter *CatRouterSession) Quote(amountA *big.Int, reserveA *big.Int, reserveB *big.Int) (*big.Int, error) { + return _CatRouter.Contract.Quote(&_CatRouter.CallOpts, amountA, reserveA, reserveB) +} + +// Quote is a free data retrieval call binding the contract method 0xad615dec. +// +// Solidity: function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) pure returns(uint256 amountB) +func (_CatRouter *CatRouterCallerSession) Quote(amountA *big.Int, reserveA *big.Int, reserveB *big.Int) (*big.Int, error) { + return _CatRouter.Contract.Quote(&_CatRouter.CallOpts, amountA, reserveA, reserveB) +} + +// AddLiquidity is a paid mutator transaction binding the contract method 0xe8e33700. +// +// Solidity: function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB, uint256 liquidity) +func (_CatRouter *CatRouterTransactor) AddLiquidity(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address, amountADesired *big.Int, amountBDesired *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.contract.Transact(opts, "addLiquidity", tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline) +} + +// AddLiquidity is a paid mutator transaction binding the contract method 0xe8e33700. +// +// Solidity: function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB, uint256 liquidity) +func (_CatRouter *CatRouterSession) AddLiquidity(tokenA common.Address, tokenB common.Address, amountADesired *big.Int, amountBDesired *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.AddLiquidity(&_CatRouter.TransactOpts, tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline) +} + +// AddLiquidity is a paid mutator transaction binding the contract method 0xe8e33700. +// +// Solidity: function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB, uint256 liquidity) +func (_CatRouter *CatRouterTransactorSession) AddLiquidity(tokenA common.Address, tokenB common.Address, amountADesired *big.Int, amountBDesired *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.AddLiquidity(&_CatRouter.TransactOpts, tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline) +} + +// AddLiquidityETH is a paid mutator transaction binding the contract method 0xf305d719. +// +// Solidity: function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) payable returns(uint256 amountToken, uint256 amountETH, uint256 liquidity) +func (_CatRouter *CatRouterTransactor) AddLiquidityETH(opts *bind.TransactOpts, token common.Address, amountTokenDesired *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.contract.Transact(opts, "addLiquidityETH", token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline) +} + +// AddLiquidityETH is a paid mutator transaction binding the contract method 0xf305d719. +// +// Solidity: function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) payable returns(uint256 amountToken, uint256 amountETH, uint256 liquidity) +func (_CatRouter *CatRouterSession) AddLiquidityETH(token common.Address, amountTokenDesired *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.AddLiquidityETH(&_CatRouter.TransactOpts, token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline) +} + +// AddLiquidityETH is a paid mutator transaction binding the contract method 0xf305d719. +// +// Solidity: function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) payable returns(uint256 amountToken, uint256 amountETH, uint256 liquidity) +func (_CatRouter *CatRouterTransactorSession) AddLiquidityETH(token common.Address, amountTokenDesired *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.AddLiquidityETH(&_CatRouter.TransactOpts, token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidity is a paid mutator transaction binding the contract method 0xbaa2abde. +// +// Solidity: function removeLiquidity(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB) +func (_CatRouter *CatRouterTransactor) RemoveLiquidity(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.contract.Transact(opts, "removeLiquidity", tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline) +} + +// RemoveLiquidity is a paid mutator transaction binding the contract method 0xbaa2abde. +// +// Solidity: function removeLiquidity(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB) +func (_CatRouter *CatRouterSession) RemoveLiquidity(tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.RemoveLiquidity(&_CatRouter.TransactOpts, tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline) +} + +// RemoveLiquidity is a paid mutator transaction binding the contract method 0xbaa2abde. +// +// Solidity: function removeLiquidity(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB) +func (_CatRouter *CatRouterTransactorSession) RemoveLiquidity(tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.RemoveLiquidity(&_CatRouter.TransactOpts, tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline) +} + +// RemoveLiquidityETH is a paid mutator transaction binding the contract method 0x02751cec. +// +// Solidity: function removeLiquidityETH(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountToken, uint256 amountETH) +func (_CatRouter *CatRouterTransactor) RemoveLiquidityETH(opts *bind.TransactOpts, token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.contract.Transact(opts, "removeLiquidityETH", token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETH is a paid mutator transaction binding the contract method 0x02751cec. +// +// Solidity: function removeLiquidityETH(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountToken, uint256 amountETH) +func (_CatRouter *CatRouterSession) RemoveLiquidityETH(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.RemoveLiquidityETH(&_CatRouter.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETH is a paid mutator transaction binding the contract method 0x02751cec. +// +// Solidity: function removeLiquidityETH(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountToken, uint256 amountETH) +func (_CatRouter *CatRouterTransactorSession) RemoveLiquidityETH(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.RemoveLiquidityETH(&_CatRouter.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xaf2979eb. +// +// Solidity: function removeLiquidityETHSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountETH) +func (_CatRouter *CatRouterTransactor) RemoveLiquidityETHSupportingFeeOnTransferTokens(opts *bind.TransactOpts, token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.contract.Transact(opts, "removeLiquidityETHSupportingFeeOnTransferTokens", token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xaf2979eb. +// +// Solidity: function removeLiquidityETHSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountETH) +func (_CatRouter *CatRouterSession) RemoveLiquidityETHSupportingFeeOnTransferTokens(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.RemoveLiquidityETHSupportingFeeOnTransferTokens(&_CatRouter.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xaf2979eb. +// +// Solidity: function removeLiquidityETHSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountETH) +func (_CatRouter *CatRouterTransactorSession) RemoveLiquidityETHSupportingFeeOnTransferTokens(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.RemoveLiquidityETHSupportingFeeOnTransferTokens(&_CatRouter.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETHWithPermit is a paid mutator transaction binding the contract method 0xded9382a. +// +// Solidity: function removeLiquidityETHWithPermit(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountToken, uint256 amountETH) +func (_CatRouter *CatRouterTransactor) RemoveLiquidityETHWithPermit(opts *bind.TransactOpts, token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _CatRouter.contract.Transact(opts, "removeLiquidityETHWithPermit", token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermit is a paid mutator transaction binding the contract method 0xded9382a. +// +// Solidity: function removeLiquidityETHWithPermit(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountToken, uint256 amountETH) +func (_CatRouter *CatRouterSession) RemoveLiquidityETHWithPermit(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _CatRouter.Contract.RemoveLiquidityETHWithPermit(&_CatRouter.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermit is a paid mutator transaction binding the contract method 0xded9382a. +// +// Solidity: function removeLiquidityETHWithPermit(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountToken, uint256 amountETH) +func (_CatRouter *CatRouterTransactorSession) RemoveLiquidityETHWithPermit(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _CatRouter.Contract.RemoveLiquidityETHWithPermit(&_CatRouter.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5b0d5984. +// +// Solidity: function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountETH) +func (_CatRouter *CatRouterTransactor) RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens(opts *bind.TransactOpts, token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _CatRouter.contract.Transact(opts, "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens", token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5b0d5984. +// +// Solidity: function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountETH) +func (_CatRouter *CatRouterSession) RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _CatRouter.Contract.RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens(&_CatRouter.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5b0d5984. +// +// Solidity: function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountETH) +func (_CatRouter *CatRouterTransactorSession) RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _CatRouter.Contract.RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens(&_CatRouter.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityWithPermit is a paid mutator transaction binding the contract method 0x2195995c. +// +// Solidity: function removeLiquidityWithPermit(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountA, uint256 amountB) +func (_CatRouter *CatRouterTransactor) RemoveLiquidityWithPermit(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _CatRouter.contract.Transact(opts, "removeLiquidityWithPermit", tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityWithPermit is a paid mutator transaction binding the contract method 0x2195995c. +// +// Solidity: function removeLiquidityWithPermit(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountA, uint256 amountB) +func (_CatRouter *CatRouterSession) RemoveLiquidityWithPermit(tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _CatRouter.Contract.RemoveLiquidityWithPermit(&_CatRouter.TransactOpts, tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityWithPermit is a paid mutator transaction binding the contract method 0x2195995c. +// +// Solidity: function removeLiquidityWithPermit(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountA, uint256 amountB) +func (_CatRouter *CatRouterTransactorSession) RemoveLiquidityWithPermit(tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _CatRouter.Contract.RemoveLiquidityWithPermit(&_CatRouter.TransactOpts, tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline, approveMax, v, r, s) +} + +// 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 (_CatRouter *CatRouterTransactor) SwapETHForExactTokens(opts *bind.TransactOpts, amountOut *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.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 (_CatRouter *CatRouterSession) SwapETHForExactTokens(amountOut *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.SwapETHForExactTokens(&_CatRouter.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 (_CatRouter *CatRouterTransactorSession) SwapETHForExactTokens(amountOut *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.SwapETHForExactTokens(&_CatRouter.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 (_CatRouter *CatRouterTransactor) SwapExactETHForTokens(opts *bind.TransactOpts, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.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 (_CatRouter *CatRouterSession) SwapExactETHForTokens(amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.SwapExactETHForTokens(&_CatRouter.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 (_CatRouter *CatRouterTransactorSession) SwapExactETHForTokens(amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.SwapExactETHForTokens(&_CatRouter.TransactOpts, amountOutMin, path, to, deadline) +} + +// SwapExactETHForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xb6f9de95. +// +// Solidity: function swapExactETHForTokensSupportingFeeOnTransferTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns() +func (_CatRouter *CatRouterTransactor) SwapExactETHForTokensSupportingFeeOnTransferTokens(opts *bind.TransactOpts, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.contract.Transact(opts, "swapExactETHForTokensSupportingFeeOnTransferTokens", amountOutMin, path, to, deadline) +} + +// SwapExactETHForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xb6f9de95. +// +// Solidity: function swapExactETHForTokensSupportingFeeOnTransferTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns() +func (_CatRouter *CatRouterSession) SwapExactETHForTokensSupportingFeeOnTransferTokens(amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.SwapExactETHForTokensSupportingFeeOnTransferTokens(&_CatRouter.TransactOpts, amountOutMin, path, to, deadline) +} + +// SwapExactETHForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xb6f9de95. +// +// Solidity: function swapExactETHForTokensSupportingFeeOnTransferTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns() +func (_CatRouter *CatRouterTransactorSession) SwapExactETHForTokensSupportingFeeOnTransferTokens(amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.SwapExactETHForTokensSupportingFeeOnTransferTokens(&_CatRouter.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 (_CatRouter *CatRouterTransactor) SwapExactTokensForETH(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.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 (_CatRouter *CatRouterSession) SwapExactTokensForETH(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.SwapExactTokensForETH(&_CatRouter.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 (_CatRouter *CatRouterTransactorSession) SwapExactTokensForETH(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.SwapExactTokensForETH(&_CatRouter.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x791ac947. +// +// Solidity: function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_CatRouter *CatRouterTransactor) SwapExactTokensForETHSupportingFeeOnTransferTokens(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.contract.Transact(opts, "swapExactTokensForETHSupportingFeeOnTransferTokens", amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x791ac947. +// +// Solidity: function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_CatRouter *CatRouterSession) SwapExactTokensForETHSupportingFeeOnTransferTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.SwapExactTokensForETHSupportingFeeOnTransferTokens(&_CatRouter.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x791ac947. +// +// Solidity: function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_CatRouter *CatRouterTransactorSession) SwapExactTokensForETHSupportingFeeOnTransferTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.SwapExactTokensForETHSupportingFeeOnTransferTokens(&_CatRouter.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 (_CatRouter *CatRouterTransactor) SwapExactTokensForTokens(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.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 (_CatRouter *CatRouterSession) SwapExactTokensForTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.SwapExactTokensForTokens(&_CatRouter.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 (_CatRouter *CatRouterTransactorSession) SwapExactTokensForTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.SwapExactTokensForTokens(&_CatRouter.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5c11d795. +// +// Solidity: function swapExactTokensForTokensSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_CatRouter *CatRouterTransactor) SwapExactTokensForTokensSupportingFeeOnTransferTokens(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.contract.Transact(opts, "swapExactTokensForTokensSupportingFeeOnTransferTokens", amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5c11d795. +// +// Solidity: function swapExactTokensForTokensSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_CatRouter *CatRouterSession) SwapExactTokensForTokensSupportingFeeOnTransferTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.SwapExactTokensForTokensSupportingFeeOnTransferTokens(&_CatRouter.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5c11d795. +// +// Solidity: function swapExactTokensForTokensSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_CatRouter *CatRouterTransactorSession) SwapExactTokensForTokensSupportingFeeOnTransferTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.SwapExactTokensForTokensSupportingFeeOnTransferTokens(&_CatRouter.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 (_CatRouter *CatRouterTransactor) SwapTokensForExactETH(opts *bind.TransactOpts, amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.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 (_CatRouter *CatRouterSession) SwapTokensForExactETH(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.SwapTokensForExactETH(&_CatRouter.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 (_CatRouter *CatRouterTransactorSession) SwapTokensForExactETH(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.SwapTokensForExactETH(&_CatRouter.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 (_CatRouter *CatRouterTransactor) SwapTokensForExactTokens(opts *bind.TransactOpts, amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.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 (_CatRouter *CatRouterSession) SwapTokensForExactTokens(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.SwapTokensForExactTokens(&_CatRouter.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 (_CatRouter *CatRouterTransactorSession) SwapTokensForExactTokens(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _CatRouter.Contract.SwapTokensForExactTokens(&_CatRouter.TransactOpts, amountOut, amountInMax, path, to, deadline) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_CatRouter *CatRouterTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CatRouter.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_CatRouter *CatRouterSession) Receive() (*types.Transaction, error) { + return _CatRouter.Contract.Receive(&_CatRouter.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_CatRouter *CatRouterTransactorSession) Receive() (*types.Transaction, error) { + return _CatRouter.Contract.Receive(&_CatRouter.TransactOpts) +} diff --git a/polycat/contracts/masterchef.abi b/polycat/contracts/masterchef.abi new file mode 100644 index 0000000..cfb25e0 --- /dev/null +++ b/polycat/contracts/masterchef.abi @@ -0,0 +1 @@ +[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_fish","internalType":"contract FishToken"},{"type":"uint256","name":"_startBlock","internalType":"uint256"},{"type":"address","name":"_devAddress","internalType":"address"},{"type":"address","name":"_feeAddress","internalType":"address"},{"type":"address","name":"_vaultAddress","internalType":"address"}]},{"type":"event","name":"Deposit","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"EmergencyWithdraw","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"ReferralCommissionPaid","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"address","name":"referrer","internalType":"address","indexed":true},{"type":"uint256","name":"commissionAmount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"SetDevAddress","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"address","name":"newAddress","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"SetFeeAddress","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"address","name":"newAddress","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"SetReferralAddress","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"address","name":"newAddress","internalType":"contract IReferral","indexed":true}],"anonymous":false},{"type":"event","name":"SetVaultAddress","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"address","name":"newAddress","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"UpdateEmissionRate","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"fishPerBlock","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Withdraw","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint16","name":"","internalType":"uint16"}],"name":"MAXIMUM_REFERRAL_COMMISSION_RATE","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"add","inputs":[{"type":"uint256","name":"_allocPoint","internalType":"uint256"},{"type":"address","name":"_lpToken","internalType":"contract IERC20"},{"type":"uint16","name":"_depositFeeBP","internalType":"uint16"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deposit","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"address","name":"_referrer","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"devAddress","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"emergencyWithdraw","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"feeAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract FishToken"}],"name":"fish","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"fishPerBlock","inputs":[]},{"type":"function","stateMutability":"pure","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getMultiplier","inputs":[{"type":"uint256","name":"_from","internalType":"uint256"},{"type":"uint256","name":"_to","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"massUpdatePools","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"pendingFish","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"poolExistence","inputs":[{"type":"address","name":"","internalType":"contract IERC20"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"lpToken","internalType":"contract IERC20"},{"type":"uint256","name":"allocPoint","internalType":"uint256"},{"type":"uint256","name":"lastRewardBlock","internalType":"uint256"},{"type":"uint256","name":"accFishPerShare","internalType":"uint256"},{"type":"uint16","name":"depositFeeBP","internalType":"uint16"}],"name":"poolInfo","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"poolLength","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IReferral"}],"name":"referral","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint16","name":"","internalType":"uint16"}],"name":"referralCommissionRate","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"set","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_allocPoint","internalType":"uint256"},{"type":"uint16","name":"_depositFeeBP","internalType":"uint16"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setDevAddress","inputs":[{"type":"address","name":"_devAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setFeeAddress","inputs":[{"type":"address","name":"_feeAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setReferralAddress","inputs":[{"type":"address","name":"_referral","internalType":"contract IReferral"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setReferralCommissionRate","inputs":[{"type":"uint16","name":"_referralCommissionRate","internalType":"uint16"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setVaultAddress","inputs":[{"type":"address","name":"_vaultAddress","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"startBlock","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalAllocPoint","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateEmissionRate","inputs":[{"type":"uint256","name":"_fishPerBlock","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updatePool","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateStartBlock","inputs":[{"type":"uint256","name":"_startBlock","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint256","name":"rewardDebt","internalType":"uint256"}],"name":"userInfo","inputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"vaultAddress","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_amount","internalType":"uint256"}]}] \ No newline at end of file diff --git a/polycat/contracts/masterchef.go b/polycat/contracts/masterchef.go new file mode 100644 index 0000000..bc949f0 --- /dev/null +++ b/polycat/contracts/masterchef.go @@ -0,0 +1,2604 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contracts + +import ( + "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 ( + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// MasterchefABI is the input ABI used to generate the binding from. +const MasterchefABI = "[{\"type\":\"constructor\",\"stateMutability\":\"nonpayable\",\"inputs\":[{\"type\":\"address\",\"name\":\"_fish\",\"internalType\":\"contractFishToken\"},{\"type\":\"uint256\",\"name\":\"_startBlock\",\"internalType\":\"uint256\"},{\"type\":\"address\",\"name\":\"_devAddress\",\"internalType\":\"address\"},{\"type\":\"address\",\"name\":\"_feeAddress\",\"internalType\":\"address\"},{\"type\":\"address\",\"name\":\"_vaultAddress\",\"internalType\":\"address\"}]},{\"type\":\"event\",\"name\":\"Deposit\",\"inputs\":[{\"type\":\"address\",\"name\":\"user\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"pid\",\"internalType\":\"uint256\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"amount\",\"internalType\":\"uint256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"EmergencyWithdraw\",\"inputs\":[{\"type\":\"address\",\"name\":\"user\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"pid\",\"internalType\":\"uint256\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"amount\",\"internalType\":\"uint256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"type\":\"address\",\"name\":\"previousOwner\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"address\",\"name\":\"newOwner\",\"internalType\":\"address\",\"indexed\":true}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ReferralCommissionPaid\",\"inputs\":[{\"type\":\"address\",\"name\":\"user\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"address\",\"name\":\"referrer\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"commissionAmount\",\"internalType\":\"uint256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SetDevAddress\",\"inputs\":[{\"type\":\"address\",\"name\":\"user\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"address\",\"name\":\"newAddress\",\"internalType\":\"address\",\"indexed\":true}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SetFeeAddress\",\"inputs\":[{\"type\":\"address\",\"name\":\"user\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"address\",\"name\":\"newAddress\",\"internalType\":\"address\",\"indexed\":true}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SetReferralAddress\",\"inputs\":[{\"type\":\"address\",\"name\":\"user\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"address\",\"name\":\"newAddress\",\"internalType\":\"contractIReferral\",\"indexed\":true}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SetVaultAddress\",\"inputs\":[{\"type\":\"address\",\"name\":\"user\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"address\",\"name\":\"newAddress\",\"internalType\":\"address\",\"indexed\":true}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"UpdateEmissionRate\",\"inputs\":[{\"type\":\"address\",\"name\":\"user\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"fishPerBlock\",\"internalType\":\"uint256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Withdraw\",\"inputs\":[{\"type\":\"address\",\"name\":\"user\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"pid\",\"internalType\":\"uint256\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"amount\",\"internalType\":\"uint256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint16\",\"name\":\"\",\"internalType\":\"uint16\"}],\"name\":\"MAXIMUM_REFERRAL_COMMISSION_RATE\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"add\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"_allocPoint\",\"internalType\":\"uint256\"},{\"type\":\"address\",\"name\":\"_lpToken\",\"internalType\":\"contractIERC20\"},{\"type\":\"uint16\",\"name\":\"_depositFeeBP\",\"internalType\":\"uint16\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"deposit\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"_pid\",\"internalType\":\"uint256\"},{\"type\":\"uint256\",\"name\":\"_amount\",\"internalType\":\"uint256\"},{\"type\":\"address\",\"name\":\"_referrer\",\"internalType\":\"address\"}]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"address\",\"name\":\"\",\"internalType\":\"address\"}],\"name\":\"devAddress\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"emergencyWithdraw\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"_pid\",\"internalType\":\"uint256\"}]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"address\",\"name\":\"\",\"internalType\":\"address\"}],\"name\":\"feeAddress\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"address\",\"name\":\"\",\"internalType\":\"contractFishToken\"}],\"name\":\"fish\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}],\"name\":\"fishPerBlock\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"pure\",\"outputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}],\"name\":\"getMultiplier\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"_from\",\"internalType\":\"uint256\"},{\"type\":\"uint256\",\"name\":\"_to\",\"internalType\":\"uint256\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"massUpdatePools\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"address\",\"name\":\"\",\"internalType\":\"address\"}],\"name\":\"owner\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}],\"name\":\"pendingFish\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"_pid\",\"internalType\":\"uint256\"},{\"type\":\"address\",\"name\":\"_user\",\"internalType\":\"address\"}]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"bool\",\"name\":\"\",\"internalType\":\"bool\"}],\"name\":\"poolExistence\",\"inputs\":[{\"type\":\"address\",\"name\":\"\",\"internalType\":\"contractIERC20\"}]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"address\",\"name\":\"lpToken\",\"internalType\":\"contractIERC20\"},{\"type\":\"uint256\",\"name\":\"allocPoint\",\"internalType\":\"uint256\"},{\"type\":\"uint256\",\"name\":\"lastRewardBlock\",\"internalType\":\"uint256\"},{\"type\":\"uint256\",\"name\":\"accFishPerShare\",\"internalType\":\"uint256\"},{\"type\":\"uint16\",\"name\":\"depositFeeBP\",\"internalType\":\"uint16\"}],\"name\":\"poolInfo\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}],\"name\":\"poolLength\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"address\",\"name\":\"\",\"internalType\":\"contractIReferral\"}],\"name\":\"referral\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint16\",\"name\":\"\",\"internalType\":\"uint16\"}],\"name\":\"referralCommissionRate\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"renounceOwnership\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"set\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"_pid\",\"internalType\":\"uint256\"},{\"type\":\"uint256\",\"name\":\"_allocPoint\",\"internalType\":\"uint256\"},{\"type\":\"uint16\",\"name\":\"_depositFeeBP\",\"internalType\":\"uint16\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"setDevAddress\",\"inputs\":[{\"type\":\"address\",\"name\":\"_devAddress\",\"internalType\":\"address\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"setFeeAddress\",\"inputs\":[{\"type\":\"address\",\"name\":\"_feeAddress\",\"internalType\":\"address\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"setReferralAddress\",\"inputs\":[{\"type\":\"address\",\"name\":\"_referral\",\"internalType\":\"contractIReferral\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"setReferralCommissionRate\",\"inputs\":[{\"type\":\"uint16\",\"name\":\"_referralCommissionRate\",\"internalType\":\"uint16\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"setVaultAddress\",\"inputs\":[{\"type\":\"address\",\"name\":\"_vaultAddress\",\"internalType\":\"address\"}]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}],\"name\":\"startBlock\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}],\"name\":\"totalAllocPoint\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"transferOwnership\",\"inputs\":[{\"type\":\"address\",\"name\":\"newOwner\",\"internalType\":\"address\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"updateEmissionRate\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"_fishPerBlock\",\"internalType\":\"uint256\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"updatePool\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"_pid\",\"internalType\":\"uint256\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"updateStartBlock\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"_startBlock\",\"internalType\":\"uint256\"}]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint256\",\"name\":\"amount\",\"internalType\":\"uint256\"},{\"type\":\"uint256\",\"name\":\"rewardDebt\",\"internalType\":\"uint256\"}],\"name\":\"userInfo\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"},{\"type\":\"address\",\"name\":\"\",\"internalType\":\"address\"}]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"address\",\"name\":\"\",\"internalType\":\"address\"}],\"name\":\"vaultAddress\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"withdraw\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"_pid\",\"internalType\":\"uint256\"},{\"type\":\"uint256\",\"name\":\"_amount\",\"internalType\":\"uint256\"}]}]" + +// Masterchef is an auto generated Go binding around an Ethereum contract. +type Masterchef struct { + MasterchefCaller // Read-only binding to the contract + MasterchefTransactor // Write-only binding to the contract + MasterchefFilterer // Log filterer for contract events +} + +// MasterchefCaller is an auto generated read-only Go binding around an Ethereum contract. +type MasterchefCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MasterchefTransactor is an auto generated write-only Go binding around an Ethereum contract. +type MasterchefTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MasterchefFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type MasterchefFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MasterchefSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type MasterchefSession struct { + Contract *Masterchef // 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 +} + +// MasterchefCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type MasterchefCallerSession struct { + Contract *MasterchefCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// MasterchefTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type MasterchefTransactorSession struct { + Contract *MasterchefTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MasterchefRaw is an auto generated low-level Go binding around an Ethereum contract. +type MasterchefRaw struct { + Contract *Masterchef // Generic contract binding to access the raw methods on +} + +// MasterchefCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type MasterchefCallerRaw struct { + Contract *MasterchefCaller // Generic read-only contract binding to access the raw methods on +} + +// MasterchefTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type MasterchefTransactorRaw struct { + Contract *MasterchefTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewMasterchef creates a new instance of Masterchef, bound to a specific deployed contract. +func NewMasterchef(address common.Address, backend bind.ContractBackend) (*Masterchef, error) { + contract, err := bindMasterchef(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Masterchef{MasterchefCaller: MasterchefCaller{contract: contract}, MasterchefTransactor: MasterchefTransactor{contract: contract}, MasterchefFilterer: MasterchefFilterer{contract: contract}}, nil +} + +// NewMasterchefCaller creates a new read-only instance of Masterchef, bound to a specific deployed contract. +func NewMasterchefCaller(address common.Address, caller bind.ContractCaller) (*MasterchefCaller, error) { + contract, err := bindMasterchef(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &MasterchefCaller{contract: contract}, nil +} + +// NewMasterchefTransactor creates a new write-only instance of Masterchef, bound to a specific deployed contract. +func NewMasterchefTransactor(address common.Address, transactor bind.ContractTransactor) (*MasterchefTransactor, error) { + contract, err := bindMasterchef(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &MasterchefTransactor{contract: contract}, nil +} + +// NewMasterchefFilterer creates a new log filterer instance of Masterchef, bound to a specific deployed contract. +func NewMasterchefFilterer(address common.Address, filterer bind.ContractFilterer) (*MasterchefFilterer, error) { + contract, err := bindMasterchef(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &MasterchefFilterer{contract: contract}, nil +} + +// bindMasterchef binds a generic wrapper to an already deployed contract. +func bindMasterchef(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(MasterchefABI)) + 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 (_Masterchef *MasterchefRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Masterchef.Contract.MasterchefCaller.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 (_Masterchef *MasterchefRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Masterchef.Contract.MasterchefTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Masterchef *MasterchefRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Masterchef.Contract.MasterchefTransactor.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 (_Masterchef *MasterchefCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Masterchef.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 (_Masterchef *MasterchefTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Masterchef.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Masterchef *MasterchefTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Masterchef.Contract.contract.Transact(opts, method, params...) +} + +// MAXIMUMREFERRALCOMMISSIONRATE is a free data retrieval call binding the contract method 0x48b22bfb. +// +// Solidity: function MAXIMUM_REFERRAL_COMMISSION_RATE() view returns(uint16) +func (_Masterchef *MasterchefCaller) MAXIMUMREFERRALCOMMISSIONRATE(opts *bind.CallOpts) (uint16, error) { + var out []interface{} + err := _Masterchef.contract.Call(opts, &out, "MAXIMUM_REFERRAL_COMMISSION_RATE") + + if err != nil { + return *new(uint16), err + } + + out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) + + return out0, err + +} + +// MAXIMUMREFERRALCOMMISSIONRATE is a free data retrieval call binding the contract method 0x48b22bfb. +// +// Solidity: function MAXIMUM_REFERRAL_COMMISSION_RATE() view returns(uint16) +func (_Masterchef *MasterchefSession) MAXIMUMREFERRALCOMMISSIONRATE() (uint16, error) { + return _Masterchef.Contract.MAXIMUMREFERRALCOMMISSIONRATE(&_Masterchef.CallOpts) +} + +// MAXIMUMREFERRALCOMMISSIONRATE is a free data retrieval call binding the contract method 0x48b22bfb. +// +// Solidity: function MAXIMUM_REFERRAL_COMMISSION_RATE() view returns(uint16) +func (_Masterchef *MasterchefCallerSession) MAXIMUMREFERRALCOMMISSIONRATE() (uint16, error) { + return _Masterchef.Contract.MAXIMUMREFERRALCOMMISSIONRATE(&_Masterchef.CallOpts) +} + +// DevAddress is a free data retrieval call binding the contract method 0x3ad10ef6. +// +// Solidity: function devAddress() view returns(address) +func (_Masterchef *MasterchefCaller) DevAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Masterchef.contract.Call(opts, &out, "devAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// DevAddress is a free data retrieval call binding the contract method 0x3ad10ef6. +// +// Solidity: function devAddress() view returns(address) +func (_Masterchef *MasterchefSession) DevAddress() (common.Address, error) { + return _Masterchef.Contract.DevAddress(&_Masterchef.CallOpts) +} + +// DevAddress is a free data retrieval call binding the contract method 0x3ad10ef6. +// +// Solidity: function devAddress() view returns(address) +func (_Masterchef *MasterchefCallerSession) DevAddress() (common.Address, error) { + return _Masterchef.Contract.DevAddress(&_Masterchef.CallOpts) +} + +// FeeAddress is a free data retrieval call binding the contract method 0x41275358. +// +// Solidity: function feeAddress() view returns(address) +func (_Masterchef *MasterchefCaller) FeeAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Masterchef.contract.Call(opts, &out, "feeAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// FeeAddress is a free data retrieval call binding the contract method 0x41275358. +// +// Solidity: function feeAddress() view returns(address) +func (_Masterchef *MasterchefSession) FeeAddress() (common.Address, error) { + return _Masterchef.Contract.FeeAddress(&_Masterchef.CallOpts) +} + +// FeeAddress is a free data retrieval call binding the contract method 0x41275358. +// +// Solidity: function feeAddress() view returns(address) +func (_Masterchef *MasterchefCallerSession) FeeAddress() (common.Address, error) { + return _Masterchef.Contract.FeeAddress(&_Masterchef.CallOpts) +} + +// Fish is a free data retrieval call binding the contract method 0xd14775d9. +// +// Solidity: function fish() view returns(address) +func (_Masterchef *MasterchefCaller) Fish(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Masterchef.contract.Call(opts, &out, "fish") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Fish is a free data retrieval call binding the contract method 0xd14775d9. +// +// Solidity: function fish() view returns(address) +func (_Masterchef *MasterchefSession) Fish() (common.Address, error) { + return _Masterchef.Contract.Fish(&_Masterchef.CallOpts) +} + +// Fish is a free data retrieval call binding the contract method 0xd14775d9. +// +// Solidity: function fish() view returns(address) +func (_Masterchef *MasterchefCallerSession) Fish() (common.Address, error) { + return _Masterchef.Contract.Fish(&_Masterchef.CallOpts) +} + +// FishPerBlock is a free data retrieval call binding the contract method 0x7b4dbaac. +// +// Solidity: function fishPerBlock() view returns(uint256) +func (_Masterchef *MasterchefCaller) FishPerBlock(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Masterchef.contract.Call(opts, &out, "fishPerBlock") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// FishPerBlock is a free data retrieval call binding the contract method 0x7b4dbaac. +// +// Solidity: function fishPerBlock() view returns(uint256) +func (_Masterchef *MasterchefSession) FishPerBlock() (*big.Int, error) { + return _Masterchef.Contract.FishPerBlock(&_Masterchef.CallOpts) +} + +// FishPerBlock is a free data retrieval call binding the contract method 0x7b4dbaac. +// +// Solidity: function fishPerBlock() view returns(uint256) +func (_Masterchef *MasterchefCallerSession) FishPerBlock() (*big.Int, error) { + return _Masterchef.Contract.FishPerBlock(&_Masterchef.CallOpts) +} + +// GetMultiplier is a free data retrieval call binding the contract method 0x8dbb1e3a. +// +// Solidity: function getMultiplier(uint256 _from, uint256 _to) pure returns(uint256) +func (_Masterchef *MasterchefCaller) GetMultiplier(opts *bind.CallOpts, _from *big.Int, _to *big.Int) (*big.Int, error) { + var out []interface{} + err := _Masterchef.contract.Call(opts, &out, "getMultiplier", _from, _to) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetMultiplier is a free data retrieval call binding the contract method 0x8dbb1e3a. +// +// Solidity: function getMultiplier(uint256 _from, uint256 _to) pure returns(uint256) +func (_Masterchef *MasterchefSession) GetMultiplier(_from *big.Int, _to *big.Int) (*big.Int, error) { + return _Masterchef.Contract.GetMultiplier(&_Masterchef.CallOpts, _from, _to) +} + +// GetMultiplier is a free data retrieval call binding the contract method 0x8dbb1e3a. +// +// Solidity: function getMultiplier(uint256 _from, uint256 _to) pure returns(uint256) +func (_Masterchef *MasterchefCallerSession) GetMultiplier(_from *big.Int, _to *big.Int) (*big.Int, error) { + return _Masterchef.Contract.GetMultiplier(&_Masterchef.CallOpts, _from, _to) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Masterchef *MasterchefCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Masterchef.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Masterchef *MasterchefSession) Owner() (common.Address, error) { + return _Masterchef.Contract.Owner(&_Masterchef.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Masterchef *MasterchefCallerSession) Owner() (common.Address, error) { + return _Masterchef.Contract.Owner(&_Masterchef.CallOpts) +} + +// PendingFish is a free data retrieval call binding the contract method 0xb1a8f6f1. +// +// Solidity: function pendingFish(uint256 _pid, address _user) view returns(uint256) +func (_Masterchef *MasterchefCaller) PendingFish(opts *bind.CallOpts, _pid *big.Int, _user common.Address) (*big.Int, error) { + var out []interface{} + err := _Masterchef.contract.Call(opts, &out, "pendingFish", _pid, _user) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// PendingFish is a free data retrieval call binding the contract method 0xb1a8f6f1. +// +// Solidity: function pendingFish(uint256 _pid, address _user) view returns(uint256) +func (_Masterchef *MasterchefSession) PendingFish(_pid *big.Int, _user common.Address) (*big.Int, error) { + return _Masterchef.Contract.PendingFish(&_Masterchef.CallOpts, _pid, _user) +} + +// PendingFish is a free data retrieval call binding the contract method 0xb1a8f6f1. +// +// Solidity: function pendingFish(uint256 _pid, address _user) view returns(uint256) +func (_Masterchef *MasterchefCallerSession) PendingFish(_pid *big.Int, _user common.Address) (*big.Int, error) { + return _Masterchef.Contract.PendingFish(&_Masterchef.CallOpts, _pid, _user) +} + +// PoolExistence is a free data retrieval call binding the contract method 0xcbd258b5. +// +// Solidity: function poolExistence(address ) view returns(bool) +func (_Masterchef *MasterchefCaller) PoolExistence(opts *bind.CallOpts, arg0 common.Address) (bool, error) { + var out []interface{} + err := _Masterchef.contract.Call(opts, &out, "poolExistence", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// PoolExistence is a free data retrieval call binding the contract method 0xcbd258b5. +// +// Solidity: function poolExistence(address ) view returns(bool) +func (_Masterchef *MasterchefSession) PoolExistence(arg0 common.Address) (bool, error) { + return _Masterchef.Contract.PoolExistence(&_Masterchef.CallOpts, arg0) +} + +// PoolExistence is a free data retrieval call binding the contract method 0xcbd258b5. +// +// Solidity: function poolExistence(address ) view returns(bool) +func (_Masterchef *MasterchefCallerSession) PoolExistence(arg0 common.Address) (bool, error) { + return _Masterchef.Contract.PoolExistence(&_Masterchef.CallOpts, arg0) +} + +// PoolInfo is a free data retrieval call binding the contract method 0x1526fe27. +// +// Solidity: function poolInfo(uint256 ) view returns(address lpToken, uint256 allocPoint, uint256 lastRewardBlock, uint256 accFishPerShare, uint16 depositFeeBP) +func (_Masterchef *MasterchefCaller) PoolInfo(opts *bind.CallOpts, arg0 *big.Int) (struct { + LpToken common.Address + AllocPoint *big.Int + LastRewardBlock *big.Int + AccFishPerShare *big.Int + DepositFeeBP uint16 +}, error) { + var out []interface{} + err := _Masterchef.contract.Call(opts, &out, "poolInfo", arg0) + + outstruct := new(struct { + LpToken common.Address + AllocPoint *big.Int + LastRewardBlock *big.Int + AccFishPerShare *big.Int + DepositFeeBP uint16 + }) + if err != nil { + return *outstruct, err + } + + outstruct.LpToken = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + outstruct.AllocPoint = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.LastRewardBlock = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.AccFishPerShare = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.DepositFeeBP = *abi.ConvertType(out[4], new(uint16)).(*uint16) + + return *outstruct, err + +} + +// PoolInfo is a free data retrieval call binding the contract method 0x1526fe27. +// +// Solidity: function poolInfo(uint256 ) view returns(address lpToken, uint256 allocPoint, uint256 lastRewardBlock, uint256 accFishPerShare, uint16 depositFeeBP) +func (_Masterchef *MasterchefSession) PoolInfo(arg0 *big.Int) (struct { + LpToken common.Address + AllocPoint *big.Int + LastRewardBlock *big.Int + AccFishPerShare *big.Int + DepositFeeBP uint16 +}, error) { + return _Masterchef.Contract.PoolInfo(&_Masterchef.CallOpts, arg0) +} + +// PoolInfo is a free data retrieval call binding the contract method 0x1526fe27. +// +// Solidity: function poolInfo(uint256 ) view returns(address lpToken, uint256 allocPoint, uint256 lastRewardBlock, uint256 accFishPerShare, uint16 depositFeeBP) +func (_Masterchef *MasterchefCallerSession) PoolInfo(arg0 *big.Int) (struct { + LpToken common.Address + AllocPoint *big.Int + LastRewardBlock *big.Int + AccFishPerShare *big.Int + DepositFeeBP uint16 +}, error) { + return _Masterchef.Contract.PoolInfo(&_Masterchef.CallOpts, arg0) +} + +// PoolLength is a free data retrieval call binding the contract method 0x081e3eda. +// +// Solidity: function poolLength() view returns(uint256) +func (_Masterchef *MasterchefCaller) PoolLength(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Masterchef.contract.Call(opts, &out, "poolLength") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// PoolLength is a free data retrieval call binding the contract method 0x081e3eda. +// +// Solidity: function poolLength() view returns(uint256) +func (_Masterchef *MasterchefSession) PoolLength() (*big.Int, error) { + return _Masterchef.Contract.PoolLength(&_Masterchef.CallOpts) +} + +// PoolLength is a free data retrieval call binding the contract method 0x081e3eda. +// +// Solidity: function poolLength() view returns(uint256) +func (_Masterchef *MasterchefCallerSession) PoolLength() (*big.Int, error) { + return _Masterchef.Contract.PoolLength(&_Masterchef.CallOpts) +} + +// Referral is a free data retrieval call binding the contract method 0x1441a5a9. +// +// Solidity: function referral() view returns(address) +func (_Masterchef *MasterchefCaller) Referral(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Masterchef.contract.Call(opts, &out, "referral") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Referral is a free data retrieval call binding the contract method 0x1441a5a9. +// +// Solidity: function referral() view returns(address) +func (_Masterchef *MasterchefSession) Referral() (common.Address, error) { + return _Masterchef.Contract.Referral(&_Masterchef.CallOpts) +} + +// Referral is a free data retrieval call binding the contract method 0x1441a5a9. +// +// Solidity: function referral() view returns(address) +func (_Masterchef *MasterchefCallerSession) Referral() (common.Address, error) { + return _Masterchef.Contract.Referral(&_Masterchef.CallOpts) +} + +// ReferralCommissionRate is a free data retrieval call binding the contract method 0xd30ef61b. +// +// Solidity: function referralCommissionRate() view returns(uint16) +func (_Masterchef *MasterchefCaller) ReferralCommissionRate(opts *bind.CallOpts) (uint16, error) { + var out []interface{} + err := _Masterchef.contract.Call(opts, &out, "referralCommissionRate") + + if err != nil { + return *new(uint16), err + } + + out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) + + return out0, err + +} + +// ReferralCommissionRate is a free data retrieval call binding the contract method 0xd30ef61b. +// +// Solidity: function referralCommissionRate() view returns(uint16) +func (_Masterchef *MasterchefSession) ReferralCommissionRate() (uint16, error) { + return _Masterchef.Contract.ReferralCommissionRate(&_Masterchef.CallOpts) +} + +// ReferralCommissionRate is a free data retrieval call binding the contract method 0xd30ef61b. +// +// Solidity: function referralCommissionRate() view returns(uint16) +func (_Masterchef *MasterchefCallerSession) ReferralCommissionRate() (uint16, error) { + return _Masterchef.Contract.ReferralCommissionRate(&_Masterchef.CallOpts) +} + +// StartBlock is a free data retrieval call binding the contract method 0x48cd4cb1. +// +// Solidity: function startBlock() view returns(uint256) +func (_Masterchef *MasterchefCaller) StartBlock(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Masterchef.contract.Call(opts, &out, "startBlock") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// StartBlock is a free data retrieval call binding the contract method 0x48cd4cb1. +// +// Solidity: function startBlock() view returns(uint256) +func (_Masterchef *MasterchefSession) StartBlock() (*big.Int, error) { + return _Masterchef.Contract.StartBlock(&_Masterchef.CallOpts) +} + +// StartBlock is a free data retrieval call binding the contract method 0x48cd4cb1. +// +// Solidity: function startBlock() view returns(uint256) +func (_Masterchef *MasterchefCallerSession) StartBlock() (*big.Int, error) { + return _Masterchef.Contract.StartBlock(&_Masterchef.CallOpts) +} + +// TotalAllocPoint is a free data retrieval call binding the contract method 0x17caf6f1. +// +// Solidity: function totalAllocPoint() view returns(uint256) +func (_Masterchef *MasterchefCaller) TotalAllocPoint(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Masterchef.contract.Call(opts, &out, "totalAllocPoint") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalAllocPoint is a free data retrieval call binding the contract method 0x17caf6f1. +// +// Solidity: function totalAllocPoint() view returns(uint256) +func (_Masterchef *MasterchefSession) TotalAllocPoint() (*big.Int, error) { + return _Masterchef.Contract.TotalAllocPoint(&_Masterchef.CallOpts) +} + +// TotalAllocPoint is a free data retrieval call binding the contract method 0x17caf6f1. +// +// Solidity: function totalAllocPoint() view returns(uint256) +func (_Masterchef *MasterchefCallerSession) TotalAllocPoint() (*big.Int, error) { + return _Masterchef.Contract.TotalAllocPoint(&_Masterchef.CallOpts) +} + +// UserInfo is a free data retrieval call binding the contract method 0x93f1a40b. +// +// Solidity: function userInfo(uint256 , address ) view returns(uint256 amount, uint256 rewardDebt) +func (_Masterchef *MasterchefCaller) UserInfo(opts *bind.CallOpts, arg0 *big.Int, arg1 common.Address) (struct { + Amount *big.Int + RewardDebt *big.Int +}, error) { + var out []interface{} + err := _Masterchef.contract.Call(opts, &out, "userInfo", arg0, arg1) + + outstruct := new(struct { + Amount *big.Int + RewardDebt *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.Amount = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.RewardDebt = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// UserInfo is a free data retrieval call binding the contract method 0x93f1a40b. +// +// Solidity: function userInfo(uint256 , address ) view returns(uint256 amount, uint256 rewardDebt) +func (_Masterchef *MasterchefSession) UserInfo(arg0 *big.Int, arg1 common.Address) (struct { + Amount *big.Int + RewardDebt *big.Int +}, error) { + return _Masterchef.Contract.UserInfo(&_Masterchef.CallOpts, arg0, arg1) +} + +// UserInfo is a free data retrieval call binding the contract method 0x93f1a40b. +// +// Solidity: function userInfo(uint256 , address ) view returns(uint256 amount, uint256 rewardDebt) +func (_Masterchef *MasterchefCallerSession) UserInfo(arg0 *big.Int, arg1 common.Address) (struct { + Amount *big.Int + RewardDebt *big.Int +}, error) { + return _Masterchef.Contract.UserInfo(&_Masterchef.CallOpts, arg0, arg1) +} + +// VaultAddress is a free data retrieval call binding the contract method 0x430bf08a. +// +// Solidity: function vaultAddress() view returns(address) +func (_Masterchef *MasterchefCaller) VaultAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Masterchef.contract.Call(opts, &out, "vaultAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// VaultAddress is a free data retrieval call binding the contract method 0x430bf08a. +// +// Solidity: function vaultAddress() view returns(address) +func (_Masterchef *MasterchefSession) VaultAddress() (common.Address, error) { + return _Masterchef.Contract.VaultAddress(&_Masterchef.CallOpts) +} + +// VaultAddress is a free data retrieval call binding the contract method 0x430bf08a. +// +// Solidity: function vaultAddress() view returns(address) +func (_Masterchef *MasterchefCallerSession) VaultAddress() (common.Address, error) { + return _Masterchef.Contract.VaultAddress(&_Masterchef.CallOpts) +} + +// Add is a paid mutator transaction binding the contract method 0x06539275. +// +// Solidity: function add(uint256 _allocPoint, address _lpToken, uint16 _depositFeeBP) returns() +func (_Masterchef *MasterchefTransactor) Add(opts *bind.TransactOpts, _allocPoint *big.Int, _lpToken common.Address, _depositFeeBP uint16) (*types.Transaction, error) { + return _Masterchef.contract.Transact(opts, "add", _allocPoint, _lpToken, _depositFeeBP) +} + +// Add is a paid mutator transaction binding the contract method 0x06539275. +// +// Solidity: function add(uint256 _allocPoint, address _lpToken, uint16 _depositFeeBP) returns() +func (_Masterchef *MasterchefSession) Add(_allocPoint *big.Int, _lpToken common.Address, _depositFeeBP uint16) (*types.Transaction, error) { + return _Masterchef.Contract.Add(&_Masterchef.TransactOpts, _allocPoint, _lpToken, _depositFeeBP) +} + +// Add is a paid mutator transaction binding the contract method 0x06539275. +// +// Solidity: function add(uint256 _allocPoint, address _lpToken, uint16 _depositFeeBP) returns() +func (_Masterchef *MasterchefTransactorSession) Add(_allocPoint *big.Int, _lpToken common.Address, _depositFeeBP uint16) (*types.Transaction, error) { + return _Masterchef.Contract.Add(&_Masterchef.TransactOpts, _allocPoint, _lpToken, _depositFeeBP) +} + +// Deposit is a paid mutator transaction binding the contract method 0x8dbdbe6d. +// +// Solidity: function deposit(uint256 _pid, uint256 _amount, address _referrer) returns() +func (_Masterchef *MasterchefTransactor) Deposit(opts *bind.TransactOpts, _pid *big.Int, _amount *big.Int, _referrer common.Address) (*types.Transaction, error) { + return _Masterchef.contract.Transact(opts, "deposit", _pid, _amount, _referrer) +} + +// Deposit is a paid mutator transaction binding the contract method 0x8dbdbe6d. +// +// Solidity: function deposit(uint256 _pid, uint256 _amount, address _referrer) returns() +func (_Masterchef *MasterchefSession) Deposit(_pid *big.Int, _amount *big.Int, _referrer common.Address) (*types.Transaction, error) { + return _Masterchef.Contract.Deposit(&_Masterchef.TransactOpts, _pid, _amount, _referrer) +} + +// Deposit is a paid mutator transaction binding the contract method 0x8dbdbe6d. +// +// Solidity: function deposit(uint256 _pid, uint256 _amount, address _referrer) returns() +func (_Masterchef *MasterchefTransactorSession) Deposit(_pid *big.Int, _amount *big.Int, _referrer common.Address) (*types.Transaction, error) { + return _Masterchef.Contract.Deposit(&_Masterchef.TransactOpts, _pid, _amount, _referrer) +} + +// EmergencyWithdraw is a paid mutator transaction binding the contract method 0x5312ea8e. +// +// Solidity: function emergencyWithdraw(uint256 _pid) returns() +func (_Masterchef *MasterchefTransactor) EmergencyWithdraw(opts *bind.TransactOpts, _pid *big.Int) (*types.Transaction, error) { + return _Masterchef.contract.Transact(opts, "emergencyWithdraw", _pid) +} + +// EmergencyWithdraw is a paid mutator transaction binding the contract method 0x5312ea8e. +// +// Solidity: function emergencyWithdraw(uint256 _pid) returns() +func (_Masterchef *MasterchefSession) EmergencyWithdraw(_pid *big.Int) (*types.Transaction, error) { + return _Masterchef.Contract.EmergencyWithdraw(&_Masterchef.TransactOpts, _pid) +} + +// EmergencyWithdraw is a paid mutator transaction binding the contract method 0x5312ea8e. +// +// Solidity: function emergencyWithdraw(uint256 _pid) returns() +func (_Masterchef *MasterchefTransactorSession) EmergencyWithdraw(_pid *big.Int) (*types.Transaction, error) { + return _Masterchef.Contract.EmergencyWithdraw(&_Masterchef.TransactOpts, _pid) +} + +// MassUpdatePools is a paid mutator transaction binding the contract method 0x630b5ba1. +// +// Solidity: function massUpdatePools() returns() +func (_Masterchef *MasterchefTransactor) MassUpdatePools(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Masterchef.contract.Transact(opts, "massUpdatePools") +} + +// MassUpdatePools is a paid mutator transaction binding the contract method 0x630b5ba1. +// +// Solidity: function massUpdatePools() returns() +func (_Masterchef *MasterchefSession) MassUpdatePools() (*types.Transaction, error) { + return _Masterchef.Contract.MassUpdatePools(&_Masterchef.TransactOpts) +} + +// MassUpdatePools is a paid mutator transaction binding the contract method 0x630b5ba1. +// +// Solidity: function massUpdatePools() returns() +func (_Masterchef *MasterchefTransactorSession) MassUpdatePools() (*types.Transaction, error) { + return _Masterchef.Contract.MassUpdatePools(&_Masterchef.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Masterchef *MasterchefTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Masterchef.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Masterchef *MasterchefSession) RenounceOwnership() (*types.Transaction, error) { + return _Masterchef.Contract.RenounceOwnership(&_Masterchef.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Masterchef *MasterchefTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _Masterchef.Contract.RenounceOwnership(&_Masterchef.TransactOpts) +} + +// Set is a paid mutator transaction binding the contract method 0x24bcb38c. +// +// Solidity: function set(uint256 _pid, uint256 _allocPoint, uint16 _depositFeeBP) returns() +func (_Masterchef *MasterchefTransactor) Set(opts *bind.TransactOpts, _pid *big.Int, _allocPoint *big.Int, _depositFeeBP uint16) (*types.Transaction, error) { + return _Masterchef.contract.Transact(opts, "set", _pid, _allocPoint, _depositFeeBP) +} + +// Set is a paid mutator transaction binding the contract method 0x24bcb38c. +// +// Solidity: function set(uint256 _pid, uint256 _allocPoint, uint16 _depositFeeBP) returns() +func (_Masterchef *MasterchefSession) Set(_pid *big.Int, _allocPoint *big.Int, _depositFeeBP uint16) (*types.Transaction, error) { + return _Masterchef.Contract.Set(&_Masterchef.TransactOpts, _pid, _allocPoint, _depositFeeBP) +} + +// Set is a paid mutator transaction binding the contract method 0x24bcb38c. +// +// Solidity: function set(uint256 _pid, uint256 _allocPoint, uint16 _depositFeeBP) returns() +func (_Masterchef *MasterchefTransactorSession) Set(_pid *big.Int, _allocPoint *big.Int, _depositFeeBP uint16) (*types.Transaction, error) { + return _Masterchef.Contract.Set(&_Masterchef.TransactOpts, _pid, _allocPoint, _depositFeeBP) +} + +// SetDevAddress is a paid mutator transaction binding the contract method 0xd0d41fe1. +// +// Solidity: function setDevAddress(address _devAddress) returns() +func (_Masterchef *MasterchefTransactor) SetDevAddress(opts *bind.TransactOpts, _devAddress common.Address) (*types.Transaction, error) { + return _Masterchef.contract.Transact(opts, "setDevAddress", _devAddress) +} + +// SetDevAddress is a paid mutator transaction binding the contract method 0xd0d41fe1. +// +// Solidity: function setDevAddress(address _devAddress) returns() +func (_Masterchef *MasterchefSession) SetDevAddress(_devAddress common.Address) (*types.Transaction, error) { + return _Masterchef.Contract.SetDevAddress(&_Masterchef.TransactOpts, _devAddress) +} + +// SetDevAddress is a paid mutator transaction binding the contract method 0xd0d41fe1. +// +// Solidity: function setDevAddress(address _devAddress) returns() +func (_Masterchef *MasterchefTransactorSession) SetDevAddress(_devAddress common.Address) (*types.Transaction, error) { + return _Masterchef.Contract.SetDevAddress(&_Masterchef.TransactOpts, _devAddress) +} + +// SetFeeAddress is a paid mutator transaction binding the contract method 0x8705fcd4. +// +// Solidity: function setFeeAddress(address _feeAddress) returns() +func (_Masterchef *MasterchefTransactor) SetFeeAddress(opts *bind.TransactOpts, _feeAddress common.Address) (*types.Transaction, error) { + return _Masterchef.contract.Transact(opts, "setFeeAddress", _feeAddress) +} + +// SetFeeAddress is a paid mutator transaction binding the contract method 0x8705fcd4. +// +// Solidity: function setFeeAddress(address _feeAddress) returns() +func (_Masterchef *MasterchefSession) SetFeeAddress(_feeAddress common.Address) (*types.Transaction, error) { + return _Masterchef.Contract.SetFeeAddress(&_Masterchef.TransactOpts, _feeAddress) +} + +// SetFeeAddress is a paid mutator transaction binding the contract method 0x8705fcd4. +// +// Solidity: function setFeeAddress(address _feeAddress) returns() +func (_Masterchef *MasterchefTransactorSession) SetFeeAddress(_feeAddress common.Address) (*types.Transaction, error) { + return _Masterchef.Contract.SetFeeAddress(&_Masterchef.TransactOpts, _feeAddress) +} + +// SetReferralAddress is a paid mutator transaction binding the contract method 0xb3caba5a. +// +// Solidity: function setReferralAddress(address _referral) returns() +func (_Masterchef *MasterchefTransactor) SetReferralAddress(opts *bind.TransactOpts, _referral common.Address) (*types.Transaction, error) { + return _Masterchef.contract.Transact(opts, "setReferralAddress", _referral) +} + +// SetReferralAddress is a paid mutator transaction binding the contract method 0xb3caba5a. +// +// Solidity: function setReferralAddress(address _referral) returns() +func (_Masterchef *MasterchefSession) SetReferralAddress(_referral common.Address) (*types.Transaction, error) { + return _Masterchef.Contract.SetReferralAddress(&_Masterchef.TransactOpts, _referral) +} + +// SetReferralAddress is a paid mutator transaction binding the contract method 0xb3caba5a. +// +// Solidity: function setReferralAddress(address _referral) returns() +func (_Masterchef *MasterchefTransactorSession) SetReferralAddress(_referral common.Address) (*types.Transaction, error) { + return _Masterchef.Contract.SetReferralAddress(&_Masterchef.TransactOpts, _referral) +} + +// SetReferralCommissionRate is a paid mutator transaction binding the contract method 0x55dbc826. +// +// Solidity: function setReferralCommissionRate(uint16 _referralCommissionRate) returns() +func (_Masterchef *MasterchefTransactor) SetReferralCommissionRate(opts *bind.TransactOpts, _referralCommissionRate uint16) (*types.Transaction, error) { + return _Masterchef.contract.Transact(opts, "setReferralCommissionRate", _referralCommissionRate) +} + +// SetReferralCommissionRate is a paid mutator transaction binding the contract method 0x55dbc826. +// +// Solidity: function setReferralCommissionRate(uint16 _referralCommissionRate) returns() +func (_Masterchef *MasterchefSession) SetReferralCommissionRate(_referralCommissionRate uint16) (*types.Transaction, error) { + return _Masterchef.Contract.SetReferralCommissionRate(&_Masterchef.TransactOpts, _referralCommissionRate) +} + +// SetReferralCommissionRate is a paid mutator transaction binding the contract method 0x55dbc826. +// +// Solidity: function setReferralCommissionRate(uint16 _referralCommissionRate) returns() +func (_Masterchef *MasterchefTransactorSession) SetReferralCommissionRate(_referralCommissionRate uint16) (*types.Transaction, error) { + return _Masterchef.Contract.SetReferralCommissionRate(&_Masterchef.TransactOpts, _referralCommissionRate) +} + +// SetVaultAddress is a paid mutator transaction binding the contract method 0x85535cc5. +// +// Solidity: function setVaultAddress(address _vaultAddress) returns() +func (_Masterchef *MasterchefTransactor) SetVaultAddress(opts *bind.TransactOpts, _vaultAddress common.Address) (*types.Transaction, error) { + return _Masterchef.contract.Transact(opts, "setVaultAddress", _vaultAddress) +} + +// SetVaultAddress is a paid mutator transaction binding the contract method 0x85535cc5. +// +// Solidity: function setVaultAddress(address _vaultAddress) returns() +func (_Masterchef *MasterchefSession) SetVaultAddress(_vaultAddress common.Address) (*types.Transaction, error) { + return _Masterchef.Contract.SetVaultAddress(&_Masterchef.TransactOpts, _vaultAddress) +} + +// SetVaultAddress is a paid mutator transaction binding the contract method 0x85535cc5. +// +// Solidity: function setVaultAddress(address _vaultAddress) returns() +func (_Masterchef *MasterchefTransactorSession) SetVaultAddress(_vaultAddress common.Address) (*types.Transaction, error) { + return _Masterchef.Contract.SetVaultAddress(&_Masterchef.TransactOpts, _vaultAddress) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Masterchef *MasterchefTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _Masterchef.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Masterchef *MasterchefSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Masterchef.Contract.TransferOwnership(&_Masterchef.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Masterchef *MasterchefTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Masterchef.Contract.TransferOwnership(&_Masterchef.TransactOpts, newOwner) +} + +// UpdateEmissionRate is a paid mutator transaction binding the contract method 0x0ba84cd2. +// +// Solidity: function updateEmissionRate(uint256 _fishPerBlock) returns() +func (_Masterchef *MasterchefTransactor) UpdateEmissionRate(opts *bind.TransactOpts, _fishPerBlock *big.Int) (*types.Transaction, error) { + return _Masterchef.contract.Transact(opts, "updateEmissionRate", _fishPerBlock) +} + +// UpdateEmissionRate is a paid mutator transaction binding the contract method 0x0ba84cd2. +// +// Solidity: function updateEmissionRate(uint256 _fishPerBlock) returns() +func (_Masterchef *MasterchefSession) UpdateEmissionRate(_fishPerBlock *big.Int) (*types.Transaction, error) { + return _Masterchef.Contract.UpdateEmissionRate(&_Masterchef.TransactOpts, _fishPerBlock) +} + +// UpdateEmissionRate is a paid mutator transaction binding the contract method 0x0ba84cd2. +// +// Solidity: function updateEmissionRate(uint256 _fishPerBlock) returns() +func (_Masterchef *MasterchefTransactorSession) UpdateEmissionRate(_fishPerBlock *big.Int) (*types.Transaction, error) { + return _Masterchef.Contract.UpdateEmissionRate(&_Masterchef.TransactOpts, _fishPerBlock) +} + +// UpdatePool is a paid mutator transaction binding the contract method 0x51eb05a6. +// +// Solidity: function updatePool(uint256 _pid) returns() +func (_Masterchef *MasterchefTransactor) UpdatePool(opts *bind.TransactOpts, _pid *big.Int) (*types.Transaction, error) { + return _Masterchef.contract.Transact(opts, "updatePool", _pid) +} + +// UpdatePool is a paid mutator transaction binding the contract method 0x51eb05a6. +// +// Solidity: function updatePool(uint256 _pid) returns() +func (_Masterchef *MasterchefSession) UpdatePool(_pid *big.Int) (*types.Transaction, error) { + return _Masterchef.Contract.UpdatePool(&_Masterchef.TransactOpts, _pid) +} + +// UpdatePool is a paid mutator transaction binding the contract method 0x51eb05a6. +// +// Solidity: function updatePool(uint256 _pid) returns() +func (_Masterchef *MasterchefTransactorSession) UpdatePool(_pid *big.Int) (*types.Transaction, error) { + return _Masterchef.Contract.UpdatePool(&_Masterchef.TransactOpts, _pid) +} + +// UpdateStartBlock is a paid mutator transaction binding the contract method 0xfac2b9ba. +// +// Solidity: function updateStartBlock(uint256 _startBlock) returns() +func (_Masterchef *MasterchefTransactor) UpdateStartBlock(opts *bind.TransactOpts, _startBlock *big.Int) (*types.Transaction, error) { + return _Masterchef.contract.Transact(opts, "updateStartBlock", _startBlock) +} + +// UpdateStartBlock is a paid mutator transaction binding the contract method 0xfac2b9ba. +// +// Solidity: function updateStartBlock(uint256 _startBlock) returns() +func (_Masterchef *MasterchefSession) UpdateStartBlock(_startBlock *big.Int) (*types.Transaction, error) { + return _Masterchef.Contract.UpdateStartBlock(&_Masterchef.TransactOpts, _startBlock) +} + +// UpdateStartBlock is a paid mutator transaction binding the contract method 0xfac2b9ba. +// +// Solidity: function updateStartBlock(uint256 _startBlock) returns() +func (_Masterchef *MasterchefTransactorSession) UpdateStartBlock(_startBlock *big.Int) (*types.Transaction, error) { + return _Masterchef.Contract.UpdateStartBlock(&_Masterchef.TransactOpts, _startBlock) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x441a3e70. +// +// Solidity: function withdraw(uint256 _pid, uint256 _amount) returns() +func (_Masterchef *MasterchefTransactor) Withdraw(opts *bind.TransactOpts, _pid *big.Int, _amount *big.Int) (*types.Transaction, error) { + return _Masterchef.contract.Transact(opts, "withdraw", _pid, _amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x441a3e70. +// +// Solidity: function withdraw(uint256 _pid, uint256 _amount) returns() +func (_Masterchef *MasterchefSession) Withdraw(_pid *big.Int, _amount *big.Int) (*types.Transaction, error) { + return _Masterchef.Contract.Withdraw(&_Masterchef.TransactOpts, _pid, _amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x441a3e70. +// +// Solidity: function withdraw(uint256 _pid, uint256 _amount) returns() +func (_Masterchef *MasterchefTransactorSession) Withdraw(_pid *big.Int, _amount *big.Int) (*types.Transaction, error) { + return _Masterchef.Contract.Withdraw(&_Masterchef.TransactOpts, _pid, _amount) +} + +// MasterchefDepositIterator is returned from FilterDeposit and is used to iterate over the raw logs and unpacked data for Deposit events raised by the Masterchef contract. +type MasterchefDepositIterator struct { + Event *MasterchefDeposit // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterchefDepositIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterchefDeposit) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterchefDeposit) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterchefDepositIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterchefDepositIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterchefDeposit represents a Deposit event raised by the Masterchef contract. +type MasterchefDeposit struct { + User common.Address + Pid *big.Int + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDeposit is a free log retrieval operation binding the contract event 0x90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15. +// +// Solidity: event Deposit(address indexed user, uint256 indexed pid, uint256 amount) +func (_Masterchef *MasterchefFilterer) FilterDeposit(opts *bind.FilterOpts, user []common.Address, pid []*big.Int) (*MasterchefDepositIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pidRule []interface{} + for _, pidItem := range pid { + pidRule = append(pidRule, pidItem) + } + + logs, sub, err := _Masterchef.contract.FilterLogs(opts, "Deposit", userRule, pidRule) + if err != nil { + return nil, err + } + return &MasterchefDepositIterator{contract: _Masterchef.contract, event: "Deposit", logs: logs, sub: sub}, nil +} + +// WatchDeposit is a free log subscription operation binding the contract event 0x90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15. +// +// Solidity: event Deposit(address indexed user, uint256 indexed pid, uint256 amount) +func (_Masterchef *MasterchefFilterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *MasterchefDeposit, user []common.Address, pid []*big.Int) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pidRule []interface{} + for _, pidItem := range pid { + pidRule = append(pidRule, pidItem) + } + + logs, sub, err := _Masterchef.contract.WatchLogs(opts, "Deposit", userRule, pidRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterchefDeposit) + if err := _Masterchef.contract.UnpackLog(event, "Deposit", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseDeposit is a log parse operation binding the contract event 0x90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15. +// +// Solidity: event Deposit(address indexed user, uint256 indexed pid, uint256 amount) +func (_Masterchef *MasterchefFilterer) ParseDeposit(log types.Log) (*MasterchefDeposit, error) { + event := new(MasterchefDeposit) + if err := _Masterchef.contract.UnpackLog(event, "Deposit", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterchefEmergencyWithdrawIterator is returned from FilterEmergencyWithdraw and is used to iterate over the raw logs and unpacked data for EmergencyWithdraw events raised by the Masterchef contract. +type MasterchefEmergencyWithdrawIterator struct { + Event *MasterchefEmergencyWithdraw // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterchefEmergencyWithdrawIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterchefEmergencyWithdraw) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterchefEmergencyWithdraw) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterchefEmergencyWithdrawIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterchefEmergencyWithdrawIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterchefEmergencyWithdraw represents a EmergencyWithdraw event raised by the Masterchef contract. +type MasterchefEmergencyWithdraw struct { + User common.Address + Pid *big.Int + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterEmergencyWithdraw is a free log retrieval operation binding the contract event 0xbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595. +// +// Solidity: event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount) +func (_Masterchef *MasterchefFilterer) FilterEmergencyWithdraw(opts *bind.FilterOpts, user []common.Address, pid []*big.Int) (*MasterchefEmergencyWithdrawIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pidRule []interface{} + for _, pidItem := range pid { + pidRule = append(pidRule, pidItem) + } + + logs, sub, err := _Masterchef.contract.FilterLogs(opts, "EmergencyWithdraw", userRule, pidRule) + if err != nil { + return nil, err + } + return &MasterchefEmergencyWithdrawIterator{contract: _Masterchef.contract, event: "EmergencyWithdraw", logs: logs, sub: sub}, nil +} + +// WatchEmergencyWithdraw is a free log subscription operation binding the contract event 0xbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595. +// +// Solidity: event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount) +func (_Masterchef *MasterchefFilterer) WatchEmergencyWithdraw(opts *bind.WatchOpts, sink chan<- *MasterchefEmergencyWithdraw, user []common.Address, pid []*big.Int) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pidRule []interface{} + for _, pidItem := range pid { + pidRule = append(pidRule, pidItem) + } + + logs, sub, err := _Masterchef.contract.WatchLogs(opts, "EmergencyWithdraw", userRule, pidRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterchefEmergencyWithdraw) + if err := _Masterchef.contract.UnpackLog(event, "EmergencyWithdraw", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseEmergencyWithdraw is a log parse operation binding the contract event 0xbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595. +// +// Solidity: event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount) +func (_Masterchef *MasterchefFilterer) ParseEmergencyWithdraw(log types.Log) (*MasterchefEmergencyWithdraw, error) { + event := new(MasterchefEmergencyWithdraw) + if err := _Masterchef.contract.UnpackLog(event, "EmergencyWithdraw", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterchefOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Masterchef contract. +type MasterchefOwnershipTransferredIterator struct { + Event *MasterchefOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterchefOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterchefOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterchefOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterchefOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterchefOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterchefOwnershipTransferred represents a OwnershipTransferred event raised by the Masterchef contract. +type MasterchefOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Masterchef *MasterchefFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*MasterchefOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Masterchef.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &MasterchefOwnershipTransferredIterator{contract: _Masterchef.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Masterchef *MasterchefFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *MasterchefOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Masterchef.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterchefOwnershipTransferred) + if err := _Masterchef.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Masterchef *MasterchefFilterer) ParseOwnershipTransferred(log types.Log) (*MasterchefOwnershipTransferred, error) { + event := new(MasterchefOwnershipTransferred) + if err := _Masterchef.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterchefReferralCommissionPaidIterator is returned from FilterReferralCommissionPaid and is used to iterate over the raw logs and unpacked data for ReferralCommissionPaid events raised by the Masterchef contract. +type MasterchefReferralCommissionPaidIterator struct { + Event *MasterchefReferralCommissionPaid // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterchefReferralCommissionPaidIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterchefReferralCommissionPaid) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterchefReferralCommissionPaid) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterchefReferralCommissionPaidIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterchefReferralCommissionPaidIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterchefReferralCommissionPaid represents a ReferralCommissionPaid event raised by the Masterchef contract. +type MasterchefReferralCommissionPaid struct { + User common.Address + Referrer common.Address + CommissionAmount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterReferralCommissionPaid is a free log retrieval operation binding the contract event 0x86ddab457291316e0f5496737e5ca67c4037234c32c3be04c48ae96186893a7b. +// +// Solidity: event ReferralCommissionPaid(address indexed user, address indexed referrer, uint256 commissionAmount) +func (_Masterchef *MasterchefFilterer) FilterReferralCommissionPaid(opts *bind.FilterOpts, user []common.Address, referrer []common.Address) (*MasterchefReferralCommissionPaidIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var referrerRule []interface{} + for _, referrerItem := range referrer { + referrerRule = append(referrerRule, referrerItem) + } + + logs, sub, err := _Masterchef.contract.FilterLogs(opts, "ReferralCommissionPaid", userRule, referrerRule) + if err != nil { + return nil, err + } + return &MasterchefReferralCommissionPaidIterator{contract: _Masterchef.contract, event: "ReferralCommissionPaid", logs: logs, sub: sub}, nil +} + +// WatchReferralCommissionPaid is a free log subscription operation binding the contract event 0x86ddab457291316e0f5496737e5ca67c4037234c32c3be04c48ae96186893a7b. +// +// Solidity: event ReferralCommissionPaid(address indexed user, address indexed referrer, uint256 commissionAmount) +func (_Masterchef *MasterchefFilterer) WatchReferralCommissionPaid(opts *bind.WatchOpts, sink chan<- *MasterchefReferralCommissionPaid, user []common.Address, referrer []common.Address) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var referrerRule []interface{} + for _, referrerItem := range referrer { + referrerRule = append(referrerRule, referrerItem) + } + + logs, sub, err := _Masterchef.contract.WatchLogs(opts, "ReferralCommissionPaid", userRule, referrerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterchefReferralCommissionPaid) + if err := _Masterchef.contract.UnpackLog(event, "ReferralCommissionPaid", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseReferralCommissionPaid is a log parse operation binding the contract event 0x86ddab457291316e0f5496737e5ca67c4037234c32c3be04c48ae96186893a7b. +// +// Solidity: event ReferralCommissionPaid(address indexed user, address indexed referrer, uint256 commissionAmount) +func (_Masterchef *MasterchefFilterer) ParseReferralCommissionPaid(log types.Log) (*MasterchefReferralCommissionPaid, error) { + event := new(MasterchefReferralCommissionPaid) + if err := _Masterchef.contract.UnpackLog(event, "ReferralCommissionPaid", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterchefSetDevAddressIterator is returned from FilterSetDevAddress and is used to iterate over the raw logs and unpacked data for SetDevAddress events raised by the Masterchef contract. +type MasterchefSetDevAddressIterator struct { + Event *MasterchefSetDevAddress // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterchefSetDevAddressIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterchefSetDevAddress) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterchefSetDevAddress) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterchefSetDevAddressIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterchefSetDevAddressIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterchefSetDevAddress represents a SetDevAddress event raised by the Masterchef contract. +type MasterchefSetDevAddress struct { + User common.Address + NewAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetDevAddress is a free log retrieval operation binding the contract event 0x618c54559e94f1499a808aad71ee8729f8e74e8c48e979616328ce493a1a52e7. +// +// Solidity: event SetDevAddress(address indexed user, address indexed newAddress) +func (_Masterchef *MasterchefFilterer) FilterSetDevAddress(opts *bind.FilterOpts, user []common.Address, newAddress []common.Address) (*MasterchefSetDevAddressIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var newAddressRule []interface{} + for _, newAddressItem := range newAddress { + newAddressRule = append(newAddressRule, newAddressItem) + } + + logs, sub, err := _Masterchef.contract.FilterLogs(opts, "SetDevAddress", userRule, newAddressRule) + if err != nil { + return nil, err + } + return &MasterchefSetDevAddressIterator{contract: _Masterchef.contract, event: "SetDevAddress", logs: logs, sub: sub}, nil +} + +// WatchSetDevAddress is a free log subscription operation binding the contract event 0x618c54559e94f1499a808aad71ee8729f8e74e8c48e979616328ce493a1a52e7. +// +// Solidity: event SetDevAddress(address indexed user, address indexed newAddress) +func (_Masterchef *MasterchefFilterer) WatchSetDevAddress(opts *bind.WatchOpts, sink chan<- *MasterchefSetDevAddress, user []common.Address, newAddress []common.Address) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var newAddressRule []interface{} + for _, newAddressItem := range newAddress { + newAddressRule = append(newAddressRule, newAddressItem) + } + + logs, sub, err := _Masterchef.contract.WatchLogs(opts, "SetDevAddress", userRule, newAddressRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterchefSetDevAddress) + if err := _Masterchef.contract.UnpackLog(event, "SetDevAddress", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSetDevAddress is a log parse operation binding the contract event 0x618c54559e94f1499a808aad71ee8729f8e74e8c48e979616328ce493a1a52e7. +// +// Solidity: event SetDevAddress(address indexed user, address indexed newAddress) +func (_Masterchef *MasterchefFilterer) ParseSetDevAddress(log types.Log) (*MasterchefSetDevAddress, error) { + event := new(MasterchefSetDevAddress) + if err := _Masterchef.contract.UnpackLog(event, "SetDevAddress", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterchefSetFeeAddressIterator is returned from FilterSetFeeAddress and is used to iterate over the raw logs and unpacked data for SetFeeAddress events raised by the Masterchef contract. +type MasterchefSetFeeAddressIterator struct { + Event *MasterchefSetFeeAddress // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterchefSetFeeAddressIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterchefSetFeeAddress) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterchefSetFeeAddress) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterchefSetFeeAddressIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterchefSetFeeAddressIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterchefSetFeeAddress represents a SetFeeAddress event raised by the Masterchef contract. +type MasterchefSetFeeAddress struct { + User common.Address + NewAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetFeeAddress is a free log retrieval operation binding the contract event 0xd44190acf9d04bdb5d3a1aafff7e6dee8b40b93dfb8c5d3f0eea4b9f4539c3f7. +// +// Solidity: event SetFeeAddress(address indexed user, address indexed newAddress) +func (_Masterchef *MasterchefFilterer) FilterSetFeeAddress(opts *bind.FilterOpts, user []common.Address, newAddress []common.Address) (*MasterchefSetFeeAddressIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var newAddressRule []interface{} + for _, newAddressItem := range newAddress { + newAddressRule = append(newAddressRule, newAddressItem) + } + + logs, sub, err := _Masterchef.contract.FilterLogs(opts, "SetFeeAddress", userRule, newAddressRule) + if err != nil { + return nil, err + } + return &MasterchefSetFeeAddressIterator{contract: _Masterchef.contract, event: "SetFeeAddress", logs: logs, sub: sub}, nil +} + +// WatchSetFeeAddress is a free log subscription operation binding the contract event 0xd44190acf9d04bdb5d3a1aafff7e6dee8b40b93dfb8c5d3f0eea4b9f4539c3f7. +// +// Solidity: event SetFeeAddress(address indexed user, address indexed newAddress) +func (_Masterchef *MasterchefFilterer) WatchSetFeeAddress(opts *bind.WatchOpts, sink chan<- *MasterchefSetFeeAddress, user []common.Address, newAddress []common.Address) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var newAddressRule []interface{} + for _, newAddressItem := range newAddress { + newAddressRule = append(newAddressRule, newAddressItem) + } + + logs, sub, err := _Masterchef.contract.WatchLogs(opts, "SetFeeAddress", userRule, newAddressRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterchefSetFeeAddress) + if err := _Masterchef.contract.UnpackLog(event, "SetFeeAddress", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSetFeeAddress is a log parse operation binding the contract event 0xd44190acf9d04bdb5d3a1aafff7e6dee8b40b93dfb8c5d3f0eea4b9f4539c3f7. +// +// Solidity: event SetFeeAddress(address indexed user, address indexed newAddress) +func (_Masterchef *MasterchefFilterer) ParseSetFeeAddress(log types.Log) (*MasterchefSetFeeAddress, error) { + event := new(MasterchefSetFeeAddress) + if err := _Masterchef.contract.UnpackLog(event, "SetFeeAddress", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterchefSetReferralAddressIterator is returned from FilterSetReferralAddress and is used to iterate over the raw logs and unpacked data for SetReferralAddress events raised by the Masterchef contract. +type MasterchefSetReferralAddressIterator struct { + Event *MasterchefSetReferralAddress // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterchefSetReferralAddressIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterchefSetReferralAddress) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterchefSetReferralAddress) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterchefSetReferralAddressIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterchefSetReferralAddressIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterchefSetReferralAddress represents a SetReferralAddress event raised by the Masterchef contract. +type MasterchefSetReferralAddress struct { + User common.Address + NewAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetReferralAddress is a free log retrieval operation binding the contract event 0xee63201fedda9e28e92efef9abb99bd9d2f90208a4fd0d0186c14daf364a2731. +// +// Solidity: event SetReferralAddress(address indexed user, address indexed newAddress) +func (_Masterchef *MasterchefFilterer) FilterSetReferralAddress(opts *bind.FilterOpts, user []common.Address, newAddress []common.Address) (*MasterchefSetReferralAddressIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var newAddressRule []interface{} + for _, newAddressItem := range newAddress { + newAddressRule = append(newAddressRule, newAddressItem) + } + + logs, sub, err := _Masterchef.contract.FilterLogs(opts, "SetReferralAddress", userRule, newAddressRule) + if err != nil { + return nil, err + } + return &MasterchefSetReferralAddressIterator{contract: _Masterchef.contract, event: "SetReferralAddress", logs: logs, sub: sub}, nil +} + +// WatchSetReferralAddress is a free log subscription operation binding the contract event 0xee63201fedda9e28e92efef9abb99bd9d2f90208a4fd0d0186c14daf364a2731. +// +// Solidity: event SetReferralAddress(address indexed user, address indexed newAddress) +func (_Masterchef *MasterchefFilterer) WatchSetReferralAddress(opts *bind.WatchOpts, sink chan<- *MasterchefSetReferralAddress, user []common.Address, newAddress []common.Address) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var newAddressRule []interface{} + for _, newAddressItem := range newAddress { + newAddressRule = append(newAddressRule, newAddressItem) + } + + logs, sub, err := _Masterchef.contract.WatchLogs(opts, "SetReferralAddress", userRule, newAddressRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterchefSetReferralAddress) + if err := _Masterchef.contract.UnpackLog(event, "SetReferralAddress", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSetReferralAddress is a log parse operation binding the contract event 0xee63201fedda9e28e92efef9abb99bd9d2f90208a4fd0d0186c14daf364a2731. +// +// Solidity: event SetReferralAddress(address indexed user, address indexed newAddress) +func (_Masterchef *MasterchefFilterer) ParseSetReferralAddress(log types.Log) (*MasterchefSetReferralAddress, error) { + event := new(MasterchefSetReferralAddress) + if err := _Masterchef.contract.UnpackLog(event, "SetReferralAddress", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterchefSetVaultAddressIterator is returned from FilterSetVaultAddress and is used to iterate over the raw logs and unpacked data for SetVaultAddress events raised by the Masterchef contract. +type MasterchefSetVaultAddressIterator struct { + Event *MasterchefSetVaultAddress // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterchefSetVaultAddressIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterchefSetVaultAddress) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterchefSetVaultAddress) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterchefSetVaultAddressIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterchefSetVaultAddressIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterchefSetVaultAddress represents a SetVaultAddress event raised by the Masterchef contract. +type MasterchefSetVaultAddress struct { + User common.Address + NewAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetVaultAddress is a free log retrieval operation binding the contract event 0xdfb3295f3e9d9cedf80122570b2468d2322b3443cacb59aa0e204dead9b3c627. +// +// Solidity: event SetVaultAddress(address indexed user, address indexed newAddress) +func (_Masterchef *MasterchefFilterer) FilterSetVaultAddress(opts *bind.FilterOpts, user []common.Address, newAddress []common.Address) (*MasterchefSetVaultAddressIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var newAddressRule []interface{} + for _, newAddressItem := range newAddress { + newAddressRule = append(newAddressRule, newAddressItem) + } + + logs, sub, err := _Masterchef.contract.FilterLogs(opts, "SetVaultAddress", userRule, newAddressRule) + if err != nil { + return nil, err + } + return &MasterchefSetVaultAddressIterator{contract: _Masterchef.contract, event: "SetVaultAddress", logs: logs, sub: sub}, nil +} + +// WatchSetVaultAddress is a free log subscription operation binding the contract event 0xdfb3295f3e9d9cedf80122570b2468d2322b3443cacb59aa0e204dead9b3c627. +// +// Solidity: event SetVaultAddress(address indexed user, address indexed newAddress) +func (_Masterchef *MasterchefFilterer) WatchSetVaultAddress(opts *bind.WatchOpts, sink chan<- *MasterchefSetVaultAddress, user []common.Address, newAddress []common.Address) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var newAddressRule []interface{} + for _, newAddressItem := range newAddress { + newAddressRule = append(newAddressRule, newAddressItem) + } + + logs, sub, err := _Masterchef.contract.WatchLogs(opts, "SetVaultAddress", userRule, newAddressRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterchefSetVaultAddress) + if err := _Masterchef.contract.UnpackLog(event, "SetVaultAddress", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSetVaultAddress is a log parse operation binding the contract event 0xdfb3295f3e9d9cedf80122570b2468d2322b3443cacb59aa0e204dead9b3c627. +// +// Solidity: event SetVaultAddress(address indexed user, address indexed newAddress) +func (_Masterchef *MasterchefFilterer) ParseSetVaultAddress(log types.Log) (*MasterchefSetVaultAddress, error) { + event := new(MasterchefSetVaultAddress) + if err := _Masterchef.contract.UnpackLog(event, "SetVaultAddress", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterchefUpdateEmissionRateIterator is returned from FilterUpdateEmissionRate and is used to iterate over the raw logs and unpacked data for UpdateEmissionRate events raised by the Masterchef contract. +type MasterchefUpdateEmissionRateIterator struct { + Event *MasterchefUpdateEmissionRate // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterchefUpdateEmissionRateIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterchefUpdateEmissionRate) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterchefUpdateEmissionRate) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterchefUpdateEmissionRateIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterchefUpdateEmissionRateIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterchefUpdateEmissionRate represents a UpdateEmissionRate event raised by the Masterchef contract. +type MasterchefUpdateEmissionRate struct { + User common.Address + FishPerBlock *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpdateEmissionRate is a free log retrieval operation binding the contract event 0xe2492e003bbe8afa53088b406f0c1cb5d9e280370fc72a74cf116ffd343c4053. +// +// Solidity: event UpdateEmissionRate(address indexed user, uint256 fishPerBlock) +func (_Masterchef *MasterchefFilterer) FilterUpdateEmissionRate(opts *bind.FilterOpts, user []common.Address) (*MasterchefUpdateEmissionRateIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + + logs, sub, err := _Masterchef.contract.FilterLogs(opts, "UpdateEmissionRate", userRule) + if err != nil { + return nil, err + } + return &MasterchefUpdateEmissionRateIterator{contract: _Masterchef.contract, event: "UpdateEmissionRate", logs: logs, sub: sub}, nil +} + +// WatchUpdateEmissionRate is a free log subscription operation binding the contract event 0xe2492e003bbe8afa53088b406f0c1cb5d9e280370fc72a74cf116ffd343c4053. +// +// Solidity: event UpdateEmissionRate(address indexed user, uint256 fishPerBlock) +func (_Masterchef *MasterchefFilterer) WatchUpdateEmissionRate(opts *bind.WatchOpts, sink chan<- *MasterchefUpdateEmissionRate, user []common.Address) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + + logs, sub, err := _Masterchef.contract.WatchLogs(opts, "UpdateEmissionRate", userRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterchefUpdateEmissionRate) + if err := _Masterchef.contract.UnpackLog(event, "UpdateEmissionRate", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUpdateEmissionRate is a log parse operation binding the contract event 0xe2492e003bbe8afa53088b406f0c1cb5d9e280370fc72a74cf116ffd343c4053. +// +// Solidity: event UpdateEmissionRate(address indexed user, uint256 fishPerBlock) +func (_Masterchef *MasterchefFilterer) ParseUpdateEmissionRate(log types.Log) (*MasterchefUpdateEmissionRate, error) { + event := new(MasterchefUpdateEmissionRate) + if err := _Masterchef.contract.UnpackLog(event, "UpdateEmissionRate", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterchefWithdrawIterator is returned from FilterWithdraw and is used to iterate over the raw logs and unpacked data for Withdraw events raised by the Masterchef contract. +type MasterchefWithdrawIterator struct { + Event *MasterchefWithdraw // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterchefWithdrawIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterchefWithdraw) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterchefWithdraw) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterchefWithdrawIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterchefWithdrawIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterchefWithdraw represents a Withdraw event raised by the Masterchef contract. +type MasterchefWithdraw struct { + User common.Address + Pid *big.Int + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdraw is a free log retrieval operation binding the contract event 0xf279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568. +// +// Solidity: event Withdraw(address indexed user, uint256 indexed pid, uint256 amount) +func (_Masterchef *MasterchefFilterer) FilterWithdraw(opts *bind.FilterOpts, user []common.Address, pid []*big.Int) (*MasterchefWithdrawIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pidRule []interface{} + for _, pidItem := range pid { + pidRule = append(pidRule, pidItem) + } + + logs, sub, err := _Masterchef.contract.FilterLogs(opts, "Withdraw", userRule, pidRule) + if err != nil { + return nil, err + } + return &MasterchefWithdrawIterator{contract: _Masterchef.contract, event: "Withdraw", logs: logs, sub: sub}, nil +} + +// WatchWithdraw is a free log subscription operation binding the contract event 0xf279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568. +// +// Solidity: event Withdraw(address indexed user, uint256 indexed pid, uint256 amount) +func (_Masterchef *MasterchefFilterer) WatchWithdraw(opts *bind.WatchOpts, sink chan<- *MasterchefWithdraw, user []common.Address, pid []*big.Int) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pidRule []interface{} + for _, pidItem := range pid { + pidRule = append(pidRule, pidItem) + } + + logs, sub, err := _Masterchef.contract.WatchLogs(opts, "Withdraw", userRule, pidRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterchefWithdraw) + if err := _Masterchef.contract.UnpackLog(event, "Withdraw", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseWithdraw is a log parse operation binding the contract event 0xf279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568. +// +// Solidity: event Withdraw(address indexed user, uint256 indexed pid, uint256 amount) +func (_Masterchef *MasterchefFilterer) ParseWithdraw(log types.Log) (*MasterchefWithdraw, error) { + event := new(MasterchefWithdraw) + if err := _Masterchef.contract.UnpackLog(event, "Withdraw", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/polycat/contracts/masterchefv2.abi b/polycat/contracts/masterchefv2.abi new file mode 100644 index 0000000..e415fad --- /dev/null +++ b/polycat/contracts/masterchefv2.abi @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"contract PawToken","name":"_paw","type":"address"},{"internalType":"uint256","name":"_startBlock","type":"uint256"},{"internalType":"contract IRewardLocker","name":"_rewardLocker","type":"address"},{"internalType":"address","name":"_devAddress","type":"address"},{"internalType":"address","name":"_pawTransferOwner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"},{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"bool","name":"massUpdatePools","type":"bool"}],"name":"Add","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"harvest","type":"bool"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Harvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"HarvestAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"_pids","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"HarvestMultiple","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"}],"name":"Set","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"SetDevAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"pawTransferOwner","type":"address"}],"name":"SetPawTransferOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"TransferPawOwnership","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"pawPerBlock","type":"uint256"}],"name":"UpdateEmissionRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"harvest","type":"bool"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"MAX_ALLOC_POINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_EMISSION_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"bool","name":"_massUpdatePools","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_shouldHarvest","type":"bool"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvestAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_pids","type":"uint256[]"}],"name":"harvestMultiple","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paw","outputs":[{"internalType":"contract PawToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pawPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pawTransferOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingPaw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"name":"poolExistence","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"totalDeposited","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accPawPerShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardLocker","outputs":[{"internalType":"contract IRewardLocker","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_devAddress","type":"address"}],"name":"setDevAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pawTransferOwner","type":"address"}],"name":"setPawTransferOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferPawOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pawPerBlock","type":"uint256"}],"name":"updateEmissionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"lastPawPerShare","type":"uint256"},{"internalType":"uint256","name":"unclaimed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_shouldHarvest","type":"bool"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/polycat/contracts/masterchefv2.go b/polycat/contracts/masterchefv2.go new file mode 100644 index 0000000..67e1b43 --- /dev/null +++ b/polycat/contracts/masterchefv2.go @@ -0,0 +1,3021 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contracts + +import ( + "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 ( + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// MasterChefv2ABI is the input ABI used to generate the binding from. +const MasterChefv2ABI = "[{\"inputs\":[{\"internalType\":\"contractPawToken\",\"name\":\"_paw\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_startBlock\",\"type\":\"uint256\"},{\"internalType\":\"contractIRewardLocker\",\"name\":\"_rewardLocker\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_devAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_pawTransferOwner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"allocPoint\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"massUpdatePools\",\"type\":\"bool\"}],\"name\":\"Add\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"harvest\",\"type\":\"bool\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"EmergencyWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Harvest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"HarvestAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_pids\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"HarvestMultiple\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"allocPoint\",\"type\":\"uint256\"}],\"name\":\"Set\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"SetDevAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pawTransferOwner\",\"type\":\"address\"}],\"name\":\"SetPawTransferOwner\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"TransferPawOwnership\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"pawPerBlock\",\"type\":\"uint256\"}],\"name\":\"UpdateEmissionRate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"harvest\",\"type\":\"bool\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_ALLOC_POINT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_EMISSION_RATE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_allocPoint\",\"type\":\"uint256\"},{\"internalType\":\"contractIERC20\",\"name\":\"_lpToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_massUpdatePools\",\"type\":\"bool\"}],\"name\":\"add\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_shouldHarvest\",\"type\":\"bool\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"}],\"name\":\"emergencyWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_from\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_to\",\"type\":\"uint256\"}],\"name\":\"getMultiplier\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"}],\"name\":\"harvest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"harvestAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_pids\",\"type\":\"uint256[]\"}],\"name\":\"harvestMultiple\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"massUpdatePools\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paw\",\"outputs\":[{\"internalType\":\"contractPawToken\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pawPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pawTransferOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"pendingPaw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"poolExistence\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"poolInfo\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"lpToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allocPoint\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalDeposited\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastRewardBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"accPawPerShare\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"poolLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardLocker\",\"outputs\":[{\"internalType\":\"contractIRewardLocker\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_allocPoint\",\"type\":\"uint256\"}],\"name\":\"set\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devAddress\",\"type\":\"address\"}],\"name\":\"setDevAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_pawTransferOwner\",\"type\":\"address\"}],\"name\":\"setPawTransferOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalAllocPoint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferPawOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pawPerBlock\",\"type\":\"uint256\"}],\"name\":\"updateEmissionRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"}],\"name\":\"updatePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastPawPerShare\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unclaimed\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_shouldHarvest\",\"type\":\"bool\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + +// MasterChefv2 is an auto generated Go binding around an Ethereum contract. +type MasterChefv2 struct { + MasterChefv2Caller // Read-only binding to the contract + MasterChefv2Transactor // Write-only binding to the contract + MasterChefv2Filterer // Log filterer for contract events +} + +// MasterChefv2Caller is an auto generated read-only Go binding around an Ethereum contract. +type MasterChefv2Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MasterChefv2Transactor is an auto generated write-only Go binding around an Ethereum contract. +type MasterChefv2Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MasterChefv2Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type MasterChefv2Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MasterChefv2Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type MasterChefv2Session struct { + Contract *MasterChefv2 // 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 +} + +// MasterChefv2CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type MasterChefv2CallerSession struct { + Contract *MasterChefv2Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// MasterChefv2TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type MasterChefv2TransactorSession struct { + Contract *MasterChefv2Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MasterChefv2Raw is an auto generated low-level Go binding around an Ethereum contract. +type MasterChefv2Raw struct { + Contract *MasterChefv2 // Generic contract binding to access the raw methods on +} + +// MasterChefv2CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type MasterChefv2CallerRaw struct { + Contract *MasterChefv2Caller // Generic read-only contract binding to access the raw methods on +} + +// MasterChefv2TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type MasterChefv2TransactorRaw struct { + Contract *MasterChefv2Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewMasterChefv2 creates a new instance of MasterChefv2, bound to a specific deployed contract. +func NewMasterChefv2(address common.Address, backend bind.ContractBackend) (*MasterChefv2, error) { + contract, err := bindMasterChefv2(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &MasterChefv2{MasterChefv2Caller: MasterChefv2Caller{contract: contract}, MasterChefv2Transactor: MasterChefv2Transactor{contract: contract}, MasterChefv2Filterer: MasterChefv2Filterer{contract: contract}}, nil +} + +// NewMasterChefv2Caller creates a new read-only instance of MasterChefv2, bound to a specific deployed contract. +func NewMasterChefv2Caller(address common.Address, caller bind.ContractCaller) (*MasterChefv2Caller, error) { + contract, err := bindMasterChefv2(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &MasterChefv2Caller{contract: contract}, nil +} + +// NewMasterChefv2Transactor creates a new write-only instance of MasterChefv2, bound to a specific deployed contract. +func NewMasterChefv2Transactor(address common.Address, transactor bind.ContractTransactor) (*MasterChefv2Transactor, error) { + contract, err := bindMasterChefv2(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &MasterChefv2Transactor{contract: contract}, nil +} + +// NewMasterChefv2Filterer creates a new log filterer instance of MasterChefv2, bound to a specific deployed contract. +func NewMasterChefv2Filterer(address common.Address, filterer bind.ContractFilterer) (*MasterChefv2Filterer, error) { + contract, err := bindMasterChefv2(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &MasterChefv2Filterer{contract: contract}, nil +} + +// bindMasterChefv2 binds a generic wrapper to an already deployed contract. +func bindMasterChefv2(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(MasterChefv2ABI)) + 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 (_MasterChefv2 *MasterChefv2Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MasterChefv2.Contract.MasterChefv2Caller.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 (_MasterChefv2 *MasterChefv2Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MasterChefv2.Contract.MasterChefv2Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MasterChefv2 *MasterChefv2Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MasterChefv2.Contract.MasterChefv2Transactor.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 (_MasterChefv2 *MasterChefv2CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MasterChefv2.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 (_MasterChefv2 *MasterChefv2TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MasterChefv2.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MasterChefv2 *MasterChefv2TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MasterChefv2.Contract.contract.Transact(opts, method, params...) +} + +// MAXALLOCPOINT is a free data retrieval call binding the contract method 0xf958d1f9. +// +// Solidity: function MAX_ALLOC_POINT() view returns(uint256) +func (_MasterChefv2 *MasterChefv2Caller) MAXALLOCPOINT(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MasterChefv2.contract.Call(opts, &out, "MAX_ALLOC_POINT") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MAXALLOCPOINT is a free data retrieval call binding the contract method 0xf958d1f9. +// +// Solidity: function MAX_ALLOC_POINT() view returns(uint256) +func (_MasterChefv2 *MasterChefv2Session) MAXALLOCPOINT() (*big.Int, error) { + return _MasterChefv2.Contract.MAXALLOCPOINT(&_MasterChefv2.CallOpts) +} + +// MAXALLOCPOINT is a free data retrieval call binding the contract method 0xf958d1f9. +// +// Solidity: function MAX_ALLOC_POINT() view returns(uint256) +func (_MasterChefv2 *MasterChefv2CallerSession) MAXALLOCPOINT() (*big.Int, error) { + return _MasterChefv2.Contract.MAXALLOCPOINT(&_MasterChefv2.CallOpts) +} + +// MAXEMISSIONRATE is a free data retrieval call binding the contract method 0x436cc3d6. +// +// Solidity: function MAX_EMISSION_RATE() view returns(uint256) +func (_MasterChefv2 *MasterChefv2Caller) MAXEMISSIONRATE(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MasterChefv2.contract.Call(opts, &out, "MAX_EMISSION_RATE") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MAXEMISSIONRATE is a free data retrieval call binding the contract method 0x436cc3d6. +// +// Solidity: function MAX_EMISSION_RATE() view returns(uint256) +func (_MasterChefv2 *MasterChefv2Session) MAXEMISSIONRATE() (*big.Int, error) { + return _MasterChefv2.Contract.MAXEMISSIONRATE(&_MasterChefv2.CallOpts) +} + +// MAXEMISSIONRATE is a free data retrieval call binding the contract method 0x436cc3d6. +// +// Solidity: function MAX_EMISSION_RATE() view returns(uint256) +func (_MasterChefv2 *MasterChefv2CallerSession) MAXEMISSIONRATE() (*big.Int, error) { + return _MasterChefv2.Contract.MAXEMISSIONRATE(&_MasterChefv2.CallOpts) +} + +// DevAddress is a free data retrieval call binding the contract method 0x3ad10ef6. +// +// Solidity: function devAddress() view returns(address) +func (_MasterChefv2 *MasterChefv2Caller) DevAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MasterChefv2.contract.Call(opts, &out, "devAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// DevAddress is a free data retrieval call binding the contract method 0x3ad10ef6. +// +// Solidity: function devAddress() view returns(address) +func (_MasterChefv2 *MasterChefv2Session) DevAddress() (common.Address, error) { + return _MasterChefv2.Contract.DevAddress(&_MasterChefv2.CallOpts) +} + +// DevAddress is a free data retrieval call binding the contract method 0x3ad10ef6. +// +// Solidity: function devAddress() view returns(address) +func (_MasterChefv2 *MasterChefv2CallerSession) DevAddress() (common.Address, error) { + return _MasterChefv2.Contract.DevAddress(&_MasterChefv2.CallOpts) +} + +// GetMultiplier is a free data retrieval call binding the contract method 0x8dbb1e3a. +// +// Solidity: function getMultiplier(uint256 _from, uint256 _to) pure returns(uint256) +func (_MasterChefv2 *MasterChefv2Caller) GetMultiplier(opts *bind.CallOpts, _from *big.Int, _to *big.Int) (*big.Int, error) { + var out []interface{} + err := _MasterChefv2.contract.Call(opts, &out, "getMultiplier", _from, _to) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetMultiplier is a free data retrieval call binding the contract method 0x8dbb1e3a. +// +// Solidity: function getMultiplier(uint256 _from, uint256 _to) pure returns(uint256) +func (_MasterChefv2 *MasterChefv2Session) GetMultiplier(_from *big.Int, _to *big.Int) (*big.Int, error) { + return _MasterChefv2.Contract.GetMultiplier(&_MasterChefv2.CallOpts, _from, _to) +} + +// GetMultiplier is a free data retrieval call binding the contract method 0x8dbb1e3a. +// +// Solidity: function getMultiplier(uint256 _from, uint256 _to) pure returns(uint256) +func (_MasterChefv2 *MasterChefv2CallerSession) GetMultiplier(_from *big.Int, _to *big.Int) (*big.Int, error) { + return _MasterChefv2.Contract.GetMultiplier(&_MasterChefv2.CallOpts, _from, _to) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MasterChefv2 *MasterChefv2Caller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MasterChefv2.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MasterChefv2 *MasterChefv2Session) Owner() (common.Address, error) { + return _MasterChefv2.Contract.Owner(&_MasterChefv2.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MasterChefv2 *MasterChefv2CallerSession) Owner() (common.Address, error) { + return _MasterChefv2.Contract.Owner(&_MasterChefv2.CallOpts) +} + +// Paw is a free data retrieval call binding the contract method 0xc0eb3d70. +// +// Solidity: function paw() view returns(address) +func (_MasterChefv2 *MasterChefv2Caller) Paw(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MasterChefv2.contract.Call(opts, &out, "paw") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Paw is a free data retrieval call binding the contract method 0xc0eb3d70. +// +// Solidity: function paw() view returns(address) +func (_MasterChefv2 *MasterChefv2Session) Paw() (common.Address, error) { + return _MasterChefv2.Contract.Paw(&_MasterChefv2.CallOpts) +} + +// Paw is a free data retrieval call binding the contract method 0xc0eb3d70. +// +// Solidity: function paw() view returns(address) +func (_MasterChefv2 *MasterChefv2CallerSession) Paw() (common.Address, error) { + return _MasterChefv2.Contract.Paw(&_MasterChefv2.CallOpts) +} + +// PawPerBlock is a free data retrieval call binding the contract method 0xdb8f4094. +// +// Solidity: function pawPerBlock() view returns(uint256) +func (_MasterChefv2 *MasterChefv2Caller) PawPerBlock(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MasterChefv2.contract.Call(opts, &out, "pawPerBlock") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// PawPerBlock is a free data retrieval call binding the contract method 0xdb8f4094. +// +// Solidity: function pawPerBlock() view returns(uint256) +func (_MasterChefv2 *MasterChefv2Session) PawPerBlock() (*big.Int, error) { + return _MasterChefv2.Contract.PawPerBlock(&_MasterChefv2.CallOpts) +} + +// PawPerBlock is a free data retrieval call binding the contract method 0xdb8f4094. +// +// Solidity: function pawPerBlock() view returns(uint256) +func (_MasterChefv2 *MasterChefv2CallerSession) PawPerBlock() (*big.Int, error) { + return _MasterChefv2.Contract.PawPerBlock(&_MasterChefv2.CallOpts) +} + +// PawTransferOwner is a free data retrieval call binding the contract method 0xf1a5affe. +// +// Solidity: function pawTransferOwner() view returns(address) +func (_MasterChefv2 *MasterChefv2Caller) PawTransferOwner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MasterChefv2.contract.Call(opts, &out, "pawTransferOwner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// PawTransferOwner is a free data retrieval call binding the contract method 0xf1a5affe. +// +// Solidity: function pawTransferOwner() view returns(address) +func (_MasterChefv2 *MasterChefv2Session) PawTransferOwner() (common.Address, error) { + return _MasterChefv2.Contract.PawTransferOwner(&_MasterChefv2.CallOpts) +} + +// PawTransferOwner is a free data retrieval call binding the contract method 0xf1a5affe. +// +// Solidity: function pawTransferOwner() view returns(address) +func (_MasterChefv2 *MasterChefv2CallerSession) PawTransferOwner() (common.Address, error) { + return _MasterChefv2.Contract.PawTransferOwner(&_MasterChefv2.CallOpts) +} + +// PendingPaw is a free data retrieval call binding the contract method 0x1c1cd6f4. +// +// Solidity: function pendingPaw(uint256 _pid, address _user) view returns(uint256) +func (_MasterChefv2 *MasterChefv2Caller) PendingPaw(opts *bind.CallOpts, _pid *big.Int, _user common.Address) (*big.Int, error) { + var out []interface{} + err := _MasterChefv2.contract.Call(opts, &out, "pendingPaw", _pid, _user) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// PendingPaw is a free data retrieval call binding the contract method 0x1c1cd6f4. +// +// Solidity: function pendingPaw(uint256 _pid, address _user) view returns(uint256) +func (_MasterChefv2 *MasterChefv2Session) PendingPaw(_pid *big.Int, _user common.Address) (*big.Int, error) { + return _MasterChefv2.Contract.PendingPaw(&_MasterChefv2.CallOpts, _pid, _user) +} + +// PendingPaw is a free data retrieval call binding the contract method 0x1c1cd6f4. +// +// Solidity: function pendingPaw(uint256 _pid, address _user) view returns(uint256) +func (_MasterChefv2 *MasterChefv2CallerSession) PendingPaw(_pid *big.Int, _user common.Address) (*big.Int, error) { + return _MasterChefv2.Contract.PendingPaw(&_MasterChefv2.CallOpts, _pid, _user) +} + +// PoolExistence is a free data retrieval call binding the contract method 0xcbd258b5. +// +// Solidity: function poolExistence(address ) view returns(bool) +func (_MasterChefv2 *MasterChefv2Caller) PoolExistence(opts *bind.CallOpts, arg0 common.Address) (bool, error) { + var out []interface{} + err := _MasterChefv2.contract.Call(opts, &out, "poolExistence", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// PoolExistence is a free data retrieval call binding the contract method 0xcbd258b5. +// +// Solidity: function poolExistence(address ) view returns(bool) +func (_MasterChefv2 *MasterChefv2Session) PoolExistence(arg0 common.Address) (bool, error) { + return _MasterChefv2.Contract.PoolExistence(&_MasterChefv2.CallOpts, arg0) +} + +// PoolExistence is a free data retrieval call binding the contract method 0xcbd258b5. +// +// Solidity: function poolExistence(address ) view returns(bool) +func (_MasterChefv2 *MasterChefv2CallerSession) PoolExistence(arg0 common.Address) (bool, error) { + return _MasterChefv2.Contract.PoolExistence(&_MasterChefv2.CallOpts, arg0) +} + +// PoolInfo is a free data retrieval call binding the contract method 0x1526fe27. +// +// Solidity: function poolInfo(uint256 ) view returns(address lpToken, uint256 allocPoint, uint256 totalDeposited, uint256 lastRewardBlock, uint256 accPawPerShare) +func (_MasterChefv2 *MasterChefv2Caller) PoolInfo(opts *bind.CallOpts, arg0 *big.Int) (struct { + LpToken common.Address + AllocPoint *big.Int + TotalDeposited *big.Int + LastRewardBlock *big.Int + AccPawPerShare *big.Int +}, error) { + var out []interface{} + err := _MasterChefv2.contract.Call(opts, &out, "poolInfo", arg0) + + outstruct := new(struct { + LpToken common.Address + AllocPoint *big.Int + TotalDeposited *big.Int + LastRewardBlock *big.Int + AccPawPerShare *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.LpToken = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + outstruct.AllocPoint = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.TotalDeposited = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.LastRewardBlock = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.AccPawPerShare = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// PoolInfo is a free data retrieval call binding the contract method 0x1526fe27. +// +// Solidity: function poolInfo(uint256 ) view returns(address lpToken, uint256 allocPoint, uint256 totalDeposited, uint256 lastRewardBlock, uint256 accPawPerShare) +func (_MasterChefv2 *MasterChefv2Session) PoolInfo(arg0 *big.Int) (struct { + LpToken common.Address + AllocPoint *big.Int + TotalDeposited *big.Int + LastRewardBlock *big.Int + AccPawPerShare *big.Int +}, error) { + return _MasterChefv2.Contract.PoolInfo(&_MasterChefv2.CallOpts, arg0) +} + +// PoolInfo is a free data retrieval call binding the contract method 0x1526fe27. +// +// Solidity: function poolInfo(uint256 ) view returns(address lpToken, uint256 allocPoint, uint256 totalDeposited, uint256 lastRewardBlock, uint256 accPawPerShare) +func (_MasterChefv2 *MasterChefv2CallerSession) PoolInfo(arg0 *big.Int) (struct { + LpToken common.Address + AllocPoint *big.Int + TotalDeposited *big.Int + LastRewardBlock *big.Int + AccPawPerShare *big.Int +}, error) { + return _MasterChefv2.Contract.PoolInfo(&_MasterChefv2.CallOpts, arg0) +} + +// PoolLength is a free data retrieval call binding the contract method 0x081e3eda. +// +// Solidity: function poolLength() view returns(uint256) +func (_MasterChefv2 *MasterChefv2Caller) PoolLength(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MasterChefv2.contract.Call(opts, &out, "poolLength") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// PoolLength is a free data retrieval call binding the contract method 0x081e3eda. +// +// Solidity: function poolLength() view returns(uint256) +func (_MasterChefv2 *MasterChefv2Session) PoolLength() (*big.Int, error) { + return _MasterChefv2.Contract.PoolLength(&_MasterChefv2.CallOpts) +} + +// PoolLength is a free data retrieval call binding the contract method 0x081e3eda. +// +// Solidity: function poolLength() view returns(uint256) +func (_MasterChefv2 *MasterChefv2CallerSession) PoolLength() (*big.Int, error) { + return _MasterChefv2.Contract.PoolLength(&_MasterChefv2.CallOpts) +} + +// RewardLocker is a free data retrieval call binding the contract method 0x3892601c. +// +// Solidity: function rewardLocker() view returns(address) +func (_MasterChefv2 *MasterChefv2Caller) RewardLocker(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MasterChefv2.contract.Call(opts, &out, "rewardLocker") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// RewardLocker is a free data retrieval call binding the contract method 0x3892601c. +// +// Solidity: function rewardLocker() view returns(address) +func (_MasterChefv2 *MasterChefv2Session) RewardLocker() (common.Address, error) { + return _MasterChefv2.Contract.RewardLocker(&_MasterChefv2.CallOpts) +} + +// RewardLocker is a free data retrieval call binding the contract method 0x3892601c. +// +// Solidity: function rewardLocker() view returns(address) +func (_MasterChefv2 *MasterChefv2CallerSession) RewardLocker() (common.Address, error) { + return _MasterChefv2.Contract.RewardLocker(&_MasterChefv2.CallOpts) +} + +// StartBlock is a free data retrieval call binding the contract method 0x48cd4cb1. +// +// Solidity: function startBlock() view returns(uint256) +func (_MasterChefv2 *MasterChefv2Caller) StartBlock(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MasterChefv2.contract.Call(opts, &out, "startBlock") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// StartBlock is a free data retrieval call binding the contract method 0x48cd4cb1. +// +// Solidity: function startBlock() view returns(uint256) +func (_MasterChefv2 *MasterChefv2Session) StartBlock() (*big.Int, error) { + return _MasterChefv2.Contract.StartBlock(&_MasterChefv2.CallOpts) +} + +// StartBlock is a free data retrieval call binding the contract method 0x48cd4cb1. +// +// Solidity: function startBlock() view returns(uint256) +func (_MasterChefv2 *MasterChefv2CallerSession) StartBlock() (*big.Int, error) { + return _MasterChefv2.Contract.StartBlock(&_MasterChefv2.CallOpts) +} + +// TotalAllocPoint is a free data retrieval call binding the contract method 0x17caf6f1. +// +// Solidity: function totalAllocPoint() view returns(uint256) +func (_MasterChefv2 *MasterChefv2Caller) TotalAllocPoint(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MasterChefv2.contract.Call(opts, &out, "totalAllocPoint") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalAllocPoint is a free data retrieval call binding the contract method 0x17caf6f1. +// +// Solidity: function totalAllocPoint() view returns(uint256) +func (_MasterChefv2 *MasterChefv2Session) TotalAllocPoint() (*big.Int, error) { + return _MasterChefv2.Contract.TotalAllocPoint(&_MasterChefv2.CallOpts) +} + +// TotalAllocPoint is a free data retrieval call binding the contract method 0x17caf6f1. +// +// Solidity: function totalAllocPoint() view returns(uint256) +func (_MasterChefv2 *MasterChefv2CallerSession) TotalAllocPoint() (*big.Int, error) { + return _MasterChefv2.Contract.TotalAllocPoint(&_MasterChefv2.CallOpts) +} + +// UserInfo is a free data retrieval call binding the contract method 0x93f1a40b. +// +// Solidity: function userInfo(uint256 , address ) view returns(uint256 amount, uint256 lastPawPerShare, uint256 unclaimed) +func (_MasterChefv2 *MasterChefv2Caller) UserInfo(opts *bind.CallOpts, arg0 *big.Int, arg1 common.Address) (struct { + Amount *big.Int + LastPawPerShare *big.Int + Unclaimed *big.Int +}, error) { + var out []interface{} + err := _MasterChefv2.contract.Call(opts, &out, "userInfo", arg0, arg1) + + outstruct := new(struct { + Amount *big.Int + LastPawPerShare *big.Int + Unclaimed *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.Amount = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.LastPawPerShare = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.Unclaimed = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// UserInfo is a free data retrieval call binding the contract method 0x93f1a40b. +// +// Solidity: function userInfo(uint256 , address ) view returns(uint256 amount, uint256 lastPawPerShare, uint256 unclaimed) +func (_MasterChefv2 *MasterChefv2Session) UserInfo(arg0 *big.Int, arg1 common.Address) (struct { + Amount *big.Int + LastPawPerShare *big.Int + Unclaimed *big.Int +}, error) { + return _MasterChefv2.Contract.UserInfo(&_MasterChefv2.CallOpts, arg0, arg1) +} + +// UserInfo is a free data retrieval call binding the contract method 0x93f1a40b. +// +// Solidity: function userInfo(uint256 , address ) view returns(uint256 amount, uint256 lastPawPerShare, uint256 unclaimed) +func (_MasterChefv2 *MasterChefv2CallerSession) UserInfo(arg0 *big.Int, arg1 common.Address) (struct { + Amount *big.Int + LastPawPerShare *big.Int + Unclaimed *big.Int +}, error) { + return _MasterChefv2.Contract.UserInfo(&_MasterChefv2.CallOpts, arg0, arg1) +} + +// Add is a paid mutator transaction binding the contract method 0x1eaaa045. +// +// Solidity: function add(uint256 _allocPoint, address _lpToken, bool _massUpdatePools) returns() +func (_MasterChefv2 *MasterChefv2Transactor) Add(opts *bind.TransactOpts, _allocPoint *big.Int, _lpToken common.Address, _massUpdatePools bool) (*types.Transaction, error) { + return _MasterChefv2.contract.Transact(opts, "add", _allocPoint, _lpToken, _massUpdatePools) +} + +// Add is a paid mutator transaction binding the contract method 0x1eaaa045. +// +// Solidity: function add(uint256 _allocPoint, address _lpToken, bool _massUpdatePools) returns() +func (_MasterChefv2 *MasterChefv2Session) Add(_allocPoint *big.Int, _lpToken common.Address, _massUpdatePools bool) (*types.Transaction, error) { + return _MasterChefv2.Contract.Add(&_MasterChefv2.TransactOpts, _allocPoint, _lpToken, _massUpdatePools) +} + +// Add is a paid mutator transaction binding the contract method 0x1eaaa045. +// +// Solidity: function add(uint256 _allocPoint, address _lpToken, bool _massUpdatePools) returns() +func (_MasterChefv2 *MasterChefv2TransactorSession) Add(_allocPoint *big.Int, _lpToken common.Address, _massUpdatePools bool) (*types.Transaction, error) { + return _MasterChefv2.Contract.Add(&_MasterChefv2.TransactOpts, _allocPoint, _lpToken, _massUpdatePools) +} + +// Deposit is a paid mutator transaction binding the contract method 0x43a0d066. +// +// Solidity: function deposit(uint256 _pid, uint256 _amount, bool _shouldHarvest) returns() +func (_MasterChefv2 *MasterChefv2Transactor) Deposit(opts *bind.TransactOpts, _pid *big.Int, _amount *big.Int, _shouldHarvest bool) (*types.Transaction, error) { + return _MasterChefv2.contract.Transact(opts, "deposit", _pid, _amount, _shouldHarvest) +} + +// Deposit is a paid mutator transaction binding the contract method 0x43a0d066. +// +// Solidity: function deposit(uint256 _pid, uint256 _amount, bool _shouldHarvest) returns() +func (_MasterChefv2 *MasterChefv2Session) Deposit(_pid *big.Int, _amount *big.Int, _shouldHarvest bool) (*types.Transaction, error) { + return _MasterChefv2.Contract.Deposit(&_MasterChefv2.TransactOpts, _pid, _amount, _shouldHarvest) +} + +// Deposit is a paid mutator transaction binding the contract method 0x43a0d066. +// +// Solidity: function deposit(uint256 _pid, uint256 _amount, bool _shouldHarvest) returns() +func (_MasterChefv2 *MasterChefv2TransactorSession) Deposit(_pid *big.Int, _amount *big.Int, _shouldHarvest bool) (*types.Transaction, error) { + return _MasterChefv2.Contract.Deposit(&_MasterChefv2.TransactOpts, _pid, _amount, _shouldHarvest) +} + +// EmergencyWithdraw is a paid mutator transaction binding the contract method 0x5312ea8e. +// +// Solidity: function emergencyWithdraw(uint256 _pid) returns() +func (_MasterChefv2 *MasterChefv2Transactor) EmergencyWithdraw(opts *bind.TransactOpts, _pid *big.Int) (*types.Transaction, error) { + return _MasterChefv2.contract.Transact(opts, "emergencyWithdraw", _pid) +} + +// EmergencyWithdraw is a paid mutator transaction binding the contract method 0x5312ea8e. +// +// Solidity: function emergencyWithdraw(uint256 _pid) returns() +func (_MasterChefv2 *MasterChefv2Session) EmergencyWithdraw(_pid *big.Int) (*types.Transaction, error) { + return _MasterChefv2.Contract.EmergencyWithdraw(&_MasterChefv2.TransactOpts, _pid) +} + +// EmergencyWithdraw is a paid mutator transaction binding the contract method 0x5312ea8e. +// +// Solidity: function emergencyWithdraw(uint256 _pid) returns() +func (_MasterChefv2 *MasterChefv2TransactorSession) EmergencyWithdraw(_pid *big.Int) (*types.Transaction, error) { + return _MasterChefv2.Contract.EmergencyWithdraw(&_MasterChefv2.TransactOpts, _pid) +} + +// Harvest is a paid mutator transaction binding the contract method 0xddc63262. +// +// Solidity: function harvest(uint256 _pid) returns() +func (_MasterChefv2 *MasterChefv2Transactor) Harvest(opts *bind.TransactOpts, _pid *big.Int) (*types.Transaction, error) { + return _MasterChefv2.contract.Transact(opts, "harvest", _pid) +} + +// Harvest is a paid mutator transaction binding the contract method 0xddc63262. +// +// Solidity: function harvest(uint256 _pid) returns() +func (_MasterChefv2 *MasterChefv2Session) Harvest(_pid *big.Int) (*types.Transaction, error) { + return _MasterChefv2.Contract.Harvest(&_MasterChefv2.TransactOpts, _pid) +} + +// Harvest is a paid mutator transaction binding the contract method 0xddc63262. +// +// Solidity: function harvest(uint256 _pid) returns() +func (_MasterChefv2 *MasterChefv2TransactorSession) Harvest(_pid *big.Int) (*types.Transaction, error) { + return _MasterChefv2.Contract.Harvest(&_MasterChefv2.TransactOpts, _pid) +} + +// HarvestAll is a paid mutator transaction binding the contract method 0x8ed955b9. +// +// Solidity: function harvestAll() returns() +func (_MasterChefv2 *MasterChefv2Transactor) HarvestAll(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MasterChefv2.contract.Transact(opts, "harvestAll") +} + +// HarvestAll is a paid mutator transaction binding the contract method 0x8ed955b9. +// +// Solidity: function harvestAll() returns() +func (_MasterChefv2 *MasterChefv2Session) HarvestAll() (*types.Transaction, error) { + return _MasterChefv2.Contract.HarvestAll(&_MasterChefv2.TransactOpts) +} + +// HarvestAll is a paid mutator transaction binding the contract method 0x8ed955b9. +// +// Solidity: function harvestAll() returns() +func (_MasterChefv2 *MasterChefv2TransactorSession) HarvestAll() (*types.Transaction, error) { + return _MasterChefv2.Contract.HarvestAll(&_MasterChefv2.TransactOpts) +} + +// HarvestMultiple is a paid mutator transaction binding the contract method 0x218e0f73. +// +// Solidity: function harvestMultiple(uint256[] _pids) returns() +func (_MasterChefv2 *MasterChefv2Transactor) HarvestMultiple(opts *bind.TransactOpts, _pids []*big.Int) (*types.Transaction, error) { + return _MasterChefv2.contract.Transact(opts, "harvestMultiple", _pids) +} + +// HarvestMultiple is a paid mutator transaction binding the contract method 0x218e0f73. +// +// Solidity: function harvestMultiple(uint256[] _pids) returns() +func (_MasterChefv2 *MasterChefv2Session) HarvestMultiple(_pids []*big.Int) (*types.Transaction, error) { + return _MasterChefv2.Contract.HarvestMultiple(&_MasterChefv2.TransactOpts, _pids) +} + +// HarvestMultiple is a paid mutator transaction binding the contract method 0x218e0f73. +// +// Solidity: function harvestMultiple(uint256[] _pids) returns() +func (_MasterChefv2 *MasterChefv2TransactorSession) HarvestMultiple(_pids []*big.Int) (*types.Transaction, error) { + return _MasterChefv2.Contract.HarvestMultiple(&_MasterChefv2.TransactOpts, _pids) +} + +// MassUpdatePools is a paid mutator transaction binding the contract method 0x630b5ba1. +// +// Solidity: function massUpdatePools() returns() +func (_MasterChefv2 *MasterChefv2Transactor) MassUpdatePools(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MasterChefv2.contract.Transact(opts, "massUpdatePools") +} + +// MassUpdatePools is a paid mutator transaction binding the contract method 0x630b5ba1. +// +// Solidity: function massUpdatePools() returns() +func (_MasterChefv2 *MasterChefv2Session) MassUpdatePools() (*types.Transaction, error) { + return _MasterChefv2.Contract.MassUpdatePools(&_MasterChefv2.TransactOpts) +} + +// MassUpdatePools is a paid mutator transaction binding the contract method 0x630b5ba1. +// +// Solidity: function massUpdatePools() returns() +func (_MasterChefv2 *MasterChefv2TransactorSession) MassUpdatePools() (*types.Transaction, error) { + return _MasterChefv2.Contract.MassUpdatePools(&_MasterChefv2.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MasterChefv2 *MasterChefv2Transactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MasterChefv2.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MasterChefv2 *MasterChefv2Session) RenounceOwnership() (*types.Transaction, error) { + return _MasterChefv2.Contract.RenounceOwnership(&_MasterChefv2.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MasterChefv2 *MasterChefv2TransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _MasterChefv2.Contract.RenounceOwnership(&_MasterChefv2.TransactOpts) +} + +// Set is a paid mutator transaction binding the contract method 0x1ab06ee5. +// +// Solidity: function set(uint256 _pid, uint256 _allocPoint) returns() +func (_MasterChefv2 *MasterChefv2Transactor) Set(opts *bind.TransactOpts, _pid *big.Int, _allocPoint *big.Int) (*types.Transaction, error) { + return _MasterChefv2.contract.Transact(opts, "set", _pid, _allocPoint) +} + +// Set is a paid mutator transaction binding the contract method 0x1ab06ee5. +// +// Solidity: function set(uint256 _pid, uint256 _allocPoint) returns() +func (_MasterChefv2 *MasterChefv2Session) Set(_pid *big.Int, _allocPoint *big.Int) (*types.Transaction, error) { + return _MasterChefv2.Contract.Set(&_MasterChefv2.TransactOpts, _pid, _allocPoint) +} + +// Set is a paid mutator transaction binding the contract method 0x1ab06ee5. +// +// Solidity: function set(uint256 _pid, uint256 _allocPoint) returns() +func (_MasterChefv2 *MasterChefv2TransactorSession) Set(_pid *big.Int, _allocPoint *big.Int) (*types.Transaction, error) { + return _MasterChefv2.Contract.Set(&_MasterChefv2.TransactOpts, _pid, _allocPoint) +} + +// SetDevAddress is a paid mutator transaction binding the contract method 0xd0d41fe1. +// +// Solidity: function setDevAddress(address _devAddress) returns() +func (_MasterChefv2 *MasterChefv2Transactor) SetDevAddress(opts *bind.TransactOpts, _devAddress common.Address) (*types.Transaction, error) { + return _MasterChefv2.contract.Transact(opts, "setDevAddress", _devAddress) +} + +// SetDevAddress is a paid mutator transaction binding the contract method 0xd0d41fe1. +// +// Solidity: function setDevAddress(address _devAddress) returns() +func (_MasterChefv2 *MasterChefv2Session) SetDevAddress(_devAddress common.Address) (*types.Transaction, error) { + return _MasterChefv2.Contract.SetDevAddress(&_MasterChefv2.TransactOpts, _devAddress) +} + +// SetDevAddress is a paid mutator transaction binding the contract method 0xd0d41fe1. +// +// Solidity: function setDevAddress(address _devAddress) returns() +func (_MasterChefv2 *MasterChefv2TransactorSession) SetDevAddress(_devAddress common.Address) (*types.Transaction, error) { + return _MasterChefv2.Contract.SetDevAddress(&_MasterChefv2.TransactOpts, _devAddress) +} + +// SetPawTransferOwner is a paid mutator transaction binding the contract method 0xede530d3. +// +// Solidity: function setPawTransferOwner(address _pawTransferOwner) returns() +func (_MasterChefv2 *MasterChefv2Transactor) SetPawTransferOwner(opts *bind.TransactOpts, _pawTransferOwner common.Address) (*types.Transaction, error) { + return _MasterChefv2.contract.Transact(opts, "setPawTransferOwner", _pawTransferOwner) +} + +// SetPawTransferOwner is a paid mutator transaction binding the contract method 0xede530d3. +// +// Solidity: function setPawTransferOwner(address _pawTransferOwner) returns() +func (_MasterChefv2 *MasterChefv2Session) SetPawTransferOwner(_pawTransferOwner common.Address) (*types.Transaction, error) { + return _MasterChefv2.Contract.SetPawTransferOwner(&_MasterChefv2.TransactOpts, _pawTransferOwner) +} + +// SetPawTransferOwner is a paid mutator transaction binding the contract method 0xede530d3. +// +// Solidity: function setPawTransferOwner(address _pawTransferOwner) returns() +func (_MasterChefv2 *MasterChefv2TransactorSession) SetPawTransferOwner(_pawTransferOwner common.Address) (*types.Transaction, error) { + return _MasterChefv2.Contract.SetPawTransferOwner(&_MasterChefv2.TransactOpts, _pawTransferOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MasterChefv2 *MasterChefv2Transactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _MasterChefv2.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MasterChefv2 *MasterChefv2Session) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _MasterChefv2.Contract.TransferOwnership(&_MasterChefv2.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MasterChefv2 *MasterChefv2TransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _MasterChefv2.Contract.TransferOwnership(&_MasterChefv2.TransactOpts, newOwner) +} + +// TransferPawOwnership is a paid mutator transaction binding the contract method 0xe7a5c5ec. +// +// Solidity: function transferPawOwnership(address _newOwner) returns() +func (_MasterChefv2 *MasterChefv2Transactor) TransferPawOwnership(opts *bind.TransactOpts, _newOwner common.Address) (*types.Transaction, error) { + return _MasterChefv2.contract.Transact(opts, "transferPawOwnership", _newOwner) +} + +// TransferPawOwnership is a paid mutator transaction binding the contract method 0xe7a5c5ec. +// +// Solidity: function transferPawOwnership(address _newOwner) returns() +func (_MasterChefv2 *MasterChefv2Session) TransferPawOwnership(_newOwner common.Address) (*types.Transaction, error) { + return _MasterChefv2.Contract.TransferPawOwnership(&_MasterChefv2.TransactOpts, _newOwner) +} + +// TransferPawOwnership is a paid mutator transaction binding the contract method 0xe7a5c5ec. +// +// Solidity: function transferPawOwnership(address _newOwner) returns() +func (_MasterChefv2 *MasterChefv2TransactorSession) TransferPawOwnership(_newOwner common.Address) (*types.Transaction, error) { + return _MasterChefv2.Contract.TransferPawOwnership(&_MasterChefv2.TransactOpts, _newOwner) +} + +// UpdateEmissionRate is a paid mutator transaction binding the contract method 0x0ba84cd2. +// +// Solidity: function updateEmissionRate(uint256 _pawPerBlock) returns() +func (_MasterChefv2 *MasterChefv2Transactor) UpdateEmissionRate(opts *bind.TransactOpts, _pawPerBlock *big.Int) (*types.Transaction, error) { + return _MasterChefv2.contract.Transact(opts, "updateEmissionRate", _pawPerBlock) +} + +// UpdateEmissionRate is a paid mutator transaction binding the contract method 0x0ba84cd2. +// +// Solidity: function updateEmissionRate(uint256 _pawPerBlock) returns() +func (_MasterChefv2 *MasterChefv2Session) UpdateEmissionRate(_pawPerBlock *big.Int) (*types.Transaction, error) { + return _MasterChefv2.Contract.UpdateEmissionRate(&_MasterChefv2.TransactOpts, _pawPerBlock) +} + +// UpdateEmissionRate is a paid mutator transaction binding the contract method 0x0ba84cd2. +// +// Solidity: function updateEmissionRate(uint256 _pawPerBlock) returns() +func (_MasterChefv2 *MasterChefv2TransactorSession) UpdateEmissionRate(_pawPerBlock *big.Int) (*types.Transaction, error) { + return _MasterChefv2.Contract.UpdateEmissionRate(&_MasterChefv2.TransactOpts, _pawPerBlock) +} + +// UpdatePool is a paid mutator transaction binding the contract method 0x51eb05a6. +// +// Solidity: function updatePool(uint256 _pid) returns() +func (_MasterChefv2 *MasterChefv2Transactor) UpdatePool(opts *bind.TransactOpts, _pid *big.Int) (*types.Transaction, error) { + return _MasterChefv2.contract.Transact(opts, "updatePool", _pid) +} + +// UpdatePool is a paid mutator transaction binding the contract method 0x51eb05a6. +// +// Solidity: function updatePool(uint256 _pid) returns() +func (_MasterChefv2 *MasterChefv2Session) UpdatePool(_pid *big.Int) (*types.Transaction, error) { + return _MasterChefv2.Contract.UpdatePool(&_MasterChefv2.TransactOpts, _pid) +} + +// UpdatePool is a paid mutator transaction binding the contract method 0x51eb05a6. +// +// Solidity: function updatePool(uint256 _pid) returns() +func (_MasterChefv2 *MasterChefv2TransactorSession) UpdatePool(_pid *big.Int) (*types.Transaction, error) { + return _MasterChefv2.Contract.UpdatePool(&_MasterChefv2.TransactOpts, _pid) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x33cfcd3b. +// +// Solidity: function withdraw(uint256 _pid, uint256 _amount, bool _shouldHarvest) returns() +func (_MasterChefv2 *MasterChefv2Transactor) Withdraw(opts *bind.TransactOpts, _pid *big.Int, _amount *big.Int, _shouldHarvest bool) (*types.Transaction, error) { + return _MasterChefv2.contract.Transact(opts, "withdraw", _pid, _amount, _shouldHarvest) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x33cfcd3b. +// +// Solidity: function withdraw(uint256 _pid, uint256 _amount, bool _shouldHarvest) returns() +func (_MasterChefv2 *MasterChefv2Session) Withdraw(_pid *big.Int, _amount *big.Int, _shouldHarvest bool) (*types.Transaction, error) { + return _MasterChefv2.Contract.Withdraw(&_MasterChefv2.TransactOpts, _pid, _amount, _shouldHarvest) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x33cfcd3b. +// +// Solidity: function withdraw(uint256 _pid, uint256 _amount, bool _shouldHarvest) returns() +func (_MasterChefv2 *MasterChefv2TransactorSession) Withdraw(_pid *big.Int, _amount *big.Int, _shouldHarvest bool) (*types.Transaction, error) { + return _MasterChefv2.Contract.Withdraw(&_MasterChefv2.TransactOpts, _pid, _amount, _shouldHarvest) +} + +// MasterChefv2AddIterator is returned from FilterAdd and is used to iterate over the raw logs and unpacked data for Add events raised by the MasterChefv2 contract. +type MasterChefv2AddIterator struct { + Event *MasterChefv2Add // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterChefv2AddIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterChefv2Add) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterChefv2Add) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterChefv2AddIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterChefv2AddIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterChefv2Add represents a Add event raised by the MasterChefv2 contract. +type MasterChefv2Add struct { + User common.Address + AllocPoint *big.Int + Token common.Address + MassUpdatePools bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAdd is a free log retrieval operation binding the contract event 0x6bff160bd5aed7481f5b68cfb37186cc022a63f2dec5eca7648178b239ae2892. +// +// Solidity: event Add(address indexed user, uint256 allocPoint, address indexed token, bool massUpdatePools) +func (_MasterChefv2 *MasterChefv2Filterer) FilterAdd(opts *bind.FilterOpts, user []common.Address, token []common.Address) (*MasterChefv2AddIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _MasterChefv2.contract.FilterLogs(opts, "Add", userRule, tokenRule) + if err != nil { + return nil, err + } + return &MasterChefv2AddIterator{contract: _MasterChefv2.contract, event: "Add", logs: logs, sub: sub}, nil +} + +// WatchAdd is a free log subscription operation binding the contract event 0x6bff160bd5aed7481f5b68cfb37186cc022a63f2dec5eca7648178b239ae2892. +// +// Solidity: event Add(address indexed user, uint256 allocPoint, address indexed token, bool massUpdatePools) +func (_MasterChefv2 *MasterChefv2Filterer) WatchAdd(opts *bind.WatchOpts, sink chan<- *MasterChefv2Add, user []common.Address, token []common.Address) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _MasterChefv2.contract.WatchLogs(opts, "Add", userRule, tokenRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterChefv2Add) + if err := _MasterChefv2.contract.UnpackLog(event, "Add", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseAdd is a log parse operation binding the contract event 0x6bff160bd5aed7481f5b68cfb37186cc022a63f2dec5eca7648178b239ae2892. +// +// Solidity: event Add(address indexed user, uint256 allocPoint, address indexed token, bool massUpdatePools) +func (_MasterChefv2 *MasterChefv2Filterer) ParseAdd(log types.Log) (*MasterChefv2Add, error) { + event := new(MasterChefv2Add) + if err := _MasterChefv2.contract.UnpackLog(event, "Add", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterChefv2DepositIterator is returned from FilterDeposit and is used to iterate over the raw logs and unpacked data for Deposit events raised by the MasterChefv2 contract. +type MasterChefv2DepositIterator struct { + Event *MasterChefv2Deposit // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterChefv2DepositIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterChefv2Deposit) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterChefv2Deposit) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterChefv2DepositIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterChefv2DepositIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterChefv2Deposit represents a Deposit event raised by the MasterChefv2 contract. +type MasterChefv2Deposit struct { + User common.Address + Pid *big.Int + Amount *big.Int + Harvest bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDeposit is a free log retrieval operation binding the contract event 0x6dbb6056a2fff319358e6dd7d0d72cb3baa992cdcc7e120fb0a32cd1601840e5. +// +// Solidity: event Deposit(address indexed user, uint256 indexed pid, uint256 amount, bool harvest) +func (_MasterChefv2 *MasterChefv2Filterer) FilterDeposit(opts *bind.FilterOpts, user []common.Address, pid []*big.Int) (*MasterChefv2DepositIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pidRule []interface{} + for _, pidItem := range pid { + pidRule = append(pidRule, pidItem) + } + + logs, sub, err := _MasterChefv2.contract.FilterLogs(opts, "Deposit", userRule, pidRule) + if err != nil { + return nil, err + } + return &MasterChefv2DepositIterator{contract: _MasterChefv2.contract, event: "Deposit", logs: logs, sub: sub}, nil +} + +// WatchDeposit is a free log subscription operation binding the contract event 0x6dbb6056a2fff319358e6dd7d0d72cb3baa992cdcc7e120fb0a32cd1601840e5. +// +// Solidity: event Deposit(address indexed user, uint256 indexed pid, uint256 amount, bool harvest) +func (_MasterChefv2 *MasterChefv2Filterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *MasterChefv2Deposit, user []common.Address, pid []*big.Int) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pidRule []interface{} + for _, pidItem := range pid { + pidRule = append(pidRule, pidItem) + } + + logs, sub, err := _MasterChefv2.contract.WatchLogs(opts, "Deposit", userRule, pidRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterChefv2Deposit) + if err := _MasterChefv2.contract.UnpackLog(event, "Deposit", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseDeposit is a log parse operation binding the contract event 0x6dbb6056a2fff319358e6dd7d0d72cb3baa992cdcc7e120fb0a32cd1601840e5. +// +// Solidity: event Deposit(address indexed user, uint256 indexed pid, uint256 amount, bool harvest) +func (_MasterChefv2 *MasterChefv2Filterer) ParseDeposit(log types.Log) (*MasterChefv2Deposit, error) { + event := new(MasterChefv2Deposit) + if err := _MasterChefv2.contract.UnpackLog(event, "Deposit", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterChefv2EmergencyWithdrawIterator is returned from FilterEmergencyWithdraw and is used to iterate over the raw logs and unpacked data for EmergencyWithdraw events raised by the MasterChefv2 contract. +type MasterChefv2EmergencyWithdrawIterator struct { + Event *MasterChefv2EmergencyWithdraw // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterChefv2EmergencyWithdrawIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterChefv2EmergencyWithdraw) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterChefv2EmergencyWithdraw) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterChefv2EmergencyWithdrawIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterChefv2EmergencyWithdrawIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterChefv2EmergencyWithdraw represents a EmergencyWithdraw event raised by the MasterChefv2 contract. +type MasterChefv2EmergencyWithdraw struct { + User common.Address + Pid *big.Int + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterEmergencyWithdraw is a free log retrieval operation binding the contract event 0xbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595. +// +// Solidity: event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount) +func (_MasterChefv2 *MasterChefv2Filterer) FilterEmergencyWithdraw(opts *bind.FilterOpts, user []common.Address, pid []*big.Int) (*MasterChefv2EmergencyWithdrawIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pidRule []interface{} + for _, pidItem := range pid { + pidRule = append(pidRule, pidItem) + } + + logs, sub, err := _MasterChefv2.contract.FilterLogs(opts, "EmergencyWithdraw", userRule, pidRule) + if err != nil { + return nil, err + } + return &MasterChefv2EmergencyWithdrawIterator{contract: _MasterChefv2.contract, event: "EmergencyWithdraw", logs: logs, sub: sub}, nil +} + +// WatchEmergencyWithdraw is a free log subscription operation binding the contract event 0xbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595. +// +// Solidity: event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount) +func (_MasterChefv2 *MasterChefv2Filterer) WatchEmergencyWithdraw(opts *bind.WatchOpts, sink chan<- *MasterChefv2EmergencyWithdraw, user []common.Address, pid []*big.Int) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pidRule []interface{} + for _, pidItem := range pid { + pidRule = append(pidRule, pidItem) + } + + logs, sub, err := _MasterChefv2.contract.WatchLogs(opts, "EmergencyWithdraw", userRule, pidRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterChefv2EmergencyWithdraw) + if err := _MasterChefv2.contract.UnpackLog(event, "EmergencyWithdraw", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseEmergencyWithdraw is a log parse operation binding the contract event 0xbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595. +// +// Solidity: event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount) +func (_MasterChefv2 *MasterChefv2Filterer) ParseEmergencyWithdraw(log types.Log) (*MasterChefv2EmergencyWithdraw, error) { + event := new(MasterChefv2EmergencyWithdraw) + if err := _MasterChefv2.contract.UnpackLog(event, "EmergencyWithdraw", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterChefv2HarvestIterator is returned from FilterHarvest and is used to iterate over the raw logs and unpacked data for Harvest events raised by the MasterChefv2 contract. +type MasterChefv2HarvestIterator struct { + Event *MasterChefv2Harvest // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterChefv2HarvestIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterChefv2Harvest) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterChefv2Harvest) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterChefv2HarvestIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterChefv2HarvestIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterChefv2Harvest represents a Harvest event raised by the MasterChefv2 contract. +type MasterChefv2Harvest struct { + User common.Address + Pid *big.Int + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterHarvest is a free log retrieval operation binding the contract event 0x71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae0660924954. +// +// Solidity: event Harvest(address indexed user, uint256 indexed pid, uint256 amount) +func (_MasterChefv2 *MasterChefv2Filterer) FilterHarvest(opts *bind.FilterOpts, user []common.Address, pid []*big.Int) (*MasterChefv2HarvestIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pidRule []interface{} + for _, pidItem := range pid { + pidRule = append(pidRule, pidItem) + } + + logs, sub, err := _MasterChefv2.contract.FilterLogs(opts, "Harvest", userRule, pidRule) + if err != nil { + return nil, err + } + return &MasterChefv2HarvestIterator{contract: _MasterChefv2.contract, event: "Harvest", logs: logs, sub: sub}, nil +} + +// WatchHarvest is a free log subscription operation binding the contract event 0x71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae0660924954. +// +// Solidity: event Harvest(address indexed user, uint256 indexed pid, uint256 amount) +func (_MasterChefv2 *MasterChefv2Filterer) WatchHarvest(opts *bind.WatchOpts, sink chan<- *MasterChefv2Harvest, user []common.Address, pid []*big.Int) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pidRule []interface{} + for _, pidItem := range pid { + pidRule = append(pidRule, pidItem) + } + + logs, sub, err := _MasterChefv2.contract.WatchLogs(opts, "Harvest", userRule, pidRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterChefv2Harvest) + if err := _MasterChefv2.contract.UnpackLog(event, "Harvest", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseHarvest is a log parse operation binding the contract event 0x71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae0660924954. +// +// Solidity: event Harvest(address indexed user, uint256 indexed pid, uint256 amount) +func (_MasterChefv2 *MasterChefv2Filterer) ParseHarvest(log types.Log) (*MasterChefv2Harvest, error) { + event := new(MasterChefv2Harvest) + if err := _MasterChefv2.contract.UnpackLog(event, "Harvest", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterChefv2HarvestAllIterator is returned from FilterHarvestAll and is used to iterate over the raw logs and unpacked data for HarvestAll events raised by the MasterChefv2 contract. +type MasterChefv2HarvestAllIterator struct { + Event *MasterChefv2HarvestAll // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterChefv2HarvestAllIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterChefv2HarvestAll) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterChefv2HarvestAll) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterChefv2HarvestAllIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterChefv2HarvestAllIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterChefv2HarvestAll represents a HarvestAll event raised by the MasterChefv2 contract. +type MasterChefv2HarvestAll struct { + User common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterHarvestAll is a free log retrieval operation binding the contract event 0xb99be208a056eff82108fe5a30bcc952d8d8e29c06a5c16918d61a14da8f7a46. +// +// Solidity: event HarvestAll(address indexed user, uint256 amount) +func (_MasterChefv2 *MasterChefv2Filterer) FilterHarvestAll(opts *bind.FilterOpts, user []common.Address) (*MasterChefv2HarvestAllIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + + logs, sub, err := _MasterChefv2.contract.FilterLogs(opts, "HarvestAll", userRule) + if err != nil { + return nil, err + } + return &MasterChefv2HarvestAllIterator{contract: _MasterChefv2.contract, event: "HarvestAll", logs: logs, sub: sub}, nil +} + +// WatchHarvestAll is a free log subscription operation binding the contract event 0xb99be208a056eff82108fe5a30bcc952d8d8e29c06a5c16918d61a14da8f7a46. +// +// Solidity: event HarvestAll(address indexed user, uint256 amount) +func (_MasterChefv2 *MasterChefv2Filterer) WatchHarvestAll(opts *bind.WatchOpts, sink chan<- *MasterChefv2HarvestAll, user []common.Address) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + + logs, sub, err := _MasterChefv2.contract.WatchLogs(opts, "HarvestAll", userRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterChefv2HarvestAll) + if err := _MasterChefv2.contract.UnpackLog(event, "HarvestAll", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseHarvestAll is a log parse operation binding the contract event 0xb99be208a056eff82108fe5a30bcc952d8d8e29c06a5c16918d61a14da8f7a46. +// +// Solidity: event HarvestAll(address indexed user, uint256 amount) +func (_MasterChefv2 *MasterChefv2Filterer) ParseHarvestAll(log types.Log) (*MasterChefv2HarvestAll, error) { + event := new(MasterChefv2HarvestAll) + if err := _MasterChefv2.contract.UnpackLog(event, "HarvestAll", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterChefv2HarvestMultipleIterator is returned from FilterHarvestMultiple and is used to iterate over the raw logs and unpacked data for HarvestMultiple events raised by the MasterChefv2 contract. +type MasterChefv2HarvestMultipleIterator struct { + Event *MasterChefv2HarvestMultiple // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterChefv2HarvestMultipleIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterChefv2HarvestMultiple) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterChefv2HarvestMultiple) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterChefv2HarvestMultipleIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterChefv2HarvestMultipleIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterChefv2HarvestMultiple represents a HarvestMultiple event raised by the MasterChefv2 contract. +type MasterChefv2HarvestMultiple struct { + User common.Address + Pids []*big.Int + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterHarvestMultiple is a free log retrieval operation binding the contract event 0x112209c50e183ea8b99608876ddc6f45b4abe3d7ae3ed1b3c79c23f855d6a352. +// +// Solidity: event HarvestMultiple(address indexed user, uint256[] _pids, uint256 amount) +func (_MasterChefv2 *MasterChefv2Filterer) FilterHarvestMultiple(opts *bind.FilterOpts, user []common.Address) (*MasterChefv2HarvestMultipleIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + + logs, sub, err := _MasterChefv2.contract.FilterLogs(opts, "HarvestMultiple", userRule) + if err != nil { + return nil, err + } + return &MasterChefv2HarvestMultipleIterator{contract: _MasterChefv2.contract, event: "HarvestMultiple", logs: logs, sub: sub}, nil +} + +// WatchHarvestMultiple is a free log subscription operation binding the contract event 0x112209c50e183ea8b99608876ddc6f45b4abe3d7ae3ed1b3c79c23f855d6a352. +// +// Solidity: event HarvestMultiple(address indexed user, uint256[] _pids, uint256 amount) +func (_MasterChefv2 *MasterChefv2Filterer) WatchHarvestMultiple(opts *bind.WatchOpts, sink chan<- *MasterChefv2HarvestMultiple, user []common.Address) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + + logs, sub, err := _MasterChefv2.contract.WatchLogs(opts, "HarvestMultiple", userRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterChefv2HarvestMultiple) + if err := _MasterChefv2.contract.UnpackLog(event, "HarvestMultiple", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseHarvestMultiple is a log parse operation binding the contract event 0x112209c50e183ea8b99608876ddc6f45b4abe3d7ae3ed1b3c79c23f855d6a352. +// +// Solidity: event HarvestMultiple(address indexed user, uint256[] _pids, uint256 amount) +func (_MasterChefv2 *MasterChefv2Filterer) ParseHarvestMultiple(log types.Log) (*MasterChefv2HarvestMultiple, error) { + event := new(MasterChefv2HarvestMultiple) + if err := _MasterChefv2.contract.UnpackLog(event, "HarvestMultiple", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterChefv2OwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the MasterChefv2 contract. +type MasterChefv2OwnershipTransferredIterator struct { + Event *MasterChefv2OwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterChefv2OwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterChefv2OwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterChefv2OwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterChefv2OwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterChefv2OwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterChefv2OwnershipTransferred represents a OwnershipTransferred event raised by the MasterChefv2 contract. +type MasterChefv2OwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MasterChefv2 *MasterChefv2Filterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*MasterChefv2OwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _MasterChefv2.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &MasterChefv2OwnershipTransferredIterator{contract: _MasterChefv2.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MasterChefv2 *MasterChefv2Filterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *MasterChefv2OwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _MasterChefv2.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterChefv2OwnershipTransferred) + if err := _MasterChefv2.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MasterChefv2 *MasterChefv2Filterer) ParseOwnershipTransferred(log types.Log) (*MasterChefv2OwnershipTransferred, error) { + event := new(MasterChefv2OwnershipTransferred) + if err := _MasterChefv2.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterChefv2SetIterator is returned from FilterSet and is used to iterate over the raw logs and unpacked data for Set events raised by the MasterChefv2 contract. +type MasterChefv2SetIterator struct { + Event *MasterChefv2Set // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterChefv2SetIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterChefv2Set) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterChefv2Set) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterChefv2SetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterChefv2SetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterChefv2Set represents a Set event raised by the MasterChefv2 contract. +type MasterChefv2Set struct { + User common.Address + Pid *big.Int + AllocPoint *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSet is a free log retrieval operation binding the contract event 0x9eca8f7bcfb868d72b4ed95b71c627c194ab6bcb9b83adb2280e8a0320bb8476. +// +// Solidity: event Set(address indexed user, uint256 pid, uint256 allocPoint) +func (_MasterChefv2 *MasterChefv2Filterer) FilterSet(opts *bind.FilterOpts, user []common.Address) (*MasterChefv2SetIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + + logs, sub, err := _MasterChefv2.contract.FilterLogs(opts, "Set", userRule) + if err != nil { + return nil, err + } + return &MasterChefv2SetIterator{contract: _MasterChefv2.contract, event: "Set", logs: logs, sub: sub}, nil +} + +// WatchSet is a free log subscription operation binding the contract event 0x9eca8f7bcfb868d72b4ed95b71c627c194ab6bcb9b83adb2280e8a0320bb8476. +// +// Solidity: event Set(address indexed user, uint256 pid, uint256 allocPoint) +func (_MasterChefv2 *MasterChefv2Filterer) WatchSet(opts *bind.WatchOpts, sink chan<- *MasterChefv2Set, user []common.Address) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + + logs, sub, err := _MasterChefv2.contract.WatchLogs(opts, "Set", userRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterChefv2Set) + if err := _MasterChefv2.contract.UnpackLog(event, "Set", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSet is a log parse operation binding the contract event 0x9eca8f7bcfb868d72b4ed95b71c627c194ab6bcb9b83adb2280e8a0320bb8476. +// +// Solidity: event Set(address indexed user, uint256 pid, uint256 allocPoint) +func (_MasterChefv2 *MasterChefv2Filterer) ParseSet(log types.Log) (*MasterChefv2Set, error) { + event := new(MasterChefv2Set) + if err := _MasterChefv2.contract.UnpackLog(event, "Set", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterChefv2SetDevAddressIterator is returned from FilterSetDevAddress and is used to iterate over the raw logs and unpacked data for SetDevAddress events raised by the MasterChefv2 contract. +type MasterChefv2SetDevAddressIterator struct { + Event *MasterChefv2SetDevAddress // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterChefv2SetDevAddressIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterChefv2SetDevAddress) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterChefv2SetDevAddress) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterChefv2SetDevAddressIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterChefv2SetDevAddressIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterChefv2SetDevAddress represents a SetDevAddress event raised by the MasterChefv2 contract. +type MasterChefv2SetDevAddress struct { + User common.Address + NewAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetDevAddress is a free log retrieval operation binding the contract event 0x618c54559e94f1499a808aad71ee8729f8e74e8c48e979616328ce493a1a52e7. +// +// Solidity: event SetDevAddress(address indexed user, address indexed newAddress) +func (_MasterChefv2 *MasterChefv2Filterer) FilterSetDevAddress(opts *bind.FilterOpts, user []common.Address, newAddress []common.Address) (*MasterChefv2SetDevAddressIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var newAddressRule []interface{} + for _, newAddressItem := range newAddress { + newAddressRule = append(newAddressRule, newAddressItem) + } + + logs, sub, err := _MasterChefv2.contract.FilterLogs(opts, "SetDevAddress", userRule, newAddressRule) + if err != nil { + return nil, err + } + return &MasterChefv2SetDevAddressIterator{contract: _MasterChefv2.contract, event: "SetDevAddress", logs: logs, sub: sub}, nil +} + +// WatchSetDevAddress is a free log subscription operation binding the contract event 0x618c54559e94f1499a808aad71ee8729f8e74e8c48e979616328ce493a1a52e7. +// +// Solidity: event SetDevAddress(address indexed user, address indexed newAddress) +func (_MasterChefv2 *MasterChefv2Filterer) WatchSetDevAddress(opts *bind.WatchOpts, sink chan<- *MasterChefv2SetDevAddress, user []common.Address, newAddress []common.Address) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var newAddressRule []interface{} + for _, newAddressItem := range newAddress { + newAddressRule = append(newAddressRule, newAddressItem) + } + + logs, sub, err := _MasterChefv2.contract.WatchLogs(opts, "SetDevAddress", userRule, newAddressRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterChefv2SetDevAddress) + if err := _MasterChefv2.contract.UnpackLog(event, "SetDevAddress", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSetDevAddress is a log parse operation binding the contract event 0x618c54559e94f1499a808aad71ee8729f8e74e8c48e979616328ce493a1a52e7. +// +// Solidity: event SetDevAddress(address indexed user, address indexed newAddress) +func (_MasterChefv2 *MasterChefv2Filterer) ParseSetDevAddress(log types.Log) (*MasterChefv2SetDevAddress, error) { + event := new(MasterChefv2SetDevAddress) + if err := _MasterChefv2.contract.UnpackLog(event, "SetDevAddress", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterChefv2SetPawTransferOwnerIterator is returned from FilterSetPawTransferOwner and is used to iterate over the raw logs and unpacked data for SetPawTransferOwner events raised by the MasterChefv2 contract. +type MasterChefv2SetPawTransferOwnerIterator struct { + Event *MasterChefv2SetPawTransferOwner // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterChefv2SetPawTransferOwnerIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterChefv2SetPawTransferOwner) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterChefv2SetPawTransferOwner) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterChefv2SetPawTransferOwnerIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterChefv2SetPawTransferOwnerIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterChefv2SetPawTransferOwner represents a SetPawTransferOwner event raised by the MasterChefv2 contract. +type MasterChefv2SetPawTransferOwner struct { + User common.Address + PawTransferOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetPawTransferOwner is a free log retrieval operation binding the contract event 0x6923fdade0c8bfd1a00326632b7dbeb58e8275f6254c27e632b5d8b5664926ac. +// +// Solidity: event SetPawTransferOwner(address indexed user, address indexed pawTransferOwner) +func (_MasterChefv2 *MasterChefv2Filterer) FilterSetPawTransferOwner(opts *bind.FilterOpts, user []common.Address, pawTransferOwner []common.Address) (*MasterChefv2SetPawTransferOwnerIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pawTransferOwnerRule []interface{} + for _, pawTransferOwnerItem := range pawTransferOwner { + pawTransferOwnerRule = append(pawTransferOwnerRule, pawTransferOwnerItem) + } + + logs, sub, err := _MasterChefv2.contract.FilterLogs(opts, "SetPawTransferOwner", userRule, pawTransferOwnerRule) + if err != nil { + return nil, err + } + return &MasterChefv2SetPawTransferOwnerIterator{contract: _MasterChefv2.contract, event: "SetPawTransferOwner", logs: logs, sub: sub}, nil +} + +// WatchSetPawTransferOwner is a free log subscription operation binding the contract event 0x6923fdade0c8bfd1a00326632b7dbeb58e8275f6254c27e632b5d8b5664926ac. +// +// Solidity: event SetPawTransferOwner(address indexed user, address indexed pawTransferOwner) +func (_MasterChefv2 *MasterChefv2Filterer) WatchSetPawTransferOwner(opts *bind.WatchOpts, sink chan<- *MasterChefv2SetPawTransferOwner, user []common.Address, pawTransferOwner []common.Address) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pawTransferOwnerRule []interface{} + for _, pawTransferOwnerItem := range pawTransferOwner { + pawTransferOwnerRule = append(pawTransferOwnerRule, pawTransferOwnerItem) + } + + logs, sub, err := _MasterChefv2.contract.WatchLogs(opts, "SetPawTransferOwner", userRule, pawTransferOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterChefv2SetPawTransferOwner) + if err := _MasterChefv2.contract.UnpackLog(event, "SetPawTransferOwner", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSetPawTransferOwner is a log parse operation binding the contract event 0x6923fdade0c8bfd1a00326632b7dbeb58e8275f6254c27e632b5d8b5664926ac. +// +// Solidity: event SetPawTransferOwner(address indexed user, address indexed pawTransferOwner) +func (_MasterChefv2 *MasterChefv2Filterer) ParseSetPawTransferOwner(log types.Log) (*MasterChefv2SetPawTransferOwner, error) { + event := new(MasterChefv2SetPawTransferOwner) + if err := _MasterChefv2.contract.UnpackLog(event, "SetPawTransferOwner", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterChefv2TransferPawOwnershipIterator is returned from FilterTransferPawOwnership and is used to iterate over the raw logs and unpacked data for TransferPawOwnership events raised by the MasterChefv2 contract. +type MasterChefv2TransferPawOwnershipIterator struct { + Event *MasterChefv2TransferPawOwnership // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterChefv2TransferPawOwnershipIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterChefv2TransferPawOwnership) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterChefv2TransferPawOwnership) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterChefv2TransferPawOwnershipIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterChefv2TransferPawOwnershipIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterChefv2TransferPawOwnership represents a TransferPawOwnership event raised by the MasterChefv2 contract. +type MasterChefv2TransferPawOwnership struct { + User common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransferPawOwnership is a free log retrieval operation binding the contract event 0x95f576ca0d78332f26c87a49af9a697d3cb1565d0f3621d8312d6dd3b80de8da. +// +// Solidity: event TransferPawOwnership(address indexed user, address indexed newOwner) +func (_MasterChefv2 *MasterChefv2Filterer) FilterTransferPawOwnership(opts *bind.FilterOpts, user []common.Address, newOwner []common.Address) (*MasterChefv2TransferPawOwnershipIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _MasterChefv2.contract.FilterLogs(opts, "TransferPawOwnership", userRule, newOwnerRule) + if err != nil { + return nil, err + } + return &MasterChefv2TransferPawOwnershipIterator{contract: _MasterChefv2.contract, event: "TransferPawOwnership", logs: logs, sub: sub}, nil +} + +// WatchTransferPawOwnership is a free log subscription operation binding the contract event 0x95f576ca0d78332f26c87a49af9a697d3cb1565d0f3621d8312d6dd3b80de8da. +// +// Solidity: event TransferPawOwnership(address indexed user, address indexed newOwner) +func (_MasterChefv2 *MasterChefv2Filterer) WatchTransferPawOwnership(opts *bind.WatchOpts, sink chan<- *MasterChefv2TransferPawOwnership, user []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _MasterChefv2.contract.WatchLogs(opts, "TransferPawOwnership", userRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterChefv2TransferPawOwnership) + if err := _MasterChefv2.contract.UnpackLog(event, "TransferPawOwnership", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTransferPawOwnership is a log parse operation binding the contract event 0x95f576ca0d78332f26c87a49af9a697d3cb1565d0f3621d8312d6dd3b80de8da. +// +// Solidity: event TransferPawOwnership(address indexed user, address indexed newOwner) +func (_MasterChefv2 *MasterChefv2Filterer) ParseTransferPawOwnership(log types.Log) (*MasterChefv2TransferPawOwnership, error) { + event := new(MasterChefv2TransferPawOwnership) + if err := _MasterChefv2.contract.UnpackLog(event, "TransferPawOwnership", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterChefv2UpdateEmissionRateIterator is returned from FilterUpdateEmissionRate and is used to iterate over the raw logs and unpacked data for UpdateEmissionRate events raised by the MasterChefv2 contract. +type MasterChefv2UpdateEmissionRateIterator struct { + Event *MasterChefv2UpdateEmissionRate // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterChefv2UpdateEmissionRateIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterChefv2UpdateEmissionRate) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterChefv2UpdateEmissionRate) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterChefv2UpdateEmissionRateIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterChefv2UpdateEmissionRateIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterChefv2UpdateEmissionRate represents a UpdateEmissionRate event raised by the MasterChefv2 contract. +type MasterChefv2UpdateEmissionRate struct { + User common.Address + PawPerBlock *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpdateEmissionRate is a free log retrieval operation binding the contract event 0xe2492e003bbe8afa53088b406f0c1cb5d9e280370fc72a74cf116ffd343c4053. +// +// Solidity: event UpdateEmissionRate(address indexed user, uint256 pawPerBlock) +func (_MasterChefv2 *MasterChefv2Filterer) FilterUpdateEmissionRate(opts *bind.FilterOpts, user []common.Address) (*MasterChefv2UpdateEmissionRateIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + + logs, sub, err := _MasterChefv2.contract.FilterLogs(opts, "UpdateEmissionRate", userRule) + if err != nil { + return nil, err + } + return &MasterChefv2UpdateEmissionRateIterator{contract: _MasterChefv2.contract, event: "UpdateEmissionRate", logs: logs, sub: sub}, nil +} + +// WatchUpdateEmissionRate is a free log subscription operation binding the contract event 0xe2492e003bbe8afa53088b406f0c1cb5d9e280370fc72a74cf116ffd343c4053. +// +// Solidity: event UpdateEmissionRate(address indexed user, uint256 pawPerBlock) +func (_MasterChefv2 *MasterChefv2Filterer) WatchUpdateEmissionRate(opts *bind.WatchOpts, sink chan<- *MasterChefv2UpdateEmissionRate, user []common.Address) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + + logs, sub, err := _MasterChefv2.contract.WatchLogs(opts, "UpdateEmissionRate", userRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterChefv2UpdateEmissionRate) + if err := _MasterChefv2.contract.UnpackLog(event, "UpdateEmissionRate", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUpdateEmissionRate is a log parse operation binding the contract event 0xe2492e003bbe8afa53088b406f0c1cb5d9e280370fc72a74cf116ffd343c4053. +// +// Solidity: event UpdateEmissionRate(address indexed user, uint256 pawPerBlock) +func (_MasterChefv2 *MasterChefv2Filterer) ParseUpdateEmissionRate(log types.Log) (*MasterChefv2UpdateEmissionRate, error) { + event := new(MasterChefv2UpdateEmissionRate) + if err := _MasterChefv2.contract.UnpackLog(event, "UpdateEmissionRate", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterChefv2WithdrawIterator is returned from FilterWithdraw and is used to iterate over the raw logs and unpacked data for Withdraw events raised by the MasterChefv2 contract. +type MasterChefv2WithdrawIterator struct { + Event *MasterChefv2Withdraw // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MasterChefv2WithdrawIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MasterChefv2Withdraw) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MasterChefv2Withdraw) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MasterChefv2WithdrawIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterChefv2WithdrawIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterChefv2Withdraw represents a Withdraw event raised by the MasterChefv2 contract. +type MasterChefv2Withdraw struct { + User common.Address + Pid *big.Int + Amount *big.Int + Harvest bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdraw is a free log retrieval operation binding the contract event 0xb97e775637eca8401af330efee0810af7079bafae27761741e09caa14db8d272. +// +// Solidity: event Withdraw(address indexed user, uint256 indexed pid, uint256 amount, bool harvest) +func (_MasterChefv2 *MasterChefv2Filterer) FilterWithdraw(opts *bind.FilterOpts, user []common.Address, pid []*big.Int) (*MasterChefv2WithdrawIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pidRule []interface{} + for _, pidItem := range pid { + pidRule = append(pidRule, pidItem) + } + + logs, sub, err := _MasterChefv2.contract.FilterLogs(opts, "Withdraw", userRule, pidRule) + if err != nil { + return nil, err + } + return &MasterChefv2WithdrawIterator{contract: _MasterChefv2.contract, event: "Withdraw", logs: logs, sub: sub}, nil +} + +// WatchWithdraw is a free log subscription operation binding the contract event 0xb97e775637eca8401af330efee0810af7079bafae27761741e09caa14db8d272. +// +// Solidity: event Withdraw(address indexed user, uint256 indexed pid, uint256 amount, bool harvest) +func (_MasterChefv2 *MasterChefv2Filterer) WatchWithdraw(opts *bind.WatchOpts, sink chan<- *MasterChefv2Withdraw, user []common.Address, pid []*big.Int) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pidRule []interface{} + for _, pidItem := range pid { + pidRule = append(pidRule, pidItem) + } + + logs, sub, err := _MasterChefv2.contract.WatchLogs(opts, "Withdraw", userRule, pidRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MasterChefv2Withdraw) + if err := _MasterChefv2.contract.UnpackLog(event, "Withdraw", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseWithdraw is a log parse operation binding the contract event 0xb97e775637eca8401af330efee0810af7079bafae27761741e09caa14db8d272. +// +// Solidity: event Withdraw(address indexed user, uint256 indexed pid, uint256 amount, bool harvest) +func (_MasterChefv2 *MasterChefv2Filterer) ParseWithdraw(log types.Log) (*MasterChefv2Withdraw, error) { + event := new(MasterChefv2Withdraw) + if err := _MasterChefv2.contract.UnpackLog(event, "Withdraw", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/polycat/contracts/pawv2.abi b/polycat/contracts/pawv2.abi new file mode 100644 index 0000000..9eb305d --- /dev/null +++ b/polycat/contracts/pawv2.abi @@ -0,0 +1 @@ +[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/polycat/contracts/pawv2.go b/polycat/contracts/pawv2.go new file mode 100644 index 0000000..db8cf99 --- /dev/null +++ b/polycat/contracts/pawv2.go @@ -0,0 +1,1039 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contracts + +import ( + "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 ( + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// PawV2ABI is the input ABI used to generate the binding from. +const PawV2ABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"migrate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + +// PawV2 is an auto generated Go binding around an Ethereum contract. +type PawV2 struct { + PawV2Caller // Read-only binding to the contract + PawV2Transactor // Write-only binding to the contract + PawV2Filterer // Log filterer for contract events +} + +// PawV2Caller is an auto generated read-only Go binding around an Ethereum contract. +type PawV2Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PawV2Transactor is an auto generated write-only Go binding around an Ethereum contract. +type PawV2Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PawV2Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type PawV2Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PawV2Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type PawV2Session struct { + Contract *PawV2 // 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 +} + +// PawV2CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type PawV2CallerSession struct { + Contract *PawV2Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// PawV2TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type PawV2TransactorSession struct { + Contract *PawV2Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// PawV2Raw is an auto generated low-level Go binding around an Ethereum contract. +type PawV2Raw struct { + Contract *PawV2 // Generic contract binding to access the raw methods on +} + +// PawV2CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type PawV2CallerRaw struct { + Contract *PawV2Caller // Generic read-only contract binding to access the raw methods on +} + +// PawV2TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type PawV2TransactorRaw struct { + Contract *PawV2Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewPawV2 creates a new instance of PawV2, bound to a specific deployed contract. +func NewPawV2(address common.Address, backend bind.ContractBackend) (*PawV2, error) { + contract, err := bindPawV2(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &PawV2{PawV2Caller: PawV2Caller{contract: contract}, PawV2Transactor: PawV2Transactor{contract: contract}, PawV2Filterer: PawV2Filterer{contract: contract}}, nil +} + +// NewPawV2Caller creates a new read-only instance of PawV2, bound to a specific deployed contract. +func NewPawV2Caller(address common.Address, caller bind.ContractCaller) (*PawV2Caller, error) { + contract, err := bindPawV2(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &PawV2Caller{contract: contract}, nil +} + +// NewPawV2Transactor creates a new write-only instance of PawV2, bound to a specific deployed contract. +func NewPawV2Transactor(address common.Address, transactor bind.ContractTransactor) (*PawV2Transactor, error) { + contract, err := bindPawV2(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &PawV2Transactor{contract: contract}, nil +} + +// NewPawV2Filterer creates a new log filterer instance of PawV2, bound to a specific deployed contract. +func NewPawV2Filterer(address common.Address, filterer bind.ContractFilterer) (*PawV2Filterer, error) { + contract, err := bindPawV2(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &PawV2Filterer{contract: contract}, nil +} + +// bindPawV2 binds a generic wrapper to an already deployed contract. +func bindPawV2(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(PawV2ABI)) + 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 (_PawV2 *PawV2Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _PawV2.Contract.PawV2Caller.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 (_PawV2 *PawV2Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _PawV2.Contract.PawV2Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_PawV2 *PawV2Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _PawV2.Contract.PawV2Transactor.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 (_PawV2 *PawV2CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _PawV2.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 (_PawV2 *PawV2TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _PawV2.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_PawV2 *PawV2TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _PawV2.Contract.contract.Transact(opts, method, params...) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_PawV2 *PawV2Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { + var out []interface{} + err := _PawV2.contract.Call(opts, &out, "allowance", owner, spender) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_PawV2 *PawV2Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _PawV2.Contract.Allowance(&_PawV2.CallOpts, owner, spender) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_PawV2 *PawV2CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _PawV2.Contract.Allowance(&_PawV2.CallOpts, owner, spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_PawV2 *PawV2Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { + var out []interface{} + err := _PawV2.contract.Call(opts, &out, "balanceOf", account) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_PawV2 *PawV2Session) BalanceOf(account common.Address) (*big.Int, error) { + return _PawV2.Contract.BalanceOf(&_PawV2.CallOpts, account) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_PawV2 *PawV2CallerSession) BalanceOf(account common.Address) (*big.Int, error) { + return _PawV2.Contract.BalanceOf(&_PawV2.CallOpts, account) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_PawV2 *PawV2Caller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _PawV2.contract.Call(opts, &out, "decimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_PawV2 *PawV2Session) Decimals() (uint8, error) { + return _PawV2.Contract.Decimals(&_PawV2.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_PawV2 *PawV2CallerSession) Decimals() (uint8, error) { + return _PawV2.Contract.Decimals(&_PawV2.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_PawV2 *PawV2Caller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _PawV2.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_PawV2 *PawV2Session) Name() (string, error) { + return _PawV2.Contract.Name(&_PawV2.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_PawV2 *PawV2CallerSession) Name() (string, error) { + return _PawV2.Contract.Name(&_PawV2.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_PawV2 *PawV2Caller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _PawV2.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_PawV2 *PawV2Session) Owner() (common.Address, error) { + return _PawV2.Contract.Owner(&_PawV2.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_PawV2 *PawV2CallerSession) Owner() (common.Address, error) { + return _PawV2.Contract.Owner(&_PawV2.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_PawV2 *PawV2Caller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _PawV2.contract.Call(opts, &out, "symbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_PawV2 *PawV2Session) Symbol() (string, error) { + return _PawV2.Contract.Symbol(&_PawV2.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_PawV2 *PawV2CallerSession) Symbol() (string, error) { + return _PawV2.Contract.Symbol(&_PawV2.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_PawV2 *PawV2Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _PawV2.contract.Call(opts, &out, "totalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_PawV2 *PawV2Session) TotalSupply() (*big.Int, error) { + return _PawV2.Contract.TotalSupply(&_PawV2.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_PawV2 *PawV2CallerSession) TotalSupply() (*big.Int, error) { + return _PawV2.Contract.TotalSupply(&_PawV2.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 amount) returns(bool) +func (_PawV2 *PawV2Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { + return _PawV2.contract.Transact(opts, "approve", spender, amount) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 amount) returns(bool) +func (_PawV2 *PawV2Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { + return _PawV2.Contract.Approve(&_PawV2.TransactOpts, spender, amount) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 amount) returns(bool) +func (_PawV2 *PawV2TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { + return _PawV2.Contract.Approve(&_PawV2.TransactOpts, spender, amount) +} + +// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. +// +// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) +func (_PawV2 *PawV2Transactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { + return _PawV2.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) +} + +// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. +// +// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) +func (_PawV2 *PawV2Session) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { + return _PawV2.Contract.DecreaseAllowance(&_PawV2.TransactOpts, spender, subtractedValue) +} + +// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. +// +// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) +func (_PawV2 *PawV2TransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { + return _PawV2.Contract.DecreaseAllowance(&_PawV2.TransactOpts, spender, subtractedValue) +} + +// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. +// +// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) +func (_PawV2 *PawV2Transactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { + return _PawV2.contract.Transact(opts, "increaseAllowance", spender, addedValue) +} + +// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. +// +// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) +func (_PawV2 *PawV2Session) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { + return _PawV2.Contract.IncreaseAllowance(&_PawV2.TransactOpts, spender, addedValue) +} + +// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. +// +// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) +func (_PawV2 *PawV2TransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { + return _PawV2.Contract.IncreaseAllowance(&_PawV2.TransactOpts, spender, addedValue) +} + +// Migrate is a paid mutator transaction binding the contract method 0x8fd3ab80. +// +// Solidity: function migrate() returns() +func (_PawV2 *PawV2Transactor) Migrate(opts *bind.TransactOpts) (*types.Transaction, error) { + return _PawV2.contract.Transact(opts, "migrate") +} + +// Migrate is a paid mutator transaction binding the contract method 0x8fd3ab80. +// +// Solidity: function migrate() returns() +func (_PawV2 *PawV2Session) Migrate() (*types.Transaction, error) { + return _PawV2.Contract.Migrate(&_PawV2.TransactOpts) +} + +// Migrate is a paid mutator transaction binding the contract method 0x8fd3ab80. +// +// Solidity: function migrate() returns() +func (_PawV2 *PawV2TransactorSession) Migrate() (*types.Transaction, error) { + return _PawV2.Contract.Migrate(&_PawV2.TransactOpts) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address _to, uint256 _amount) returns() +func (_PawV2 *PawV2Transactor) Mint(opts *bind.TransactOpts, _to common.Address, _amount *big.Int) (*types.Transaction, error) { + return _PawV2.contract.Transact(opts, "mint", _to, _amount) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address _to, uint256 _amount) returns() +func (_PawV2 *PawV2Session) Mint(_to common.Address, _amount *big.Int) (*types.Transaction, error) { + return _PawV2.Contract.Mint(&_PawV2.TransactOpts, _to, _amount) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address _to, uint256 _amount) returns() +func (_PawV2 *PawV2TransactorSession) Mint(_to common.Address, _amount *big.Int) (*types.Transaction, error) { + return _PawV2.Contract.Mint(&_PawV2.TransactOpts, _to, _amount) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_PawV2 *PawV2Transactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _PawV2.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_PawV2 *PawV2Session) RenounceOwnership() (*types.Transaction, error) { + return _PawV2.Contract.RenounceOwnership(&_PawV2.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_PawV2 *PawV2TransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _PawV2.Contract.RenounceOwnership(&_PawV2.TransactOpts) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address recipient, uint256 amount) returns(bool) +func (_PawV2 *PawV2Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _PawV2.contract.Transact(opts, "transfer", recipient, amount) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address recipient, uint256 amount) returns(bool) +func (_PawV2 *PawV2Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _PawV2.Contract.Transfer(&_PawV2.TransactOpts, recipient, amount) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address recipient, uint256 amount) returns(bool) +func (_PawV2 *PawV2TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _PawV2.Contract.Transfer(&_PawV2.TransactOpts, recipient, amount) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) +func (_PawV2 *PawV2Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _PawV2.contract.Transact(opts, "transferFrom", sender, recipient, amount) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) +func (_PawV2 *PawV2Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _PawV2.Contract.TransferFrom(&_PawV2.TransactOpts, sender, recipient, amount) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) +func (_PawV2 *PawV2TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _PawV2.Contract.TransferFrom(&_PawV2.TransactOpts, sender, recipient, amount) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_PawV2 *PawV2Transactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _PawV2.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_PawV2 *PawV2Session) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _PawV2.Contract.TransferOwnership(&_PawV2.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_PawV2 *PawV2TransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _PawV2.Contract.TransferOwnership(&_PawV2.TransactOpts, newOwner) +} + +// PawV2ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the PawV2 contract. +type PawV2ApprovalIterator struct { + Event *PawV2Approval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PawV2ApprovalIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(PawV2Approval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(PawV2Approval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *PawV2ApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PawV2ApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PawV2Approval represents a Approval event raised by the PawV2 contract. +type PawV2Approval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_PawV2 *PawV2Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*PawV2ApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _PawV2.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &PawV2ApprovalIterator{contract: _PawV2.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_PawV2 *PawV2Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *PawV2Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _PawV2.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PawV2Approval) + if err := _PawV2.contract.UnpackLog(event, "Approval", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_PawV2 *PawV2Filterer) ParseApproval(log types.Log) (*PawV2Approval, error) { + event := new(PawV2Approval) + if err := _PawV2.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// PawV2OwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the PawV2 contract. +type PawV2OwnershipTransferredIterator struct { + Event *PawV2OwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PawV2OwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(PawV2OwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(PawV2OwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *PawV2OwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PawV2OwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PawV2OwnershipTransferred represents a OwnershipTransferred event raised by the PawV2 contract. +type PawV2OwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_PawV2 *PawV2Filterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*PawV2OwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _PawV2.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &PawV2OwnershipTransferredIterator{contract: _PawV2.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_PawV2 *PawV2Filterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *PawV2OwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _PawV2.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PawV2OwnershipTransferred) + if err := _PawV2.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_PawV2 *PawV2Filterer) ParseOwnershipTransferred(log types.Log) (*PawV2OwnershipTransferred, error) { + event := new(PawV2OwnershipTransferred) + if err := _PawV2.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// PawV2TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the PawV2 contract. +type PawV2TransferIterator struct { + Event *PawV2Transfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PawV2TransferIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(PawV2Transfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(PawV2Transfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *PawV2TransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PawV2TransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PawV2Transfer represents a Transfer event raised by the PawV2 contract. +type PawV2Transfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_PawV2 *PawV2Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*PawV2TransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _PawV2.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &PawV2TransferIterator{contract: _PawV2.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_PawV2 *PawV2Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *PawV2Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _PawV2.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PawV2Transfer) + if err := _PawV2.contract.UnpackLog(event, "Transfer", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_PawV2 *PawV2Filterer) ParseTransfer(log types.Log) (*PawV2Transfer, error) { + event := new(PawV2Transfer) + if err := _PawV2.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/polycat/contracts/rewardlocker.abi b/polycat/contracts/rewardlocker.abi new file mode 100644 index 0000000..1278b4f --- /dev/null +++ b/polycat/contracts/rewardlocker.abi @@ -0,0 +1 @@ +[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"rewardContract","type":"address"},{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"bool","name":"isAdded","type":"bool"}],"name":"RewardContractAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"uint64","name":"vestingDuration","type":"uint64"}],"name":"SetVestingDuration","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"size","type":"uint256"}],"name":"UpdateMaxContractSize","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalVesting","type":"uint256"}],"name":"Vest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"vestedQuantity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"Vested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"startBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"VestingEntryCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"VestingEntryQueued","type":"event"},{"inputs":[],"name":"MAX_REWARD_CONTRACTS_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"contract IERC20","name":"","type":"address"}],"name":"accountEscrowedBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"contract IERC20","name":"","type":"address"}],"name":"accountVestedBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"_rewardContract","type":"address"}],"name":"addRewardsContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"getRewardContractsPerToken","outputs":[{"internalType":"address[]","name":"rewardContracts","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getVestingScheduleAtIndex","outputs":[{"components":[{"internalType":"uint64","name":"startBlock","type":"uint64"},{"internalType":"uint64","name":"endBlock","type":"uint64"},{"internalType":"uint128","name":"quantity","type":"uint128"},{"internalType":"uint128","name":"vestedQuantity","type":"uint128"}],"internalType":"struct IRewardLocker.VestingSchedule","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"getVestingSchedules","outputs":[{"components":[{"internalType":"uint64","name":"startBlock","type":"uint64"},{"internalType":"uint64","name":"endBlock","type":"uint64"},{"internalType":"uint128","name":"quantity","type":"uint128"},{"internalType":"uint128","name":"vestedQuantity","type":"uint128"}],"internalType":"struct IRewardLocker.VestingSchedule[]","name":"schedules","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"lock","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"startBlock","type":"uint256"}],"name":"lockWithStartBlock","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"numVestingSchedules","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"_rewardContract","type":"address"}],"name":"removeRewardsContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint64","name":"_vestingDuration","type":"uint64"}],"name":"setVestingDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_size","type":"uint256"}],"name":"updateMaxContractSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"vestCompletedSchedules","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20[]","name":"tokens","type":"address[]"}],"name":"vestCompletedSchedulesForMultipleTokens","outputs":[{"internalType":"uint256[]","name":"vestedAmounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256[]","name":"indexes","type":"uint256[]"}],"name":"vestScheduleAtIndices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20[]","name":"tokens","type":"address[]"},{"internalType":"uint256[][]","name":"indices","type":"uint256[][]"}],"name":"vestScheduleForMultipleTokensAtIndices","outputs":[{"internalType":"uint256[]","name":"vestedAmounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"startIndex","type":"uint256"},{"internalType":"uint256","name":"endIndex","type":"uint256"}],"name":"vestSchedulesInRange","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"name":"vestingDurationPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}] \ No newline at end of file diff --git a/polycat/contracts/rewardlocker.go b/polycat/contracts/rewardlocker.go new file mode 100644 index 0000000..641575c --- /dev/null +++ b/polycat/contracts/rewardlocker.go @@ -0,0 +1,1938 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contracts + +import ( + "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 ( + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// IRewardLockerVestingSchedule is an auto generated low-level Go binding around an user-defined struct. +type IRewardLockerVestingSchedule struct { + StartBlock uint64 + EndBlock uint64 + Quantity *big.Int + VestedQuantity *big.Int +} + +// RewardLockerABI is the input ABI used to generate the binding from. +const RewardLockerABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"rewardContract\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isAdded\",\"type\":\"bool\"}],\"name\":\"RewardContractAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"vestingDuration\",\"type\":\"uint64\"}],\"name\":\"SetVestingDuration\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"name\":\"UpdateMaxContractSize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalVesting\",\"type\":\"uint256\"}],\"name\":\"Vest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"vestedQuantity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"Vested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"startBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"endBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"VestingEntryCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"name\":\"VestingEntryQueued\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_REWARD_CONTRACTS_SIZE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"accountEscrowedBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"accountVestedBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_rewardContract\",\"type\":\"address\"}],\"name\":\"addRewardsContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getRewardContractsPerToken\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"rewardContracts\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getVestingScheduleAtIndex\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"startBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"endBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint128\",\"name\":\"quantity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"vestedQuantity\",\"type\":\"uint128\"}],\"internalType\":\"structIRewardLocker.VestingSchedule\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getVestingSchedules\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"startBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"endBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint128\",\"name\":\"quantity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"vestedQuantity\",\"type\":\"uint128\"}],\"internalType\":\"structIRewardLocker.VestingSchedule[]\",\"name\":\"schedules\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"name\":\"lock\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"startBlock\",\"type\":\"uint256\"}],\"name\":\"lockWithStartBlock\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"numVestingSchedules\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_rewardContract\",\"type\":\"address\"}],\"name\":\"removeRewardsContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_vestingDuration\",\"type\":\"uint64\"}],\"name\":\"setVestingDuration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_size\",\"type\":\"uint256\"}],\"name\":\"updateMaxContractSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"vestCompletedSchedules\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"vestCompletedSchedulesForMultipleTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"vestedAmounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"indexes\",\"type\":\"uint256[]\"}],\"name\":\"vestScheduleAtIndices\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"indices\",\"type\":\"uint256[][]\"}],\"name\":\"vestScheduleForMultipleTokensAtIndices\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"vestedAmounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endIndex\",\"type\":\"uint256\"}],\"name\":\"vestSchedulesInRange\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"vestingDurationPerToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]" + +// RewardLocker is an auto generated Go binding around an Ethereum contract. +type RewardLocker struct { + RewardLockerCaller // Read-only binding to the contract + RewardLockerTransactor // Write-only binding to the contract + RewardLockerFilterer // Log filterer for contract events +} + +// RewardLockerCaller is an auto generated read-only Go binding around an Ethereum contract. +type RewardLockerCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// RewardLockerTransactor is an auto generated write-only Go binding around an Ethereum contract. +type RewardLockerTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// RewardLockerFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type RewardLockerFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// RewardLockerSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type RewardLockerSession struct { + Contract *RewardLocker // 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 +} + +// RewardLockerCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type RewardLockerCallerSession struct { + Contract *RewardLockerCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// RewardLockerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type RewardLockerTransactorSession struct { + Contract *RewardLockerTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// RewardLockerRaw is an auto generated low-level Go binding around an Ethereum contract. +type RewardLockerRaw struct { + Contract *RewardLocker // Generic contract binding to access the raw methods on +} + +// RewardLockerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type RewardLockerCallerRaw struct { + Contract *RewardLockerCaller // Generic read-only contract binding to access the raw methods on +} + +// RewardLockerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type RewardLockerTransactorRaw struct { + Contract *RewardLockerTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewRewardLocker creates a new instance of RewardLocker, bound to a specific deployed contract. +func NewRewardLocker(address common.Address, backend bind.ContractBackend) (*RewardLocker, error) { + contract, err := bindRewardLocker(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &RewardLocker{RewardLockerCaller: RewardLockerCaller{contract: contract}, RewardLockerTransactor: RewardLockerTransactor{contract: contract}, RewardLockerFilterer: RewardLockerFilterer{contract: contract}}, nil +} + +// NewRewardLockerCaller creates a new read-only instance of RewardLocker, bound to a specific deployed contract. +func NewRewardLockerCaller(address common.Address, caller bind.ContractCaller) (*RewardLockerCaller, error) { + contract, err := bindRewardLocker(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &RewardLockerCaller{contract: contract}, nil +} + +// NewRewardLockerTransactor creates a new write-only instance of RewardLocker, bound to a specific deployed contract. +func NewRewardLockerTransactor(address common.Address, transactor bind.ContractTransactor) (*RewardLockerTransactor, error) { + contract, err := bindRewardLocker(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &RewardLockerTransactor{contract: contract}, nil +} + +// NewRewardLockerFilterer creates a new log filterer instance of RewardLocker, bound to a specific deployed contract. +func NewRewardLockerFilterer(address common.Address, filterer bind.ContractFilterer) (*RewardLockerFilterer, error) { + contract, err := bindRewardLocker(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &RewardLockerFilterer{contract: contract}, nil +} + +// bindRewardLocker binds a generic wrapper to an already deployed contract. +func bindRewardLocker(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(RewardLockerABI)) + 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 (_RewardLocker *RewardLockerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _RewardLocker.Contract.RewardLockerCaller.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 (_RewardLocker *RewardLockerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _RewardLocker.Contract.RewardLockerTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_RewardLocker *RewardLockerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _RewardLocker.Contract.RewardLockerTransactor.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 (_RewardLocker *RewardLockerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _RewardLocker.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 (_RewardLocker *RewardLockerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _RewardLocker.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_RewardLocker *RewardLockerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _RewardLocker.Contract.contract.Transact(opts, method, params...) +} + +// MAXREWARDCONTRACTSSIZE is a free data retrieval call binding the contract method 0xbe13849b. +// +// Solidity: function MAX_REWARD_CONTRACTS_SIZE() view returns(uint256) +func (_RewardLocker *RewardLockerCaller) MAXREWARDCONTRACTSSIZE(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _RewardLocker.contract.Call(opts, &out, "MAX_REWARD_CONTRACTS_SIZE") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MAXREWARDCONTRACTSSIZE is a free data retrieval call binding the contract method 0xbe13849b. +// +// Solidity: function MAX_REWARD_CONTRACTS_SIZE() view returns(uint256) +func (_RewardLocker *RewardLockerSession) MAXREWARDCONTRACTSSIZE() (*big.Int, error) { + return _RewardLocker.Contract.MAXREWARDCONTRACTSSIZE(&_RewardLocker.CallOpts) +} + +// MAXREWARDCONTRACTSSIZE is a free data retrieval call binding the contract method 0xbe13849b. +// +// Solidity: function MAX_REWARD_CONTRACTS_SIZE() view returns(uint256) +func (_RewardLocker *RewardLockerCallerSession) MAXREWARDCONTRACTSSIZE() (*big.Int, error) { + return _RewardLocker.Contract.MAXREWARDCONTRACTSSIZE(&_RewardLocker.CallOpts) +} + +// AccountEscrowedBalance is a free data retrieval call binding the contract method 0x6e732b70. +// +// Solidity: function accountEscrowedBalance(address , address ) view returns(uint256) +func (_RewardLocker *RewardLockerCaller) AccountEscrowedBalance(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error) { + var out []interface{} + err := _RewardLocker.contract.Call(opts, &out, "accountEscrowedBalance", arg0, arg1) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// AccountEscrowedBalance is a free data retrieval call binding the contract method 0x6e732b70. +// +// Solidity: function accountEscrowedBalance(address , address ) view returns(uint256) +func (_RewardLocker *RewardLockerSession) AccountEscrowedBalance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _RewardLocker.Contract.AccountEscrowedBalance(&_RewardLocker.CallOpts, arg0, arg1) +} + +// AccountEscrowedBalance is a free data retrieval call binding the contract method 0x6e732b70. +// +// Solidity: function accountEscrowedBalance(address , address ) view returns(uint256) +func (_RewardLocker *RewardLockerCallerSession) AccountEscrowedBalance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _RewardLocker.Contract.AccountEscrowedBalance(&_RewardLocker.CallOpts, arg0, arg1) +} + +// AccountVestedBalance is a free data retrieval call binding the contract method 0x3b5bfa8b. +// +// Solidity: function accountVestedBalance(address , address ) view returns(uint256) +func (_RewardLocker *RewardLockerCaller) AccountVestedBalance(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error) { + var out []interface{} + err := _RewardLocker.contract.Call(opts, &out, "accountVestedBalance", arg0, arg1) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// AccountVestedBalance is a free data retrieval call binding the contract method 0x3b5bfa8b. +// +// Solidity: function accountVestedBalance(address , address ) view returns(uint256) +func (_RewardLocker *RewardLockerSession) AccountVestedBalance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _RewardLocker.Contract.AccountVestedBalance(&_RewardLocker.CallOpts, arg0, arg1) +} + +// AccountVestedBalance is a free data retrieval call binding the contract method 0x3b5bfa8b. +// +// Solidity: function accountVestedBalance(address , address ) view returns(uint256) +func (_RewardLocker *RewardLockerCallerSession) AccountVestedBalance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _RewardLocker.Contract.AccountVestedBalance(&_RewardLocker.CallOpts, arg0, arg1) +} + +// GetRewardContractsPerToken is a free data retrieval call binding the contract method 0xbbd8a328. +// +// Solidity: function getRewardContractsPerToken(address token) view returns(address[] rewardContracts) +func (_RewardLocker *RewardLockerCaller) GetRewardContractsPerToken(opts *bind.CallOpts, token common.Address) ([]common.Address, error) { + var out []interface{} + err := _RewardLocker.contract.Call(opts, &out, "getRewardContractsPerToken", token) + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +// GetRewardContractsPerToken is a free data retrieval call binding the contract method 0xbbd8a328. +// +// Solidity: function getRewardContractsPerToken(address token) view returns(address[] rewardContracts) +func (_RewardLocker *RewardLockerSession) GetRewardContractsPerToken(token common.Address) ([]common.Address, error) { + return _RewardLocker.Contract.GetRewardContractsPerToken(&_RewardLocker.CallOpts, token) +} + +// GetRewardContractsPerToken is a free data retrieval call binding the contract method 0xbbd8a328. +// +// Solidity: function getRewardContractsPerToken(address token) view returns(address[] rewardContracts) +func (_RewardLocker *RewardLockerCallerSession) GetRewardContractsPerToken(token common.Address) ([]common.Address, error) { + return _RewardLocker.Contract.GetRewardContractsPerToken(&_RewardLocker.CallOpts, token) +} + +// GetVestingScheduleAtIndex is a free data retrieval call binding the contract method 0x0a3b7e31. +// +// Solidity: function getVestingScheduleAtIndex(address account, address token, uint256 index) view returns((uint64,uint64,uint128,uint128)) +func (_RewardLocker *RewardLockerCaller) GetVestingScheduleAtIndex(opts *bind.CallOpts, account common.Address, token common.Address, index *big.Int) (IRewardLockerVestingSchedule, error) { + var out []interface{} + err := _RewardLocker.contract.Call(opts, &out, "getVestingScheduleAtIndex", account, token, index) + + if err != nil { + return *new(IRewardLockerVestingSchedule), err + } + + out0 := *abi.ConvertType(out[0], new(IRewardLockerVestingSchedule)).(*IRewardLockerVestingSchedule) + + return out0, err + +} + +// GetVestingScheduleAtIndex is a free data retrieval call binding the contract method 0x0a3b7e31. +// +// Solidity: function getVestingScheduleAtIndex(address account, address token, uint256 index) view returns((uint64,uint64,uint128,uint128)) +func (_RewardLocker *RewardLockerSession) GetVestingScheduleAtIndex(account common.Address, token common.Address, index *big.Int) (IRewardLockerVestingSchedule, error) { + return _RewardLocker.Contract.GetVestingScheduleAtIndex(&_RewardLocker.CallOpts, account, token, index) +} + +// GetVestingScheduleAtIndex is a free data retrieval call binding the contract method 0x0a3b7e31. +// +// Solidity: function getVestingScheduleAtIndex(address account, address token, uint256 index) view returns((uint64,uint64,uint128,uint128)) +func (_RewardLocker *RewardLockerCallerSession) GetVestingScheduleAtIndex(account common.Address, token common.Address, index *big.Int) (IRewardLockerVestingSchedule, error) { + return _RewardLocker.Contract.GetVestingScheduleAtIndex(&_RewardLocker.CallOpts, account, token, index) +} + +// GetVestingSchedules is a free data retrieval call binding the contract method 0x2f50bd72. +// +// Solidity: function getVestingSchedules(address account, address token) view returns((uint64,uint64,uint128,uint128)[] schedules) +func (_RewardLocker *RewardLockerCaller) GetVestingSchedules(opts *bind.CallOpts, account common.Address, token common.Address) ([]IRewardLockerVestingSchedule, error) { + var out []interface{} + err := _RewardLocker.contract.Call(opts, &out, "getVestingSchedules", account, token) + + if err != nil { + return *new([]IRewardLockerVestingSchedule), err + } + + out0 := *abi.ConvertType(out[0], new([]IRewardLockerVestingSchedule)).(*[]IRewardLockerVestingSchedule) + + return out0, err + +} + +// GetVestingSchedules is a free data retrieval call binding the contract method 0x2f50bd72. +// +// Solidity: function getVestingSchedules(address account, address token) view returns((uint64,uint64,uint128,uint128)[] schedules) +func (_RewardLocker *RewardLockerSession) GetVestingSchedules(account common.Address, token common.Address) ([]IRewardLockerVestingSchedule, error) { + return _RewardLocker.Contract.GetVestingSchedules(&_RewardLocker.CallOpts, account, token) +} + +// GetVestingSchedules is a free data retrieval call binding the contract method 0x2f50bd72. +// +// Solidity: function getVestingSchedules(address account, address token) view returns((uint64,uint64,uint128,uint128)[] schedules) +func (_RewardLocker *RewardLockerCallerSession) GetVestingSchedules(account common.Address, token common.Address) ([]IRewardLockerVestingSchedule, error) { + return _RewardLocker.Contract.GetVestingSchedules(&_RewardLocker.CallOpts, account, token) +} + +// NumVestingSchedules is a free data retrieval call binding the contract method 0x679f7f77. +// +// Solidity: function numVestingSchedules(address account, address token) view returns(uint256) +func (_RewardLocker *RewardLockerCaller) NumVestingSchedules(opts *bind.CallOpts, account common.Address, token common.Address) (*big.Int, error) { + var out []interface{} + err := _RewardLocker.contract.Call(opts, &out, "numVestingSchedules", account, token) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// NumVestingSchedules is a free data retrieval call binding the contract method 0x679f7f77. +// +// Solidity: function numVestingSchedules(address account, address token) view returns(uint256) +func (_RewardLocker *RewardLockerSession) NumVestingSchedules(account common.Address, token common.Address) (*big.Int, error) { + return _RewardLocker.Contract.NumVestingSchedules(&_RewardLocker.CallOpts, account, token) +} + +// NumVestingSchedules is a free data retrieval call binding the contract method 0x679f7f77. +// +// Solidity: function numVestingSchedules(address account, address token) view returns(uint256) +func (_RewardLocker *RewardLockerCallerSession) NumVestingSchedules(account common.Address, token common.Address) (*big.Int, error) { + return _RewardLocker.Contract.NumVestingSchedules(&_RewardLocker.CallOpts, account, token) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_RewardLocker *RewardLockerCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _RewardLocker.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_RewardLocker *RewardLockerSession) Owner() (common.Address, error) { + return _RewardLocker.Contract.Owner(&_RewardLocker.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_RewardLocker *RewardLockerCallerSession) Owner() (common.Address, error) { + return _RewardLocker.Contract.Owner(&_RewardLocker.CallOpts) +} + +// VestingDurationPerToken is a free data retrieval call binding the contract method 0xaaf54385. +// +// Solidity: function vestingDurationPerToken(address ) view returns(uint256) +func (_RewardLocker *RewardLockerCaller) VestingDurationPerToken(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _RewardLocker.contract.Call(opts, &out, "vestingDurationPerToken", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// VestingDurationPerToken is a free data retrieval call binding the contract method 0xaaf54385. +// +// Solidity: function vestingDurationPerToken(address ) view returns(uint256) +func (_RewardLocker *RewardLockerSession) VestingDurationPerToken(arg0 common.Address) (*big.Int, error) { + return _RewardLocker.Contract.VestingDurationPerToken(&_RewardLocker.CallOpts, arg0) +} + +// VestingDurationPerToken is a free data retrieval call binding the contract method 0xaaf54385. +// +// Solidity: function vestingDurationPerToken(address ) view returns(uint256) +func (_RewardLocker *RewardLockerCallerSession) VestingDurationPerToken(arg0 common.Address) (*big.Int, error) { + return _RewardLocker.Contract.VestingDurationPerToken(&_RewardLocker.CallOpts, arg0) +} + +// AddRewardsContract is a paid mutator transaction binding the contract method 0xf793d77e. +// +// Solidity: function addRewardsContract(address token, address _rewardContract) returns() +func (_RewardLocker *RewardLockerTransactor) AddRewardsContract(opts *bind.TransactOpts, token common.Address, _rewardContract common.Address) (*types.Transaction, error) { + return _RewardLocker.contract.Transact(opts, "addRewardsContract", token, _rewardContract) +} + +// AddRewardsContract is a paid mutator transaction binding the contract method 0xf793d77e. +// +// Solidity: function addRewardsContract(address token, address _rewardContract) returns() +func (_RewardLocker *RewardLockerSession) AddRewardsContract(token common.Address, _rewardContract common.Address) (*types.Transaction, error) { + return _RewardLocker.Contract.AddRewardsContract(&_RewardLocker.TransactOpts, token, _rewardContract) +} + +// AddRewardsContract is a paid mutator transaction binding the contract method 0xf793d77e. +// +// Solidity: function addRewardsContract(address token, address _rewardContract) returns() +func (_RewardLocker *RewardLockerTransactorSession) AddRewardsContract(token common.Address, _rewardContract common.Address) (*types.Transaction, error) { + return _RewardLocker.Contract.AddRewardsContract(&_RewardLocker.TransactOpts, token, _rewardContract) +} + +// Lock is a paid mutator transaction binding the contract method 0x7750c9f0. +// +// Solidity: function lock(address token, address account, uint256 quantity) payable returns() +func (_RewardLocker *RewardLockerTransactor) Lock(opts *bind.TransactOpts, token common.Address, account common.Address, quantity *big.Int) (*types.Transaction, error) { + return _RewardLocker.contract.Transact(opts, "lock", token, account, quantity) +} + +// Lock is a paid mutator transaction binding the contract method 0x7750c9f0. +// +// Solidity: function lock(address token, address account, uint256 quantity) payable returns() +func (_RewardLocker *RewardLockerSession) Lock(token common.Address, account common.Address, quantity *big.Int) (*types.Transaction, error) { + return _RewardLocker.Contract.Lock(&_RewardLocker.TransactOpts, token, account, quantity) +} + +// Lock is a paid mutator transaction binding the contract method 0x7750c9f0. +// +// Solidity: function lock(address token, address account, uint256 quantity) payable returns() +func (_RewardLocker *RewardLockerTransactorSession) Lock(token common.Address, account common.Address, quantity *big.Int) (*types.Transaction, error) { + return _RewardLocker.Contract.Lock(&_RewardLocker.TransactOpts, token, account, quantity) +} + +// LockWithStartBlock is a paid mutator transaction binding the contract method 0xa5d21e31. +// +// Solidity: function lockWithStartBlock(address token, address account, uint256 quantity, uint256 startBlock) payable returns() +func (_RewardLocker *RewardLockerTransactor) LockWithStartBlock(opts *bind.TransactOpts, token common.Address, account common.Address, quantity *big.Int, startBlock *big.Int) (*types.Transaction, error) { + return _RewardLocker.contract.Transact(opts, "lockWithStartBlock", token, account, quantity, startBlock) +} + +// LockWithStartBlock is a paid mutator transaction binding the contract method 0xa5d21e31. +// +// Solidity: function lockWithStartBlock(address token, address account, uint256 quantity, uint256 startBlock) payable returns() +func (_RewardLocker *RewardLockerSession) LockWithStartBlock(token common.Address, account common.Address, quantity *big.Int, startBlock *big.Int) (*types.Transaction, error) { + return _RewardLocker.Contract.LockWithStartBlock(&_RewardLocker.TransactOpts, token, account, quantity, startBlock) +} + +// LockWithStartBlock is a paid mutator transaction binding the contract method 0xa5d21e31. +// +// Solidity: function lockWithStartBlock(address token, address account, uint256 quantity, uint256 startBlock) payable returns() +func (_RewardLocker *RewardLockerTransactorSession) LockWithStartBlock(token common.Address, account common.Address, quantity *big.Int, startBlock *big.Int) (*types.Transaction, error) { + return _RewardLocker.Contract.LockWithStartBlock(&_RewardLocker.TransactOpts, token, account, quantity, startBlock) +} + +// RemoveRewardsContract is a paid mutator transaction binding the contract method 0x4c9d00cc. +// +// Solidity: function removeRewardsContract(address token, address _rewardContract) returns() +func (_RewardLocker *RewardLockerTransactor) RemoveRewardsContract(opts *bind.TransactOpts, token common.Address, _rewardContract common.Address) (*types.Transaction, error) { + return _RewardLocker.contract.Transact(opts, "removeRewardsContract", token, _rewardContract) +} + +// RemoveRewardsContract is a paid mutator transaction binding the contract method 0x4c9d00cc. +// +// Solidity: function removeRewardsContract(address token, address _rewardContract) returns() +func (_RewardLocker *RewardLockerSession) RemoveRewardsContract(token common.Address, _rewardContract common.Address) (*types.Transaction, error) { + return _RewardLocker.Contract.RemoveRewardsContract(&_RewardLocker.TransactOpts, token, _rewardContract) +} + +// RemoveRewardsContract is a paid mutator transaction binding the contract method 0x4c9d00cc. +// +// Solidity: function removeRewardsContract(address token, address _rewardContract) returns() +func (_RewardLocker *RewardLockerTransactorSession) RemoveRewardsContract(token common.Address, _rewardContract common.Address) (*types.Transaction, error) { + return _RewardLocker.Contract.RemoveRewardsContract(&_RewardLocker.TransactOpts, token, _rewardContract) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_RewardLocker *RewardLockerTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _RewardLocker.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_RewardLocker *RewardLockerSession) RenounceOwnership() (*types.Transaction, error) { + return _RewardLocker.Contract.RenounceOwnership(&_RewardLocker.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_RewardLocker *RewardLockerTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _RewardLocker.Contract.RenounceOwnership(&_RewardLocker.TransactOpts) +} + +// SetVestingDuration is a paid mutator transaction binding the contract method 0xcb1d086b. +// +// Solidity: function setVestingDuration(address token, uint64 _vestingDuration) returns() +func (_RewardLocker *RewardLockerTransactor) SetVestingDuration(opts *bind.TransactOpts, token common.Address, _vestingDuration uint64) (*types.Transaction, error) { + return _RewardLocker.contract.Transact(opts, "setVestingDuration", token, _vestingDuration) +} + +// SetVestingDuration is a paid mutator transaction binding the contract method 0xcb1d086b. +// +// Solidity: function setVestingDuration(address token, uint64 _vestingDuration) returns() +func (_RewardLocker *RewardLockerSession) SetVestingDuration(token common.Address, _vestingDuration uint64) (*types.Transaction, error) { + return _RewardLocker.Contract.SetVestingDuration(&_RewardLocker.TransactOpts, token, _vestingDuration) +} + +// SetVestingDuration is a paid mutator transaction binding the contract method 0xcb1d086b. +// +// Solidity: function setVestingDuration(address token, uint64 _vestingDuration) returns() +func (_RewardLocker *RewardLockerTransactorSession) SetVestingDuration(token common.Address, _vestingDuration uint64) (*types.Transaction, error) { + return _RewardLocker.Contract.SetVestingDuration(&_RewardLocker.TransactOpts, token, _vestingDuration) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_RewardLocker *RewardLockerTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _RewardLocker.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_RewardLocker *RewardLockerSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _RewardLocker.Contract.TransferOwnership(&_RewardLocker.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_RewardLocker *RewardLockerTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _RewardLocker.Contract.TransferOwnership(&_RewardLocker.TransactOpts, newOwner) +} + +// UpdateMaxContractSize is a paid mutator transaction binding the contract method 0x23179766. +// +// Solidity: function updateMaxContractSize(uint256 _size) returns() +func (_RewardLocker *RewardLockerTransactor) UpdateMaxContractSize(opts *bind.TransactOpts, _size *big.Int) (*types.Transaction, error) { + return _RewardLocker.contract.Transact(opts, "updateMaxContractSize", _size) +} + +// UpdateMaxContractSize is a paid mutator transaction binding the contract method 0x23179766. +// +// Solidity: function updateMaxContractSize(uint256 _size) returns() +func (_RewardLocker *RewardLockerSession) UpdateMaxContractSize(_size *big.Int) (*types.Transaction, error) { + return _RewardLocker.Contract.UpdateMaxContractSize(&_RewardLocker.TransactOpts, _size) +} + +// UpdateMaxContractSize is a paid mutator transaction binding the contract method 0x23179766. +// +// Solidity: function updateMaxContractSize(uint256 _size) returns() +func (_RewardLocker *RewardLockerTransactorSession) UpdateMaxContractSize(_size *big.Int) (*types.Transaction, error) { + return _RewardLocker.Contract.UpdateMaxContractSize(&_RewardLocker.TransactOpts, _size) +} + +// VestCompletedSchedules is a paid mutator transaction binding the contract method 0xfdfaaa05. +// +// Solidity: function vestCompletedSchedules(address token) returns(uint256) +func (_RewardLocker *RewardLockerTransactor) VestCompletedSchedules(opts *bind.TransactOpts, token common.Address) (*types.Transaction, error) { + return _RewardLocker.contract.Transact(opts, "vestCompletedSchedules", token) +} + +// VestCompletedSchedules is a paid mutator transaction binding the contract method 0xfdfaaa05. +// +// Solidity: function vestCompletedSchedules(address token) returns(uint256) +func (_RewardLocker *RewardLockerSession) VestCompletedSchedules(token common.Address) (*types.Transaction, error) { + return _RewardLocker.Contract.VestCompletedSchedules(&_RewardLocker.TransactOpts, token) +} + +// VestCompletedSchedules is a paid mutator transaction binding the contract method 0xfdfaaa05. +// +// Solidity: function vestCompletedSchedules(address token) returns(uint256) +func (_RewardLocker *RewardLockerTransactorSession) VestCompletedSchedules(token common.Address) (*types.Transaction, error) { + return _RewardLocker.Contract.VestCompletedSchedules(&_RewardLocker.TransactOpts, token) +} + +// VestCompletedSchedulesForMultipleTokens is a paid mutator transaction binding the contract method 0x9059aa6a. +// +// Solidity: function vestCompletedSchedulesForMultipleTokens(address[] tokens) returns(uint256[] vestedAmounts) +func (_RewardLocker *RewardLockerTransactor) VestCompletedSchedulesForMultipleTokens(opts *bind.TransactOpts, tokens []common.Address) (*types.Transaction, error) { + return _RewardLocker.contract.Transact(opts, "vestCompletedSchedulesForMultipleTokens", tokens) +} + +// VestCompletedSchedulesForMultipleTokens is a paid mutator transaction binding the contract method 0x9059aa6a. +// +// Solidity: function vestCompletedSchedulesForMultipleTokens(address[] tokens) returns(uint256[] vestedAmounts) +func (_RewardLocker *RewardLockerSession) VestCompletedSchedulesForMultipleTokens(tokens []common.Address) (*types.Transaction, error) { + return _RewardLocker.Contract.VestCompletedSchedulesForMultipleTokens(&_RewardLocker.TransactOpts, tokens) +} + +// VestCompletedSchedulesForMultipleTokens is a paid mutator transaction binding the contract method 0x9059aa6a. +// +// Solidity: function vestCompletedSchedulesForMultipleTokens(address[] tokens) returns(uint256[] vestedAmounts) +func (_RewardLocker *RewardLockerTransactorSession) VestCompletedSchedulesForMultipleTokens(tokens []common.Address) (*types.Transaction, error) { + return _RewardLocker.Contract.VestCompletedSchedulesForMultipleTokens(&_RewardLocker.TransactOpts, tokens) +} + +// VestScheduleAtIndices is a paid mutator transaction binding the contract method 0x0f5636c3. +// +// Solidity: function vestScheduleAtIndices(address token, uint256[] indexes) returns(uint256) +func (_RewardLocker *RewardLockerTransactor) VestScheduleAtIndices(opts *bind.TransactOpts, token common.Address, indexes []*big.Int) (*types.Transaction, error) { + return _RewardLocker.contract.Transact(opts, "vestScheduleAtIndices", token, indexes) +} + +// VestScheduleAtIndices is a paid mutator transaction binding the contract method 0x0f5636c3. +// +// Solidity: function vestScheduleAtIndices(address token, uint256[] indexes) returns(uint256) +func (_RewardLocker *RewardLockerSession) VestScheduleAtIndices(token common.Address, indexes []*big.Int) (*types.Transaction, error) { + return _RewardLocker.Contract.VestScheduleAtIndices(&_RewardLocker.TransactOpts, token, indexes) +} + +// VestScheduleAtIndices is a paid mutator transaction binding the contract method 0x0f5636c3. +// +// Solidity: function vestScheduleAtIndices(address token, uint256[] indexes) returns(uint256) +func (_RewardLocker *RewardLockerTransactorSession) VestScheduleAtIndices(token common.Address, indexes []*big.Int) (*types.Transaction, error) { + return _RewardLocker.Contract.VestScheduleAtIndices(&_RewardLocker.TransactOpts, token, indexes) +} + +// VestScheduleForMultipleTokensAtIndices is a paid mutator transaction binding the contract method 0x4d4f3d93. +// +// Solidity: function vestScheduleForMultipleTokensAtIndices(address[] tokens, uint256[][] indices) returns(uint256[] vestedAmounts) +func (_RewardLocker *RewardLockerTransactor) VestScheduleForMultipleTokensAtIndices(opts *bind.TransactOpts, tokens []common.Address, indices [][]*big.Int) (*types.Transaction, error) { + return _RewardLocker.contract.Transact(opts, "vestScheduleForMultipleTokensAtIndices", tokens, indices) +} + +// VestScheduleForMultipleTokensAtIndices is a paid mutator transaction binding the contract method 0x4d4f3d93. +// +// Solidity: function vestScheduleForMultipleTokensAtIndices(address[] tokens, uint256[][] indices) returns(uint256[] vestedAmounts) +func (_RewardLocker *RewardLockerSession) VestScheduleForMultipleTokensAtIndices(tokens []common.Address, indices [][]*big.Int) (*types.Transaction, error) { + return _RewardLocker.Contract.VestScheduleForMultipleTokensAtIndices(&_RewardLocker.TransactOpts, tokens, indices) +} + +// VestScheduleForMultipleTokensAtIndices is a paid mutator transaction binding the contract method 0x4d4f3d93. +// +// Solidity: function vestScheduleForMultipleTokensAtIndices(address[] tokens, uint256[][] indices) returns(uint256[] vestedAmounts) +func (_RewardLocker *RewardLockerTransactorSession) VestScheduleForMultipleTokensAtIndices(tokens []common.Address, indices [][]*big.Int) (*types.Transaction, error) { + return _RewardLocker.Contract.VestScheduleForMultipleTokensAtIndices(&_RewardLocker.TransactOpts, tokens, indices) +} + +// VestSchedulesInRange is a paid mutator transaction binding the contract method 0xc33fddf8. +// +// Solidity: function vestSchedulesInRange(address token, uint256 startIndex, uint256 endIndex) returns(uint256) +func (_RewardLocker *RewardLockerTransactor) VestSchedulesInRange(opts *bind.TransactOpts, token common.Address, startIndex *big.Int, endIndex *big.Int) (*types.Transaction, error) { + return _RewardLocker.contract.Transact(opts, "vestSchedulesInRange", token, startIndex, endIndex) +} + +// VestSchedulesInRange is a paid mutator transaction binding the contract method 0xc33fddf8. +// +// Solidity: function vestSchedulesInRange(address token, uint256 startIndex, uint256 endIndex) returns(uint256) +func (_RewardLocker *RewardLockerSession) VestSchedulesInRange(token common.Address, startIndex *big.Int, endIndex *big.Int) (*types.Transaction, error) { + return _RewardLocker.Contract.VestSchedulesInRange(&_RewardLocker.TransactOpts, token, startIndex, endIndex) +} + +// VestSchedulesInRange is a paid mutator transaction binding the contract method 0xc33fddf8. +// +// Solidity: function vestSchedulesInRange(address token, uint256 startIndex, uint256 endIndex) returns(uint256) +func (_RewardLocker *RewardLockerTransactorSession) VestSchedulesInRange(token common.Address, startIndex *big.Int, endIndex *big.Int) (*types.Transaction, error) { + return _RewardLocker.Contract.VestSchedulesInRange(&_RewardLocker.TransactOpts, token, startIndex, endIndex) +} + +// RewardLockerOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the RewardLocker contract. +type RewardLockerOwnershipTransferredIterator struct { + Event *RewardLockerOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *RewardLockerOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(RewardLockerOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(RewardLockerOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *RewardLockerOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *RewardLockerOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// RewardLockerOwnershipTransferred represents a OwnershipTransferred event raised by the RewardLocker contract. +type RewardLockerOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_RewardLocker *RewardLockerFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*RewardLockerOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _RewardLocker.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &RewardLockerOwnershipTransferredIterator{contract: _RewardLocker.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_RewardLocker *RewardLockerFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *RewardLockerOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _RewardLocker.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(RewardLockerOwnershipTransferred) + if err := _RewardLocker.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_RewardLocker *RewardLockerFilterer) ParseOwnershipTransferred(log types.Log) (*RewardLockerOwnershipTransferred, error) { + event := new(RewardLockerOwnershipTransferred) + if err := _RewardLocker.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// RewardLockerRewardContractAddedIterator is returned from FilterRewardContractAdded and is used to iterate over the raw logs and unpacked data for RewardContractAdded events raised by the RewardLocker contract. +type RewardLockerRewardContractAddedIterator struct { + Event *RewardLockerRewardContractAdded // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *RewardLockerRewardContractAddedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(RewardLockerRewardContractAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(RewardLockerRewardContractAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *RewardLockerRewardContractAddedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *RewardLockerRewardContractAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// RewardLockerRewardContractAdded represents a RewardContractAdded event raised by the RewardLocker contract. +type RewardLockerRewardContractAdded struct { + RewardContract common.Address + Token common.Address + IsAdded bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRewardContractAdded is a free log retrieval operation binding the contract event 0x88a8c998079a07d6a1e59a32ce0c359a00e4c94ce7a6068350a9574e7e0f993d. +// +// Solidity: event RewardContractAdded(address indexed rewardContract, address indexed token, bool isAdded) +func (_RewardLocker *RewardLockerFilterer) FilterRewardContractAdded(opts *bind.FilterOpts, rewardContract []common.Address, token []common.Address) (*RewardLockerRewardContractAddedIterator, error) { + + var rewardContractRule []interface{} + for _, rewardContractItem := range rewardContract { + rewardContractRule = append(rewardContractRule, rewardContractItem) + } + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _RewardLocker.contract.FilterLogs(opts, "RewardContractAdded", rewardContractRule, tokenRule) + if err != nil { + return nil, err + } + return &RewardLockerRewardContractAddedIterator{contract: _RewardLocker.contract, event: "RewardContractAdded", logs: logs, sub: sub}, nil +} + +// WatchRewardContractAdded is a free log subscription operation binding the contract event 0x88a8c998079a07d6a1e59a32ce0c359a00e4c94ce7a6068350a9574e7e0f993d. +// +// Solidity: event RewardContractAdded(address indexed rewardContract, address indexed token, bool isAdded) +func (_RewardLocker *RewardLockerFilterer) WatchRewardContractAdded(opts *bind.WatchOpts, sink chan<- *RewardLockerRewardContractAdded, rewardContract []common.Address, token []common.Address) (event.Subscription, error) { + + var rewardContractRule []interface{} + for _, rewardContractItem := range rewardContract { + rewardContractRule = append(rewardContractRule, rewardContractItem) + } + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _RewardLocker.contract.WatchLogs(opts, "RewardContractAdded", rewardContractRule, tokenRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(RewardLockerRewardContractAdded) + if err := _RewardLocker.contract.UnpackLog(event, "RewardContractAdded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseRewardContractAdded is a log parse operation binding the contract event 0x88a8c998079a07d6a1e59a32ce0c359a00e4c94ce7a6068350a9574e7e0f993d. +// +// Solidity: event RewardContractAdded(address indexed rewardContract, address indexed token, bool isAdded) +func (_RewardLocker *RewardLockerFilterer) ParseRewardContractAdded(log types.Log) (*RewardLockerRewardContractAdded, error) { + event := new(RewardLockerRewardContractAdded) + if err := _RewardLocker.contract.UnpackLog(event, "RewardContractAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// RewardLockerSetVestingDurationIterator is returned from FilterSetVestingDuration and is used to iterate over the raw logs and unpacked data for SetVestingDuration events raised by the RewardLocker contract. +type RewardLockerSetVestingDurationIterator struct { + Event *RewardLockerSetVestingDuration // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *RewardLockerSetVestingDurationIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(RewardLockerSetVestingDuration) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(RewardLockerSetVestingDuration) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *RewardLockerSetVestingDurationIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *RewardLockerSetVestingDurationIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// RewardLockerSetVestingDuration represents a SetVestingDuration event raised by the RewardLocker contract. +type RewardLockerSetVestingDuration struct { + Token common.Address + VestingDuration uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetVestingDuration is a free log retrieval operation binding the contract event 0x8604b95f1c6f11de3cf58583f6524c5b1aaa150f2391ec1544bb059d75177236. +// +// Solidity: event SetVestingDuration(address indexed token, uint64 vestingDuration) +func (_RewardLocker *RewardLockerFilterer) FilterSetVestingDuration(opts *bind.FilterOpts, token []common.Address) (*RewardLockerSetVestingDurationIterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _RewardLocker.contract.FilterLogs(opts, "SetVestingDuration", tokenRule) + if err != nil { + return nil, err + } + return &RewardLockerSetVestingDurationIterator{contract: _RewardLocker.contract, event: "SetVestingDuration", logs: logs, sub: sub}, nil +} + +// WatchSetVestingDuration is a free log subscription operation binding the contract event 0x8604b95f1c6f11de3cf58583f6524c5b1aaa150f2391ec1544bb059d75177236. +// +// Solidity: event SetVestingDuration(address indexed token, uint64 vestingDuration) +func (_RewardLocker *RewardLockerFilterer) WatchSetVestingDuration(opts *bind.WatchOpts, sink chan<- *RewardLockerSetVestingDuration, token []common.Address) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _RewardLocker.contract.WatchLogs(opts, "SetVestingDuration", tokenRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(RewardLockerSetVestingDuration) + if err := _RewardLocker.contract.UnpackLog(event, "SetVestingDuration", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSetVestingDuration is a log parse operation binding the contract event 0x8604b95f1c6f11de3cf58583f6524c5b1aaa150f2391ec1544bb059d75177236. +// +// Solidity: event SetVestingDuration(address indexed token, uint64 vestingDuration) +func (_RewardLocker *RewardLockerFilterer) ParseSetVestingDuration(log types.Log) (*RewardLockerSetVestingDuration, error) { + event := new(RewardLockerSetVestingDuration) + if err := _RewardLocker.contract.UnpackLog(event, "SetVestingDuration", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// RewardLockerUpdateMaxContractSizeIterator is returned from FilterUpdateMaxContractSize and is used to iterate over the raw logs and unpacked data for UpdateMaxContractSize events raised by the RewardLocker contract. +type RewardLockerUpdateMaxContractSizeIterator struct { + Event *RewardLockerUpdateMaxContractSize // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *RewardLockerUpdateMaxContractSizeIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(RewardLockerUpdateMaxContractSize) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(RewardLockerUpdateMaxContractSize) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *RewardLockerUpdateMaxContractSizeIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *RewardLockerUpdateMaxContractSizeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// RewardLockerUpdateMaxContractSize represents a UpdateMaxContractSize event raised by the RewardLocker contract. +type RewardLockerUpdateMaxContractSize struct { + Size *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpdateMaxContractSize is a free log retrieval operation binding the contract event 0x8bdf9f5fcc8fec86d3107d9475d243a2d0259d5d7d58ace9671d049b53827efd. +// +// Solidity: event UpdateMaxContractSize(uint256 size) +func (_RewardLocker *RewardLockerFilterer) FilterUpdateMaxContractSize(opts *bind.FilterOpts) (*RewardLockerUpdateMaxContractSizeIterator, error) { + + logs, sub, err := _RewardLocker.contract.FilterLogs(opts, "UpdateMaxContractSize") + if err != nil { + return nil, err + } + return &RewardLockerUpdateMaxContractSizeIterator{contract: _RewardLocker.contract, event: "UpdateMaxContractSize", logs: logs, sub: sub}, nil +} + +// WatchUpdateMaxContractSize is a free log subscription operation binding the contract event 0x8bdf9f5fcc8fec86d3107d9475d243a2d0259d5d7d58ace9671d049b53827efd. +// +// Solidity: event UpdateMaxContractSize(uint256 size) +func (_RewardLocker *RewardLockerFilterer) WatchUpdateMaxContractSize(opts *bind.WatchOpts, sink chan<- *RewardLockerUpdateMaxContractSize) (event.Subscription, error) { + + logs, sub, err := _RewardLocker.contract.WatchLogs(opts, "UpdateMaxContractSize") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(RewardLockerUpdateMaxContractSize) + if err := _RewardLocker.contract.UnpackLog(event, "UpdateMaxContractSize", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUpdateMaxContractSize is a log parse operation binding the contract event 0x8bdf9f5fcc8fec86d3107d9475d243a2d0259d5d7d58ace9671d049b53827efd. +// +// Solidity: event UpdateMaxContractSize(uint256 size) +func (_RewardLocker *RewardLockerFilterer) ParseUpdateMaxContractSize(log types.Log) (*RewardLockerUpdateMaxContractSize, error) { + event := new(RewardLockerUpdateMaxContractSize) + if err := _RewardLocker.contract.UnpackLog(event, "UpdateMaxContractSize", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// RewardLockerVestIterator is returned from FilterVest and is used to iterate over the raw logs and unpacked data for Vest events raised by the RewardLocker contract. +type RewardLockerVestIterator struct { + Event *RewardLockerVest // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *RewardLockerVestIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(RewardLockerVest) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(RewardLockerVest) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *RewardLockerVestIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *RewardLockerVestIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// RewardLockerVest represents a Vest event raised by the RewardLocker contract. +type RewardLockerVest struct { + Token common.Address + TotalVesting *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterVest is a free log retrieval operation binding the contract event 0xd4a50953e9ae2104f507446be8391c79b33e1e86e626473e34bb79eb5fea1f3e. +// +// Solidity: event Vest(address indexed token, uint256 totalVesting) +func (_RewardLocker *RewardLockerFilterer) FilterVest(opts *bind.FilterOpts, token []common.Address) (*RewardLockerVestIterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _RewardLocker.contract.FilterLogs(opts, "Vest", tokenRule) + if err != nil { + return nil, err + } + return &RewardLockerVestIterator{contract: _RewardLocker.contract, event: "Vest", logs: logs, sub: sub}, nil +} + +// WatchVest is a free log subscription operation binding the contract event 0xd4a50953e9ae2104f507446be8391c79b33e1e86e626473e34bb79eb5fea1f3e. +// +// Solidity: event Vest(address indexed token, uint256 totalVesting) +func (_RewardLocker *RewardLockerFilterer) WatchVest(opts *bind.WatchOpts, sink chan<- *RewardLockerVest, token []common.Address) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _RewardLocker.contract.WatchLogs(opts, "Vest", tokenRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(RewardLockerVest) + if err := _RewardLocker.contract.UnpackLog(event, "Vest", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseVest is a log parse operation binding the contract event 0xd4a50953e9ae2104f507446be8391c79b33e1e86e626473e34bb79eb5fea1f3e. +// +// Solidity: event Vest(address indexed token, uint256 totalVesting) +func (_RewardLocker *RewardLockerFilterer) ParseVest(log types.Log) (*RewardLockerVest, error) { + event := new(RewardLockerVest) + if err := _RewardLocker.contract.UnpackLog(event, "Vest", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// RewardLockerVestedIterator is returned from FilterVested and is used to iterate over the raw logs and unpacked data for Vested events raised by the RewardLocker contract. +type RewardLockerVestedIterator struct { + Event *RewardLockerVested // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *RewardLockerVestedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(RewardLockerVested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(RewardLockerVested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *RewardLockerVestedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *RewardLockerVestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// RewardLockerVested represents a Vested event raised by the RewardLocker contract. +type RewardLockerVested struct { + Token common.Address + Beneficiary common.Address + VestedQuantity *big.Int + Index *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterVested is a free log retrieval operation binding the contract event 0x6d06f0a463d80b43fe6cd0b79c61bb2790cfe898790e69828f25e6e12886e178. +// +// Solidity: event Vested(address indexed token, address indexed beneficiary, uint256 vestedQuantity, uint256 index) +func (_RewardLocker *RewardLockerFilterer) FilterVested(opts *bind.FilterOpts, token []common.Address, beneficiary []common.Address) (*RewardLockerVestedIterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var beneficiaryRule []interface{} + for _, beneficiaryItem := range beneficiary { + beneficiaryRule = append(beneficiaryRule, beneficiaryItem) + } + + logs, sub, err := _RewardLocker.contract.FilterLogs(opts, "Vested", tokenRule, beneficiaryRule) + if err != nil { + return nil, err + } + return &RewardLockerVestedIterator{contract: _RewardLocker.contract, event: "Vested", logs: logs, sub: sub}, nil +} + +// WatchVested is a free log subscription operation binding the contract event 0x6d06f0a463d80b43fe6cd0b79c61bb2790cfe898790e69828f25e6e12886e178. +// +// Solidity: event Vested(address indexed token, address indexed beneficiary, uint256 vestedQuantity, uint256 index) +func (_RewardLocker *RewardLockerFilterer) WatchVested(opts *bind.WatchOpts, sink chan<- *RewardLockerVested, token []common.Address, beneficiary []common.Address) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var beneficiaryRule []interface{} + for _, beneficiaryItem := range beneficiary { + beneficiaryRule = append(beneficiaryRule, beneficiaryItem) + } + + logs, sub, err := _RewardLocker.contract.WatchLogs(opts, "Vested", tokenRule, beneficiaryRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(RewardLockerVested) + if err := _RewardLocker.contract.UnpackLog(event, "Vested", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseVested is a log parse operation binding the contract event 0x6d06f0a463d80b43fe6cd0b79c61bb2790cfe898790e69828f25e6e12886e178. +// +// Solidity: event Vested(address indexed token, address indexed beneficiary, uint256 vestedQuantity, uint256 index) +func (_RewardLocker *RewardLockerFilterer) ParseVested(log types.Log) (*RewardLockerVested, error) { + event := new(RewardLockerVested) + if err := _RewardLocker.contract.UnpackLog(event, "Vested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// RewardLockerVestingEntryCreatedIterator is returned from FilterVestingEntryCreated and is used to iterate over the raw logs and unpacked data for VestingEntryCreated events raised by the RewardLocker contract. +type RewardLockerVestingEntryCreatedIterator struct { + Event *RewardLockerVestingEntryCreated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *RewardLockerVestingEntryCreatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(RewardLockerVestingEntryCreated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(RewardLockerVestingEntryCreated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *RewardLockerVestingEntryCreatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *RewardLockerVestingEntryCreatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// RewardLockerVestingEntryCreated represents a VestingEntryCreated event raised by the RewardLocker contract. +type RewardLockerVestingEntryCreated struct { + Token common.Address + Beneficiary common.Address + StartBlock *big.Int + EndBlock *big.Int + Quantity *big.Int + Index *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterVestingEntryCreated is a free log retrieval operation binding the contract event 0xfb1fd0fee690638acf30008a00d7fc669e970dd6fa8912488ee11171986edabb. +// +// Solidity: event VestingEntryCreated(address indexed token, address indexed beneficiary, uint256 startBlock, uint256 endBlock, uint256 quantity, uint256 index) +func (_RewardLocker *RewardLockerFilterer) FilterVestingEntryCreated(opts *bind.FilterOpts, token []common.Address, beneficiary []common.Address) (*RewardLockerVestingEntryCreatedIterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var beneficiaryRule []interface{} + for _, beneficiaryItem := range beneficiary { + beneficiaryRule = append(beneficiaryRule, beneficiaryItem) + } + + logs, sub, err := _RewardLocker.contract.FilterLogs(opts, "VestingEntryCreated", tokenRule, beneficiaryRule) + if err != nil { + return nil, err + } + return &RewardLockerVestingEntryCreatedIterator{contract: _RewardLocker.contract, event: "VestingEntryCreated", logs: logs, sub: sub}, nil +} + +// WatchVestingEntryCreated is a free log subscription operation binding the contract event 0xfb1fd0fee690638acf30008a00d7fc669e970dd6fa8912488ee11171986edabb. +// +// Solidity: event VestingEntryCreated(address indexed token, address indexed beneficiary, uint256 startBlock, uint256 endBlock, uint256 quantity, uint256 index) +func (_RewardLocker *RewardLockerFilterer) WatchVestingEntryCreated(opts *bind.WatchOpts, sink chan<- *RewardLockerVestingEntryCreated, token []common.Address, beneficiary []common.Address) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var beneficiaryRule []interface{} + for _, beneficiaryItem := range beneficiary { + beneficiaryRule = append(beneficiaryRule, beneficiaryItem) + } + + logs, sub, err := _RewardLocker.contract.WatchLogs(opts, "VestingEntryCreated", tokenRule, beneficiaryRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(RewardLockerVestingEntryCreated) + if err := _RewardLocker.contract.UnpackLog(event, "VestingEntryCreated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseVestingEntryCreated is a log parse operation binding the contract event 0xfb1fd0fee690638acf30008a00d7fc669e970dd6fa8912488ee11171986edabb. +// +// Solidity: event VestingEntryCreated(address indexed token, address indexed beneficiary, uint256 startBlock, uint256 endBlock, uint256 quantity, uint256 index) +func (_RewardLocker *RewardLockerFilterer) ParseVestingEntryCreated(log types.Log) (*RewardLockerVestingEntryCreated, error) { + event := new(RewardLockerVestingEntryCreated) + if err := _RewardLocker.contract.UnpackLog(event, "VestingEntryCreated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// RewardLockerVestingEntryQueuedIterator is returned from FilterVestingEntryQueued and is used to iterate over the raw logs and unpacked data for VestingEntryQueued events raised by the RewardLocker contract. +type RewardLockerVestingEntryQueuedIterator struct { + Event *RewardLockerVestingEntryQueued // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *RewardLockerVestingEntryQueuedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(RewardLockerVestingEntryQueued) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(RewardLockerVestingEntryQueued) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *RewardLockerVestingEntryQueuedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *RewardLockerVestingEntryQueuedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// RewardLockerVestingEntryQueued represents a VestingEntryQueued event raised by the RewardLocker contract. +type RewardLockerVestingEntryQueued struct { + Index *big.Int + Token common.Address + Beneficiary common.Address + Quantity *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterVestingEntryQueued is a free log retrieval operation binding the contract event 0xa6fd3a57929c9152d86fa5f83c8478f1af480353a0aef0cacc3240d63b570767. +// +// Solidity: event VestingEntryQueued(uint256 indexed index, address indexed token, address indexed beneficiary, uint256 quantity) +func (_RewardLocker *RewardLockerFilterer) FilterVestingEntryQueued(opts *bind.FilterOpts, index []*big.Int, token []common.Address, beneficiary []common.Address) (*RewardLockerVestingEntryQueuedIterator, error) { + + var indexRule []interface{} + for _, indexItem := range index { + indexRule = append(indexRule, indexItem) + } + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var beneficiaryRule []interface{} + for _, beneficiaryItem := range beneficiary { + beneficiaryRule = append(beneficiaryRule, beneficiaryItem) + } + + logs, sub, err := _RewardLocker.contract.FilterLogs(opts, "VestingEntryQueued", indexRule, tokenRule, beneficiaryRule) + if err != nil { + return nil, err + } + return &RewardLockerVestingEntryQueuedIterator{contract: _RewardLocker.contract, event: "VestingEntryQueued", logs: logs, sub: sub}, nil +} + +// WatchVestingEntryQueued is a free log subscription operation binding the contract event 0xa6fd3a57929c9152d86fa5f83c8478f1af480353a0aef0cacc3240d63b570767. +// +// Solidity: event VestingEntryQueued(uint256 indexed index, address indexed token, address indexed beneficiary, uint256 quantity) +func (_RewardLocker *RewardLockerFilterer) WatchVestingEntryQueued(opts *bind.WatchOpts, sink chan<- *RewardLockerVestingEntryQueued, index []*big.Int, token []common.Address, beneficiary []common.Address) (event.Subscription, error) { + + var indexRule []interface{} + for _, indexItem := range index { + indexRule = append(indexRule, indexItem) + } + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var beneficiaryRule []interface{} + for _, beneficiaryItem := range beneficiary { + beneficiaryRule = append(beneficiaryRule, beneficiaryItem) + } + + logs, sub, err := _RewardLocker.contract.WatchLogs(opts, "VestingEntryQueued", indexRule, tokenRule, beneficiaryRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(RewardLockerVestingEntryQueued) + if err := _RewardLocker.contract.UnpackLog(event, "VestingEntryQueued", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseVestingEntryQueued is a log parse operation binding the contract event 0xa6fd3a57929c9152d86fa5f83c8478f1af480353a0aef0cacc3240d63b570767. +// +// Solidity: event VestingEntryQueued(uint256 indexed index, address indexed token, address indexed beneficiary, uint256 quantity) +func (_RewardLocker *RewardLockerFilterer) ParseVestingEntryQueued(log types.Log) (*RewardLockerVestingEntryQueued, error) { + event := new(RewardLockerVestingEntryQueued) + if err := _RewardLocker.contract.UnpackLog(event, "VestingEntryQueued", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/polycat/contracts/tankchef.abi b/polycat/contracts/tankchef.abi new file mode 100644 index 0000000..0cd8d1f --- /dev/null +++ b/polycat/contracts/tankchef.abi @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"contract IERC20","name":"_depositToken","type":"address"},{"internalType":"contract IERC20","name":"_rewardToken","type":"address"},{"internalType":"uint256","name":"_rewardPerBlock","type":"uint256"},{"internalType":"uint256","name":"_startBlock","type":"uint256"},{"internalType":"uint256","name":"_endBlock","type":"uint256"},{"internalType":"uint256","name":"_burnMultiplier","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"adjustBlockEnd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burnMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"emergencyRewardWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"pendingReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accRewardPerShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stopReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/polycat/contracts/tankchef.go b/polycat/contracts/tankchef.go new file mode 100644 index 0000000..c4cd1ea --- /dev/null +++ b/polycat/contracts/tankchef.go @@ -0,0 +1,1323 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contracts + +import ( + "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 ( + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// TankChefABI is the input ABI used to generate the binding from. +const TankChefABI = "[{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"_depositToken\",\"type\":\"address\"},{\"internalType\":\"contractIERC20\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rewardPerBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_startBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_endBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_burnMultiplier\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"EmergencyWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"adjustBlockEnd\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burnMultiplier\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"emergencyRewardWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emergencyWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"endBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_from\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_to\",\"type\":\"uint256\"}],\"name\":\"getMultiplier\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"pendingReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"poolInfo\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"lastRewardBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"accRewardPerShare\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stopReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardDebt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + +// TankChef is an auto generated Go binding around an Ethereum contract. +type TankChef struct { + TankChefCaller // Read-only binding to the contract + TankChefTransactor // Write-only binding to the contract + TankChefFilterer // Log filterer for contract events +} + +// TankChefCaller is an auto generated read-only Go binding around an Ethereum contract. +type TankChefCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TankChefTransactor is an auto generated write-only Go binding around an Ethereum contract. +type TankChefTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TankChefFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type TankChefFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TankChefSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type TankChefSession struct { + Contract *TankChef // 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 +} + +// TankChefCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type TankChefCallerSession struct { + Contract *TankChefCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// TankChefTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type TankChefTransactorSession struct { + Contract *TankChefTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// TankChefRaw is an auto generated low-level Go binding around an Ethereum contract. +type TankChefRaw struct { + Contract *TankChef // Generic contract binding to access the raw methods on +} + +// TankChefCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type TankChefCallerRaw struct { + Contract *TankChefCaller // Generic read-only contract binding to access the raw methods on +} + +// TankChefTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type TankChefTransactorRaw struct { + Contract *TankChefTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewTankChef creates a new instance of TankChef, bound to a specific deployed contract. +func NewTankChef(address common.Address, backend bind.ContractBackend) (*TankChef, error) { + contract, err := bindTankChef(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &TankChef{TankChefCaller: TankChefCaller{contract: contract}, TankChefTransactor: TankChefTransactor{contract: contract}, TankChefFilterer: TankChefFilterer{contract: contract}}, nil +} + +// NewTankChefCaller creates a new read-only instance of TankChef, bound to a specific deployed contract. +func NewTankChefCaller(address common.Address, caller bind.ContractCaller) (*TankChefCaller, error) { + contract, err := bindTankChef(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &TankChefCaller{contract: contract}, nil +} + +// NewTankChefTransactor creates a new write-only instance of TankChef, bound to a specific deployed contract. +func NewTankChefTransactor(address common.Address, transactor bind.ContractTransactor) (*TankChefTransactor, error) { + contract, err := bindTankChef(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &TankChefTransactor{contract: contract}, nil +} + +// NewTankChefFilterer creates a new log filterer instance of TankChef, bound to a specific deployed contract. +func NewTankChefFilterer(address common.Address, filterer bind.ContractFilterer) (*TankChefFilterer, error) { + contract, err := bindTankChef(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &TankChefFilterer{contract: contract}, nil +} + +// bindTankChef binds a generic wrapper to an already deployed contract. +func bindTankChef(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(TankChefABI)) + 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 (_TankChef *TankChefRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TankChef.Contract.TankChefCaller.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 (_TankChef *TankChefRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TankChef.Contract.TankChefTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TankChef *TankChefRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TankChef.Contract.TankChefTransactor.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 (_TankChef *TankChefCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TankChef.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 (_TankChef *TankChefTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TankChef.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TankChef *TankChefTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TankChef.Contract.contract.Transact(opts, method, params...) +} + +// BurnMultiplier is a free data retrieval call binding the contract method 0x3939a897. +// +// Solidity: function burnMultiplier() view returns(uint256) +func (_TankChef *TankChefCaller) BurnMultiplier(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _TankChef.contract.Call(opts, &out, "burnMultiplier") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BurnMultiplier is a free data retrieval call binding the contract method 0x3939a897. +// +// Solidity: function burnMultiplier() view returns(uint256) +func (_TankChef *TankChefSession) BurnMultiplier() (*big.Int, error) { + return _TankChef.Contract.BurnMultiplier(&_TankChef.CallOpts) +} + +// BurnMultiplier is a free data retrieval call binding the contract method 0x3939a897. +// +// Solidity: function burnMultiplier() view returns(uint256) +func (_TankChef *TankChefCallerSession) BurnMultiplier() (*big.Int, error) { + return _TankChef.Contract.BurnMultiplier(&_TankChef.CallOpts) +} + +// DepositToken is a free data retrieval call binding the contract method 0xc89039c5. +// +// Solidity: function depositToken() view returns(address) +func (_TankChef *TankChefCaller) DepositToken(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TankChef.contract.Call(opts, &out, "depositToken") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// DepositToken is a free data retrieval call binding the contract method 0xc89039c5. +// +// Solidity: function depositToken() view returns(address) +func (_TankChef *TankChefSession) DepositToken() (common.Address, error) { + return _TankChef.Contract.DepositToken(&_TankChef.CallOpts) +} + +// DepositToken is a free data retrieval call binding the contract method 0xc89039c5. +// +// Solidity: function depositToken() view returns(address) +func (_TankChef *TankChefCallerSession) DepositToken() (common.Address, error) { + return _TankChef.Contract.DepositToken(&_TankChef.CallOpts) +} + +// EndBlock is a free data retrieval call binding the contract method 0x083c6323. +// +// Solidity: function endBlock() view returns(uint256) +func (_TankChef *TankChefCaller) EndBlock(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _TankChef.contract.Call(opts, &out, "endBlock") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// EndBlock is a free data retrieval call binding the contract method 0x083c6323. +// +// Solidity: function endBlock() view returns(uint256) +func (_TankChef *TankChefSession) EndBlock() (*big.Int, error) { + return _TankChef.Contract.EndBlock(&_TankChef.CallOpts) +} + +// EndBlock is a free data retrieval call binding the contract method 0x083c6323. +// +// Solidity: function endBlock() view returns(uint256) +func (_TankChef *TankChefCallerSession) EndBlock() (*big.Int, error) { + return _TankChef.Contract.EndBlock(&_TankChef.CallOpts) +} + +// GetMultiplier is a free data retrieval call binding the contract method 0x8dbb1e3a. +// +// Solidity: function getMultiplier(uint256 _from, uint256 _to) view returns(uint256) +func (_TankChef *TankChefCaller) GetMultiplier(opts *bind.CallOpts, _from *big.Int, _to *big.Int) (*big.Int, error) { + var out []interface{} + err := _TankChef.contract.Call(opts, &out, "getMultiplier", _from, _to) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetMultiplier is a free data retrieval call binding the contract method 0x8dbb1e3a. +// +// Solidity: function getMultiplier(uint256 _from, uint256 _to) view returns(uint256) +func (_TankChef *TankChefSession) GetMultiplier(_from *big.Int, _to *big.Int) (*big.Int, error) { + return _TankChef.Contract.GetMultiplier(&_TankChef.CallOpts, _from, _to) +} + +// GetMultiplier is a free data retrieval call binding the contract method 0x8dbb1e3a. +// +// Solidity: function getMultiplier(uint256 _from, uint256 _to) view returns(uint256) +func (_TankChef *TankChefCallerSession) GetMultiplier(_from *big.Int, _to *big.Int) (*big.Int, error) { + return _TankChef.Contract.GetMultiplier(&_TankChef.CallOpts, _from, _to) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_TankChef *TankChefCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TankChef.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_TankChef *TankChefSession) Owner() (common.Address, error) { + return _TankChef.Contract.Owner(&_TankChef.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_TankChef *TankChefCallerSession) Owner() (common.Address, error) { + return _TankChef.Contract.Owner(&_TankChef.CallOpts) +} + +// PendingReward is a free data retrieval call binding the contract method 0xf40f0f52. +// +// Solidity: function pendingReward(address _user) view returns(uint256) +func (_TankChef *TankChefCaller) PendingReward(opts *bind.CallOpts, _user common.Address) (*big.Int, error) { + var out []interface{} + err := _TankChef.contract.Call(opts, &out, "pendingReward", _user) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// PendingReward is a free data retrieval call binding the contract method 0xf40f0f52. +// +// Solidity: function pendingReward(address _user) view returns(uint256) +func (_TankChef *TankChefSession) PendingReward(_user common.Address) (*big.Int, error) { + return _TankChef.Contract.PendingReward(&_TankChef.CallOpts, _user) +} + +// PendingReward is a free data retrieval call binding the contract method 0xf40f0f52. +// +// Solidity: function pendingReward(address _user) view returns(uint256) +func (_TankChef *TankChefCallerSession) PendingReward(_user common.Address) (*big.Int, error) { + return _TankChef.Contract.PendingReward(&_TankChef.CallOpts, _user) +} + +// PoolInfo is a free data retrieval call binding the contract method 0x5a2f3d09. +// +// Solidity: function poolInfo() view returns(address token, uint256 lastRewardBlock, uint256 accRewardPerShare) +func (_TankChef *TankChefCaller) PoolInfo(opts *bind.CallOpts) (struct { + Token common.Address + LastRewardBlock *big.Int + AccRewardPerShare *big.Int +}, error) { + var out []interface{} + err := _TankChef.contract.Call(opts, &out, "poolInfo") + + outstruct := new(struct { + Token common.Address + LastRewardBlock *big.Int + AccRewardPerShare *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.Token = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + outstruct.LastRewardBlock = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.AccRewardPerShare = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// PoolInfo is a free data retrieval call binding the contract method 0x5a2f3d09. +// +// Solidity: function poolInfo() view returns(address token, uint256 lastRewardBlock, uint256 accRewardPerShare) +func (_TankChef *TankChefSession) PoolInfo() (struct { + Token common.Address + LastRewardBlock *big.Int + AccRewardPerShare *big.Int +}, error) { + return _TankChef.Contract.PoolInfo(&_TankChef.CallOpts) +} + +// PoolInfo is a free data retrieval call binding the contract method 0x5a2f3d09. +// +// Solidity: function poolInfo() view returns(address token, uint256 lastRewardBlock, uint256 accRewardPerShare) +func (_TankChef *TankChefCallerSession) PoolInfo() (struct { + Token common.Address + LastRewardBlock *big.Int + AccRewardPerShare *big.Int +}, error) { + return _TankChef.Contract.PoolInfo(&_TankChef.CallOpts) +} + +// RewardPerBlock is a free data retrieval call binding the contract method 0x8ae39cac. +// +// Solidity: function rewardPerBlock() view returns(uint256) +func (_TankChef *TankChefCaller) RewardPerBlock(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _TankChef.contract.Call(opts, &out, "rewardPerBlock") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// RewardPerBlock is a free data retrieval call binding the contract method 0x8ae39cac. +// +// Solidity: function rewardPerBlock() view returns(uint256) +func (_TankChef *TankChefSession) RewardPerBlock() (*big.Int, error) { + return _TankChef.Contract.RewardPerBlock(&_TankChef.CallOpts) +} + +// RewardPerBlock is a free data retrieval call binding the contract method 0x8ae39cac. +// +// Solidity: function rewardPerBlock() view returns(uint256) +func (_TankChef *TankChefCallerSession) RewardPerBlock() (*big.Int, error) { + return _TankChef.Contract.RewardPerBlock(&_TankChef.CallOpts) +} + +// RewardToken is a free data retrieval call binding the contract method 0xf7c618c1. +// +// Solidity: function rewardToken() view returns(address) +func (_TankChef *TankChefCaller) RewardToken(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TankChef.contract.Call(opts, &out, "rewardToken") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// RewardToken is a free data retrieval call binding the contract method 0xf7c618c1. +// +// Solidity: function rewardToken() view returns(address) +func (_TankChef *TankChefSession) RewardToken() (common.Address, error) { + return _TankChef.Contract.RewardToken(&_TankChef.CallOpts) +} + +// RewardToken is a free data retrieval call binding the contract method 0xf7c618c1. +// +// Solidity: function rewardToken() view returns(address) +func (_TankChef *TankChefCallerSession) RewardToken() (common.Address, error) { + return _TankChef.Contract.RewardToken(&_TankChef.CallOpts) +} + +// StartBlock is a free data retrieval call binding the contract method 0x48cd4cb1. +// +// Solidity: function startBlock() view returns(uint256) +func (_TankChef *TankChefCaller) StartBlock(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _TankChef.contract.Call(opts, &out, "startBlock") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// StartBlock is a free data retrieval call binding the contract method 0x48cd4cb1. +// +// Solidity: function startBlock() view returns(uint256) +func (_TankChef *TankChefSession) StartBlock() (*big.Int, error) { + return _TankChef.Contract.StartBlock(&_TankChef.CallOpts) +} + +// StartBlock is a free data retrieval call binding the contract method 0x48cd4cb1. +// +// Solidity: function startBlock() view returns(uint256) +func (_TankChef *TankChefCallerSession) StartBlock() (*big.Int, error) { + return _TankChef.Contract.StartBlock(&_TankChef.CallOpts) +} + +// UserInfo is a free data retrieval call binding the contract method 0x1959a002. +// +// Solidity: function userInfo(address ) view returns(uint256 amount, uint256 rewardDebt) +func (_TankChef *TankChefCaller) UserInfo(opts *bind.CallOpts, arg0 common.Address) (struct { + Amount *big.Int + RewardDebt *big.Int +}, error) { + var out []interface{} + err := _TankChef.contract.Call(opts, &out, "userInfo", arg0) + + outstruct := new(struct { + Amount *big.Int + RewardDebt *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.Amount = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.RewardDebt = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// UserInfo is a free data retrieval call binding the contract method 0x1959a002. +// +// Solidity: function userInfo(address ) view returns(uint256 amount, uint256 rewardDebt) +func (_TankChef *TankChefSession) UserInfo(arg0 common.Address) (struct { + Amount *big.Int + RewardDebt *big.Int +}, error) { + return _TankChef.Contract.UserInfo(&_TankChef.CallOpts, arg0) +} + +// UserInfo is a free data retrieval call binding the contract method 0x1959a002. +// +// Solidity: function userInfo(address ) view returns(uint256 amount, uint256 rewardDebt) +func (_TankChef *TankChefCallerSession) UserInfo(arg0 common.Address) (struct { + Amount *big.Int + RewardDebt *big.Int +}, error) { + return _TankChef.Contract.UserInfo(&_TankChef.CallOpts, arg0) +} + +// AdjustBlockEnd is a paid mutator transaction binding the contract method 0xfd75e1e6. +// +// Solidity: function adjustBlockEnd() returns() +func (_TankChef *TankChefTransactor) AdjustBlockEnd(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TankChef.contract.Transact(opts, "adjustBlockEnd") +} + +// AdjustBlockEnd is a paid mutator transaction binding the contract method 0xfd75e1e6. +// +// Solidity: function adjustBlockEnd() returns() +func (_TankChef *TankChefSession) AdjustBlockEnd() (*types.Transaction, error) { + return _TankChef.Contract.AdjustBlockEnd(&_TankChef.TransactOpts) +} + +// AdjustBlockEnd is a paid mutator transaction binding the contract method 0xfd75e1e6. +// +// Solidity: function adjustBlockEnd() returns() +func (_TankChef *TankChefTransactorSession) AdjustBlockEnd() (*types.Transaction, error) { + return _TankChef.Contract.AdjustBlockEnd(&_TankChef.TransactOpts) +} + +// Deposit is a paid mutator transaction binding the contract method 0xb6b55f25. +// +// Solidity: function deposit(uint256 _amount) returns() +func (_TankChef *TankChefTransactor) Deposit(opts *bind.TransactOpts, _amount *big.Int) (*types.Transaction, error) { + return _TankChef.contract.Transact(opts, "deposit", _amount) +} + +// Deposit is a paid mutator transaction binding the contract method 0xb6b55f25. +// +// Solidity: function deposit(uint256 _amount) returns() +func (_TankChef *TankChefSession) Deposit(_amount *big.Int) (*types.Transaction, error) { + return _TankChef.Contract.Deposit(&_TankChef.TransactOpts, _amount) +} + +// Deposit is a paid mutator transaction binding the contract method 0xb6b55f25. +// +// Solidity: function deposit(uint256 _amount) returns() +func (_TankChef *TankChefTransactorSession) Deposit(_amount *big.Int) (*types.Transaction, error) { + return _TankChef.Contract.Deposit(&_TankChef.TransactOpts, _amount) +} + +// EmergencyRewardWithdraw is a paid mutator transaction binding the contract method 0x3279beab. +// +// Solidity: function emergencyRewardWithdraw(uint256 _amount) returns() +func (_TankChef *TankChefTransactor) EmergencyRewardWithdraw(opts *bind.TransactOpts, _amount *big.Int) (*types.Transaction, error) { + return _TankChef.contract.Transact(opts, "emergencyRewardWithdraw", _amount) +} + +// EmergencyRewardWithdraw is a paid mutator transaction binding the contract method 0x3279beab. +// +// Solidity: function emergencyRewardWithdraw(uint256 _amount) returns() +func (_TankChef *TankChefSession) EmergencyRewardWithdraw(_amount *big.Int) (*types.Transaction, error) { + return _TankChef.Contract.EmergencyRewardWithdraw(&_TankChef.TransactOpts, _amount) +} + +// EmergencyRewardWithdraw is a paid mutator transaction binding the contract method 0x3279beab. +// +// Solidity: function emergencyRewardWithdraw(uint256 _amount) returns() +func (_TankChef *TankChefTransactorSession) EmergencyRewardWithdraw(_amount *big.Int) (*types.Transaction, error) { + return _TankChef.Contract.EmergencyRewardWithdraw(&_TankChef.TransactOpts, _amount) +} + +// EmergencyWithdraw is a paid mutator transaction binding the contract method 0xdb2e21bc. +// +// Solidity: function emergencyWithdraw() returns() +func (_TankChef *TankChefTransactor) EmergencyWithdraw(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TankChef.contract.Transact(opts, "emergencyWithdraw") +} + +// EmergencyWithdraw is a paid mutator transaction binding the contract method 0xdb2e21bc. +// +// Solidity: function emergencyWithdraw() returns() +func (_TankChef *TankChefSession) EmergencyWithdraw() (*types.Transaction, error) { + return _TankChef.Contract.EmergencyWithdraw(&_TankChef.TransactOpts) +} + +// EmergencyWithdraw is a paid mutator transaction binding the contract method 0xdb2e21bc. +// +// Solidity: function emergencyWithdraw() returns() +func (_TankChef *TankChefTransactorSession) EmergencyWithdraw() (*types.Transaction, error) { + return _TankChef.Contract.EmergencyWithdraw(&_TankChef.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_TankChef *TankChefTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TankChef.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_TankChef *TankChefSession) RenounceOwnership() (*types.Transaction, error) { + return _TankChef.Contract.RenounceOwnership(&_TankChef.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_TankChef *TankChefTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _TankChef.Contract.RenounceOwnership(&_TankChef.TransactOpts) +} + +// StopReward is a paid mutator transaction binding the contract method 0x80dc0672. +// +// Solidity: function stopReward() returns() +func (_TankChef *TankChefTransactor) StopReward(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TankChef.contract.Transact(opts, "stopReward") +} + +// StopReward is a paid mutator transaction binding the contract method 0x80dc0672. +// +// Solidity: function stopReward() returns() +func (_TankChef *TankChefSession) StopReward() (*types.Transaction, error) { + return _TankChef.Contract.StopReward(&_TankChef.TransactOpts) +} + +// StopReward is a paid mutator transaction binding the contract method 0x80dc0672. +// +// Solidity: function stopReward() returns() +func (_TankChef *TankChefTransactorSession) StopReward() (*types.Transaction, error) { + return _TankChef.Contract.StopReward(&_TankChef.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_TankChef *TankChefTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _TankChef.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_TankChef *TankChefSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _TankChef.Contract.TransferOwnership(&_TankChef.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_TankChef *TankChefTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _TankChef.Contract.TransferOwnership(&_TankChef.TransactOpts, newOwner) +} + +// UpdatePool is a paid mutator transaction binding the contract method 0xe3161ddd. +// +// Solidity: function updatePool() returns() +func (_TankChef *TankChefTransactor) UpdatePool(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TankChef.contract.Transact(opts, "updatePool") +} + +// UpdatePool is a paid mutator transaction binding the contract method 0xe3161ddd. +// +// Solidity: function updatePool() returns() +func (_TankChef *TankChefSession) UpdatePool() (*types.Transaction, error) { + return _TankChef.Contract.UpdatePool(&_TankChef.TransactOpts) +} + +// UpdatePool is a paid mutator transaction binding the contract method 0xe3161ddd. +// +// Solidity: function updatePool() returns() +func (_TankChef *TankChefTransactorSession) UpdatePool() (*types.Transaction, error) { + return _TankChef.Contract.UpdatePool(&_TankChef.TransactOpts) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 _amount) returns() +func (_TankChef *TankChefTransactor) Withdraw(opts *bind.TransactOpts, _amount *big.Int) (*types.Transaction, error) { + return _TankChef.contract.Transact(opts, "withdraw", _amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 _amount) returns() +func (_TankChef *TankChefSession) Withdraw(_amount *big.Int) (*types.Transaction, error) { + return _TankChef.Contract.Withdraw(&_TankChef.TransactOpts, _amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 _amount) returns() +func (_TankChef *TankChefTransactorSession) Withdraw(_amount *big.Int) (*types.Transaction, error) { + return _TankChef.Contract.Withdraw(&_TankChef.TransactOpts, _amount) +} + +// TankChefDepositIterator is returned from FilterDeposit and is used to iterate over the raw logs and unpacked data for Deposit events raised by the TankChef contract. +type TankChefDepositIterator struct { + Event *TankChefDeposit // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TankChefDepositIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TankChefDeposit) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TankChefDeposit) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TankChefDepositIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TankChefDepositIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TankChefDeposit represents a Deposit event raised by the TankChef contract. +type TankChefDeposit struct { + User common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDeposit is a free log retrieval operation binding the contract event 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c. +// +// Solidity: event Deposit(address indexed user, uint256 amount) +func (_TankChef *TankChefFilterer) FilterDeposit(opts *bind.FilterOpts, user []common.Address) (*TankChefDepositIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + + logs, sub, err := _TankChef.contract.FilterLogs(opts, "Deposit", userRule) + if err != nil { + return nil, err + } + return &TankChefDepositIterator{contract: _TankChef.contract, event: "Deposit", logs: logs, sub: sub}, nil +} + +// WatchDeposit is a free log subscription operation binding the contract event 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c. +// +// Solidity: event Deposit(address indexed user, uint256 amount) +func (_TankChef *TankChefFilterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *TankChefDeposit, user []common.Address) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + + logs, sub, err := _TankChef.contract.WatchLogs(opts, "Deposit", userRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TankChefDeposit) + if err := _TankChef.contract.UnpackLog(event, "Deposit", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseDeposit is a log parse operation binding the contract event 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c. +// +// Solidity: event Deposit(address indexed user, uint256 amount) +func (_TankChef *TankChefFilterer) ParseDeposit(log types.Log) (*TankChefDeposit, error) { + event := new(TankChefDeposit) + if err := _TankChef.contract.UnpackLog(event, "Deposit", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TankChefEmergencyWithdrawIterator is returned from FilterEmergencyWithdraw and is used to iterate over the raw logs and unpacked data for EmergencyWithdraw events raised by the TankChef contract. +type TankChefEmergencyWithdrawIterator struct { + Event *TankChefEmergencyWithdraw // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TankChefEmergencyWithdrawIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TankChefEmergencyWithdraw) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TankChefEmergencyWithdraw) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TankChefEmergencyWithdrawIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TankChefEmergencyWithdrawIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TankChefEmergencyWithdraw represents a EmergencyWithdraw event raised by the TankChef contract. +type TankChefEmergencyWithdraw struct { + User common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterEmergencyWithdraw is a free log retrieval operation binding the contract event 0x5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd9695. +// +// Solidity: event EmergencyWithdraw(address indexed user, uint256 amount) +func (_TankChef *TankChefFilterer) FilterEmergencyWithdraw(opts *bind.FilterOpts, user []common.Address) (*TankChefEmergencyWithdrawIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + + logs, sub, err := _TankChef.contract.FilterLogs(opts, "EmergencyWithdraw", userRule) + if err != nil { + return nil, err + } + return &TankChefEmergencyWithdrawIterator{contract: _TankChef.contract, event: "EmergencyWithdraw", logs: logs, sub: sub}, nil +} + +// WatchEmergencyWithdraw is a free log subscription operation binding the contract event 0x5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd9695. +// +// Solidity: event EmergencyWithdraw(address indexed user, uint256 amount) +func (_TankChef *TankChefFilterer) WatchEmergencyWithdraw(opts *bind.WatchOpts, sink chan<- *TankChefEmergencyWithdraw, user []common.Address) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + + logs, sub, err := _TankChef.contract.WatchLogs(opts, "EmergencyWithdraw", userRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TankChefEmergencyWithdraw) + if err := _TankChef.contract.UnpackLog(event, "EmergencyWithdraw", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseEmergencyWithdraw is a log parse operation binding the contract event 0x5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd9695. +// +// Solidity: event EmergencyWithdraw(address indexed user, uint256 amount) +func (_TankChef *TankChefFilterer) ParseEmergencyWithdraw(log types.Log) (*TankChefEmergencyWithdraw, error) { + event := new(TankChefEmergencyWithdraw) + if err := _TankChef.contract.UnpackLog(event, "EmergencyWithdraw", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TankChefOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the TankChef contract. +type TankChefOwnershipTransferredIterator struct { + Event *TankChefOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TankChefOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TankChefOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TankChefOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TankChefOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TankChefOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TankChefOwnershipTransferred represents a OwnershipTransferred event raised by the TankChef contract. +type TankChefOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TankChef *TankChefFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TankChefOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _TankChef.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &TankChefOwnershipTransferredIterator{contract: _TankChef.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TankChef *TankChefFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *TankChefOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _TankChef.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TankChefOwnershipTransferred) + if err := _TankChef.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TankChef *TankChefFilterer) ParseOwnershipTransferred(log types.Log) (*TankChefOwnershipTransferred, error) { + event := new(TankChefOwnershipTransferred) + if err := _TankChef.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TankChefWithdrawIterator is returned from FilterWithdraw and is used to iterate over the raw logs and unpacked data for Withdraw events raised by the TankChef contract. +type TankChefWithdrawIterator struct { + Event *TankChefWithdraw // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TankChefWithdrawIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TankChefWithdraw) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TankChefWithdraw) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TankChefWithdrawIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TankChefWithdrawIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TankChefWithdraw represents a Withdraw event raised by the TankChef contract. +type TankChefWithdraw struct { + User common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdraw is a free log retrieval operation binding the contract event 0x884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364. +// +// Solidity: event Withdraw(address indexed user, uint256 amount) +func (_TankChef *TankChefFilterer) FilterWithdraw(opts *bind.FilterOpts, user []common.Address) (*TankChefWithdrawIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + + logs, sub, err := _TankChef.contract.FilterLogs(opts, "Withdraw", userRule) + if err != nil { + return nil, err + } + return &TankChefWithdrawIterator{contract: _TankChef.contract, event: "Withdraw", logs: logs, sub: sub}, nil +} + +// WatchWithdraw is a free log subscription operation binding the contract event 0x884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364. +// +// Solidity: event Withdraw(address indexed user, uint256 amount) +func (_TankChef *TankChefFilterer) WatchWithdraw(opts *bind.WatchOpts, sink chan<- *TankChefWithdraw, user []common.Address) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + + logs, sub, err := _TankChef.contract.WatchLogs(opts, "Withdraw", userRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TankChefWithdraw) + if err := _TankChef.contract.UnpackLog(event, "Withdraw", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseWithdraw is a log parse operation binding the contract event 0x884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364. +// +// Solidity: event Withdraw(address indexed user, uint256 amount) +func (_TankChef *TankChefFilterer) ParseWithdraw(log types.Log) (*TankChefWithdraw, error) { + event := new(TankChefWithdraw) + if err := _TankChef.contract.UnpackLog(event, "Withdraw", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/polygon/contracts/wmatic.abi b/polygon/contracts/wmatic.abi new file mode 100644 index 0000000..8bc0392 --- /dev/null +++ b/polygon/contracts/wmatic.abi @@ -0,0 +1 @@ +[{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"string","name":""}],"name":"name","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":""}],"name":"approve","inputs":[{"type":"address","name":"guy"},{"type":"uint256","name":"wad"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"totalSupply","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":""}],"name":"transferFrom","inputs":[{"type":"address","name":"src"},{"type":"address","name":"dst"},{"type":"uint256","name":"wad"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"withdraw","inputs":[{"type":"uint256","name":"wad"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint8","name":""}],"name":"decimals","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"balanceOf","inputs":[{"type":"address","name":""}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"string","name":""}],"name":"symbol","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":""}],"name":"transfer","inputs":[{"type":"address","name":"dst"},{"type":"uint256","name":"wad"}],"constant":false},{"type":"function","stateMutability":"payable","payable":true,"outputs":[],"name":"deposit","inputs":[],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"allowance","inputs":[{"type":"address","name":""},{"type":"address","name":""}],"constant":true},{"type":"fallback","stateMutability":"payable","payable":true},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"src","indexed":true},{"type":"address","name":"guy","indexed":true},{"type":"uint256","name":"wad","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"src","indexed":true},{"type":"address","name":"dst","indexed":true},{"type":"uint256","name":"wad","indexed":false}],"anonymous":false},{"type":"event","name":"Deposit","inputs":[{"type":"address","name":"dst","indexed":true},{"type":"uint256","name":"wad","indexed":false}],"anonymous":false},{"type":"event","name":"Withdrawal","inputs":[{"type":"address","name":"src","indexed":true},{"type":"uint256","name":"wad","indexed":false}],"anonymous":false}] \ No newline at end of file diff --git a/polygon/contracts/wmatic.go b/polygon/contracts/wmatic.go new file mode 100644 index 0000000..8b5b26e --- /dev/null +++ b/polygon/contracts/wmatic.go @@ -0,0 +1,1082 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contracts + +import ( + "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 ( + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// WmaticABI is the input ABI used to generate the binding from. +const WmaticABI = "[{\"type\":\"function\",\"stateMutability\":\"view\",\"payable\":false,\"outputs\":[{\"type\":\"string\",\"name\":\"\"}],\"name\":\"name\",\"inputs\":[],\"constant\":true},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"payable\":false,\"outputs\":[{\"type\":\"bool\",\"name\":\"\"}],\"name\":\"approve\",\"inputs\":[{\"type\":\"address\",\"name\":\"guy\"},{\"type\":\"uint256\",\"name\":\"wad\"}],\"constant\":false},{\"type\":\"function\",\"stateMutability\":\"view\",\"payable\":false,\"outputs\":[{\"type\":\"uint256\",\"name\":\"\"}],\"name\":\"totalSupply\",\"inputs\":[],\"constant\":true},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"payable\":false,\"outputs\":[{\"type\":\"bool\",\"name\":\"\"}],\"name\":\"transferFrom\",\"inputs\":[{\"type\":\"address\",\"name\":\"src\"},{\"type\":\"address\",\"name\":\"dst\"},{\"type\":\"uint256\",\"name\":\"wad\"}],\"constant\":false},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"payable\":false,\"outputs\":[],\"name\":\"withdraw\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"wad\"}],\"constant\":false},{\"type\":\"function\",\"stateMutability\":\"view\",\"payable\":false,\"outputs\":[{\"type\":\"uint8\",\"name\":\"\"}],\"name\":\"decimals\",\"inputs\":[],\"constant\":true},{\"type\":\"function\",\"stateMutability\":\"view\",\"payable\":false,\"outputs\":[{\"type\":\"uint256\",\"name\":\"\"}],\"name\":\"balanceOf\",\"inputs\":[{\"type\":\"address\",\"name\":\"\"}],\"constant\":true},{\"type\":\"function\",\"stateMutability\":\"view\",\"payable\":false,\"outputs\":[{\"type\":\"string\",\"name\":\"\"}],\"name\":\"symbol\",\"inputs\":[],\"constant\":true},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"payable\":false,\"outputs\":[{\"type\":\"bool\",\"name\":\"\"}],\"name\":\"transfer\",\"inputs\":[{\"type\":\"address\",\"name\":\"dst\"},{\"type\":\"uint256\",\"name\":\"wad\"}],\"constant\":false},{\"type\":\"function\",\"stateMutability\":\"payable\",\"payable\":true,\"outputs\":[],\"name\":\"deposit\",\"inputs\":[],\"constant\":false},{\"type\":\"function\",\"stateMutability\":\"view\",\"payable\":false,\"outputs\":[{\"type\":\"uint256\",\"name\":\"\"}],\"name\":\"allowance\",\"inputs\":[{\"type\":\"address\",\"name\":\"\"},{\"type\":\"address\",\"name\":\"\"}],\"constant\":true},{\"type\":\"fallback\",\"stateMutability\":\"payable\",\"payable\":true},{\"type\":\"event\",\"name\":\"Approval\",\"inputs\":[{\"type\":\"address\",\"name\":\"src\",\"indexed\":true},{\"type\":\"address\",\"name\":\"guy\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"wad\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Transfer\",\"inputs\":[{\"type\":\"address\",\"name\":\"src\",\"indexed\":true},{\"type\":\"address\",\"name\":\"dst\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"wad\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Deposit\",\"inputs\":[{\"type\":\"address\",\"name\":\"dst\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"wad\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Withdrawal\",\"inputs\":[{\"type\":\"address\",\"name\":\"src\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"wad\",\"indexed\":false}],\"anonymous\":false}]" + +// Wmatic is an auto generated Go binding around an Ethereum contract. +type Wmatic struct { + WmaticCaller // Read-only binding to the contract + WmaticTransactor // Write-only binding to the contract + WmaticFilterer // Log filterer for contract events +} + +// WmaticCaller is an auto generated read-only Go binding around an Ethereum contract. +type WmaticCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// WmaticTransactor is an auto generated write-only Go binding around an Ethereum contract. +type WmaticTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// WmaticFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type WmaticFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// WmaticSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type WmaticSession struct { + Contract *Wmatic // 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 +} + +// WmaticCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type WmaticCallerSession struct { + Contract *WmaticCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// WmaticTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type WmaticTransactorSession struct { + Contract *WmaticTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// WmaticRaw is an auto generated low-level Go binding around an Ethereum contract. +type WmaticRaw struct { + Contract *Wmatic // Generic contract binding to access the raw methods on +} + +// WmaticCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type WmaticCallerRaw struct { + Contract *WmaticCaller // Generic read-only contract binding to access the raw methods on +} + +// WmaticTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type WmaticTransactorRaw struct { + Contract *WmaticTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewWmatic creates a new instance of Wmatic, bound to a specific deployed contract. +func NewWmatic(address common.Address, backend bind.ContractBackend) (*Wmatic, error) { + contract, err := bindWmatic(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Wmatic{WmaticCaller: WmaticCaller{contract: contract}, WmaticTransactor: WmaticTransactor{contract: contract}, WmaticFilterer: WmaticFilterer{contract: contract}}, nil +} + +// NewWmaticCaller creates a new read-only instance of Wmatic, bound to a specific deployed contract. +func NewWmaticCaller(address common.Address, caller bind.ContractCaller) (*WmaticCaller, error) { + contract, err := bindWmatic(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &WmaticCaller{contract: contract}, nil +} + +// NewWmaticTransactor creates a new write-only instance of Wmatic, bound to a specific deployed contract. +func NewWmaticTransactor(address common.Address, transactor bind.ContractTransactor) (*WmaticTransactor, error) { + contract, err := bindWmatic(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &WmaticTransactor{contract: contract}, nil +} + +// NewWmaticFilterer creates a new log filterer instance of Wmatic, bound to a specific deployed contract. +func NewWmaticFilterer(address common.Address, filterer bind.ContractFilterer) (*WmaticFilterer, error) { + contract, err := bindWmatic(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &WmaticFilterer{contract: contract}, nil +} + +// bindWmatic binds a generic wrapper to an already deployed contract. +func bindWmatic(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(WmaticABI)) + 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 (_Wmatic *WmaticRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Wmatic.Contract.WmaticCaller.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 (_Wmatic *WmaticRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Wmatic.Contract.WmaticTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Wmatic *WmaticRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Wmatic.Contract.WmaticTransactor.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 (_Wmatic *WmaticCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Wmatic.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 (_Wmatic *WmaticTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Wmatic.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Wmatic *WmaticTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Wmatic.Contract.contract.Transact(opts, method, params...) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address , address ) view returns(uint256) +func (_Wmatic *WmaticCaller) Allowance(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error) { + var out []interface{} + err := _Wmatic.contract.Call(opts, &out, "allowance", arg0, arg1) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address , address ) view returns(uint256) +func (_Wmatic *WmaticSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _Wmatic.Contract.Allowance(&_Wmatic.CallOpts, arg0, arg1) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address , address ) view returns(uint256) +func (_Wmatic *WmaticCallerSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _Wmatic.Contract.Allowance(&_Wmatic.CallOpts, arg0, arg1) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address ) view returns(uint256) +func (_Wmatic *WmaticCaller) BalanceOf(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _Wmatic.contract.Call(opts, &out, "balanceOf", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address ) view returns(uint256) +func (_Wmatic *WmaticSession) BalanceOf(arg0 common.Address) (*big.Int, error) { + return _Wmatic.Contract.BalanceOf(&_Wmatic.CallOpts, arg0) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address ) view returns(uint256) +func (_Wmatic *WmaticCallerSession) BalanceOf(arg0 common.Address) (*big.Int, error) { + return _Wmatic.Contract.BalanceOf(&_Wmatic.CallOpts, arg0) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_Wmatic *WmaticCaller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _Wmatic.contract.Call(opts, &out, "decimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_Wmatic *WmaticSession) Decimals() (uint8, error) { + return _Wmatic.Contract.Decimals(&_Wmatic.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_Wmatic *WmaticCallerSession) Decimals() (uint8, error) { + return _Wmatic.Contract.Decimals(&_Wmatic.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_Wmatic *WmaticCaller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _Wmatic.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_Wmatic *WmaticSession) Name() (string, error) { + return _Wmatic.Contract.Name(&_Wmatic.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_Wmatic *WmaticCallerSession) Name() (string, error) { + return _Wmatic.Contract.Name(&_Wmatic.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_Wmatic *WmaticCaller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _Wmatic.contract.Call(opts, &out, "symbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_Wmatic *WmaticSession) Symbol() (string, error) { + return _Wmatic.Contract.Symbol(&_Wmatic.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_Wmatic *WmaticCallerSession) Symbol() (string, error) { + return _Wmatic.Contract.Symbol(&_Wmatic.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_Wmatic *WmaticCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Wmatic.contract.Call(opts, &out, "totalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_Wmatic *WmaticSession) TotalSupply() (*big.Int, error) { + return _Wmatic.Contract.TotalSupply(&_Wmatic.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_Wmatic *WmaticCallerSession) TotalSupply() (*big.Int, error) { + return _Wmatic.Contract.TotalSupply(&_Wmatic.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address guy, uint256 wad) returns(bool) +func (_Wmatic *WmaticTransactor) Approve(opts *bind.TransactOpts, guy common.Address, wad *big.Int) (*types.Transaction, error) { + return _Wmatic.contract.Transact(opts, "approve", guy, wad) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address guy, uint256 wad) returns(bool) +func (_Wmatic *WmaticSession) Approve(guy common.Address, wad *big.Int) (*types.Transaction, error) { + return _Wmatic.Contract.Approve(&_Wmatic.TransactOpts, guy, wad) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address guy, uint256 wad) returns(bool) +func (_Wmatic *WmaticTransactorSession) Approve(guy common.Address, wad *big.Int) (*types.Transaction, error) { + return _Wmatic.Contract.Approve(&_Wmatic.TransactOpts, guy, wad) +} + +// Deposit is a paid mutator transaction binding the contract method 0xd0e30db0. +// +// Solidity: function deposit() payable returns() +func (_Wmatic *WmaticTransactor) Deposit(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Wmatic.contract.Transact(opts, "deposit") +} + +// Deposit is a paid mutator transaction binding the contract method 0xd0e30db0. +// +// Solidity: function deposit() payable returns() +func (_Wmatic *WmaticSession) Deposit() (*types.Transaction, error) { + return _Wmatic.Contract.Deposit(&_Wmatic.TransactOpts) +} + +// Deposit is a paid mutator transaction binding the contract method 0xd0e30db0. +// +// Solidity: function deposit() payable returns() +func (_Wmatic *WmaticTransactorSession) Deposit() (*types.Transaction, error) { + return _Wmatic.Contract.Deposit(&_Wmatic.TransactOpts) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address dst, uint256 wad) returns(bool) +func (_Wmatic *WmaticTransactor) Transfer(opts *bind.TransactOpts, dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _Wmatic.contract.Transact(opts, "transfer", dst, wad) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address dst, uint256 wad) returns(bool) +func (_Wmatic *WmaticSession) Transfer(dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _Wmatic.Contract.Transfer(&_Wmatic.TransactOpts, dst, wad) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address dst, uint256 wad) returns(bool) +func (_Wmatic *WmaticTransactorSession) Transfer(dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _Wmatic.Contract.Transfer(&_Wmatic.TransactOpts, dst, wad) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address src, address dst, uint256 wad) returns(bool) +func (_Wmatic *WmaticTransactor) TransferFrom(opts *bind.TransactOpts, src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _Wmatic.contract.Transact(opts, "transferFrom", src, dst, wad) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address src, address dst, uint256 wad) returns(bool) +func (_Wmatic *WmaticSession) TransferFrom(src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _Wmatic.Contract.TransferFrom(&_Wmatic.TransactOpts, src, dst, wad) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address src, address dst, uint256 wad) returns(bool) +func (_Wmatic *WmaticTransactorSession) TransferFrom(src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _Wmatic.Contract.TransferFrom(&_Wmatic.TransactOpts, src, dst, wad) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 wad) returns() +func (_Wmatic *WmaticTransactor) Withdraw(opts *bind.TransactOpts, wad *big.Int) (*types.Transaction, error) { + return _Wmatic.contract.Transact(opts, "withdraw", wad) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 wad) returns() +func (_Wmatic *WmaticSession) Withdraw(wad *big.Int) (*types.Transaction, error) { + return _Wmatic.Contract.Withdraw(&_Wmatic.TransactOpts, wad) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 wad) returns() +func (_Wmatic *WmaticTransactorSession) Withdraw(wad *big.Int) (*types.Transaction, error) { + return _Wmatic.Contract.Withdraw(&_Wmatic.TransactOpts, wad) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_Wmatic *WmaticTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) { + return _Wmatic.contract.RawTransact(opts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_Wmatic *WmaticSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _Wmatic.Contract.Fallback(&_Wmatic.TransactOpts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_Wmatic *WmaticTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _Wmatic.Contract.Fallback(&_Wmatic.TransactOpts, calldata) +} + +// WmaticApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the Wmatic contract. +type WmaticApprovalIterator struct { + Event *WmaticApproval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *WmaticApprovalIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(WmaticApproval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(WmaticApproval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *WmaticApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *WmaticApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// WmaticApproval represents a Approval event raised by the Wmatic contract. +type WmaticApproval struct { + Src common.Address + Guy common.Address + Wad *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed src, address indexed guy, uint256 wad) +func (_Wmatic *WmaticFilterer) FilterApproval(opts *bind.FilterOpts, src []common.Address, guy []common.Address) (*WmaticApprovalIterator, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + var guyRule []interface{} + for _, guyItem := range guy { + guyRule = append(guyRule, guyItem) + } + + logs, sub, err := _Wmatic.contract.FilterLogs(opts, "Approval", srcRule, guyRule) + if err != nil { + return nil, err + } + return &WmaticApprovalIterator{contract: _Wmatic.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed src, address indexed guy, uint256 wad) +func (_Wmatic *WmaticFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *WmaticApproval, src []common.Address, guy []common.Address) (event.Subscription, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + var guyRule []interface{} + for _, guyItem := range guy { + guyRule = append(guyRule, guyItem) + } + + logs, sub, err := _Wmatic.contract.WatchLogs(opts, "Approval", srcRule, guyRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(WmaticApproval) + if err := _Wmatic.contract.UnpackLog(event, "Approval", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed src, address indexed guy, uint256 wad) +func (_Wmatic *WmaticFilterer) ParseApproval(log types.Log) (*WmaticApproval, error) { + event := new(WmaticApproval) + if err := _Wmatic.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// WmaticDepositIterator is returned from FilterDeposit and is used to iterate over the raw logs and unpacked data for Deposit events raised by the Wmatic contract. +type WmaticDepositIterator struct { + Event *WmaticDeposit // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *WmaticDepositIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(WmaticDeposit) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(WmaticDeposit) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *WmaticDepositIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *WmaticDepositIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// WmaticDeposit represents a Deposit event raised by the Wmatic contract. +type WmaticDeposit struct { + Dst common.Address + Wad *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDeposit is a free log retrieval operation binding the contract event 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c. +// +// Solidity: event Deposit(address indexed dst, uint256 wad) +func (_Wmatic *WmaticFilterer) FilterDeposit(opts *bind.FilterOpts, dst []common.Address) (*WmaticDepositIterator, error) { + + var dstRule []interface{} + for _, dstItem := range dst { + dstRule = append(dstRule, dstItem) + } + + logs, sub, err := _Wmatic.contract.FilterLogs(opts, "Deposit", dstRule) + if err != nil { + return nil, err + } + return &WmaticDepositIterator{contract: _Wmatic.contract, event: "Deposit", logs: logs, sub: sub}, nil +} + +// WatchDeposit is a free log subscription operation binding the contract event 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c. +// +// Solidity: event Deposit(address indexed dst, uint256 wad) +func (_Wmatic *WmaticFilterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *WmaticDeposit, dst []common.Address) (event.Subscription, error) { + + var dstRule []interface{} + for _, dstItem := range dst { + dstRule = append(dstRule, dstItem) + } + + logs, sub, err := _Wmatic.contract.WatchLogs(opts, "Deposit", dstRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(WmaticDeposit) + if err := _Wmatic.contract.UnpackLog(event, "Deposit", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseDeposit is a log parse operation binding the contract event 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c. +// +// Solidity: event Deposit(address indexed dst, uint256 wad) +func (_Wmatic *WmaticFilterer) ParseDeposit(log types.Log) (*WmaticDeposit, error) { + event := new(WmaticDeposit) + if err := _Wmatic.contract.UnpackLog(event, "Deposit", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// WmaticTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the Wmatic contract. +type WmaticTransferIterator struct { + Event *WmaticTransfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *WmaticTransferIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(WmaticTransfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(WmaticTransfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *WmaticTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *WmaticTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// WmaticTransfer represents a Transfer event raised by the Wmatic contract. +type WmaticTransfer struct { + Src common.Address + Dst common.Address + Wad *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed src, address indexed dst, uint256 wad) +func (_Wmatic *WmaticFilterer) FilterTransfer(opts *bind.FilterOpts, src []common.Address, dst []common.Address) (*WmaticTransferIterator, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + var dstRule []interface{} + for _, dstItem := range dst { + dstRule = append(dstRule, dstItem) + } + + logs, sub, err := _Wmatic.contract.FilterLogs(opts, "Transfer", srcRule, dstRule) + if err != nil { + return nil, err + } + return &WmaticTransferIterator{contract: _Wmatic.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed src, address indexed dst, uint256 wad) +func (_Wmatic *WmaticFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *WmaticTransfer, src []common.Address, dst []common.Address) (event.Subscription, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + var dstRule []interface{} + for _, dstItem := range dst { + dstRule = append(dstRule, dstItem) + } + + logs, sub, err := _Wmatic.contract.WatchLogs(opts, "Transfer", srcRule, dstRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(WmaticTransfer) + if err := _Wmatic.contract.UnpackLog(event, "Transfer", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed src, address indexed dst, uint256 wad) +func (_Wmatic *WmaticFilterer) ParseTransfer(log types.Log) (*WmaticTransfer, error) { + event := new(WmaticTransfer) + if err := _Wmatic.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// WmaticWithdrawalIterator is returned from FilterWithdrawal and is used to iterate over the raw logs and unpacked data for Withdrawal events raised by the Wmatic contract. +type WmaticWithdrawalIterator struct { + Event *WmaticWithdrawal // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *WmaticWithdrawalIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(WmaticWithdrawal) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(WmaticWithdrawal) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *WmaticWithdrawalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *WmaticWithdrawalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// WmaticWithdrawal represents a Withdrawal event raised by the Wmatic contract. +type WmaticWithdrawal struct { + Src common.Address + Wad *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawal is a free log retrieval operation binding the contract event 0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65. +// +// Solidity: event Withdrawal(address indexed src, uint256 wad) +func (_Wmatic *WmaticFilterer) FilterWithdrawal(opts *bind.FilterOpts, src []common.Address) (*WmaticWithdrawalIterator, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + + logs, sub, err := _Wmatic.contract.FilterLogs(opts, "Withdrawal", srcRule) + if err != nil { + return nil, err + } + return &WmaticWithdrawalIterator{contract: _Wmatic.contract, event: "Withdrawal", logs: logs, sub: sub}, nil +} + +// WatchWithdrawal is a free log subscription operation binding the contract event 0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65. +// +// Solidity: event Withdrawal(address indexed src, uint256 wad) +func (_Wmatic *WmaticFilterer) WatchWithdrawal(opts *bind.WatchOpts, sink chan<- *WmaticWithdrawal, src []common.Address) (event.Subscription, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + + logs, sub, err := _Wmatic.contract.WatchLogs(opts, "Withdrawal", srcRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(WmaticWithdrawal) + if err := _Wmatic.contract.UnpackLog(event, "Withdrawal", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseWithdrawal is a log parse operation binding the contract event 0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65. +// +// Solidity: event Withdrawal(address indexed src, uint256 wad) +func (_Wmatic *WmaticFilterer) ParseWithdrawal(log types.Log) (*WmaticWithdrawal, error) { + event := new(WmaticWithdrawal) + if err := _Wmatic.contract.UnpackLog(event, "Withdrawal", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +}