evm/polycat/contracts/masterchefv2.go

3022 lines
122 KiB
Go
Raw Permalink Normal View History

2021-11-09 05:07:52 +00:00
// 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\"
// 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
}