evm/polycat/contracts/masterchef.go

2605 lines
108 KiB
Go
Raw 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
)
// MasterchefABI is the input ABI used to generate the binding from.
const MasterchefABI = "[{\"type\":\"constructor\",\"stateMutability\":\"nonpayable\",\"inputs\":[{\"type\":\"address\",\"name\":\"_fish\",\"internalType\":\"contractFishToken\"},{\"type\":\"uint256\",\"name\":\"_startBlock\",\"internalType\":\"uint256\"},{\"type\":\"address\",\"name\":\"_devAddress\",\"internalType\":\"address\"},{\"type\":\"address\",\"name\":\"_feeAddress\",\"internalType\":\"address\"},{\"type\":\"address\",\"name\":\"_vaultAddress\",\"internalType\":\"address\"}]},{\"type\":\"event\",\"name\":\"Deposit\",\"inputs\":[{\"type\":\"address\",\"name\":\"user\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"pid\",\"internalType\":\"uint256\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"amount\",\"internalType\":\"uint256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"EmergencyWithdraw\",\"inputs\":[{\"type\":\"address\",\"name\":\"user\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"pid\",\"internalType\":\"uint256\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"amount\",\"internalType\":\"uint256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"type\":\"address\",\"name\":\"previousOwner\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"address\",\"name\":\"newOwner\",\"internalType\":\"address\",\"indexed\":true}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ReferralCommissionPaid\",\"inputs\":[{\"type\":\"address\",\"name\":\"user\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"address\",\"name\":\"referrer\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"commissionAmount\",\"internalType\":\"uint256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SetDevAddress\",\"inputs\":[{\"type\":\"address\",\"name\":\"user\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"address\",\"name\":\"newAddress\",\"internalType\":\"address\",\"indexed\":true}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SetFeeAddress\",\"inputs\":[{\"type\":\"address\",\"name\":\"user\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"address\",\"name\":\"newAddress\",\"internalType\":\"address\",\"indexed\":true}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SetReferralAddress\",\"inputs\":[{\"type\":\"address\",\"name\":\"user\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"address\",\"name\":\"newAddress\",\"internalType\":\"contractIReferral\",\"indexed\":true}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SetVaultAddress\",\"inputs\":[{\"type\":\"address\",\"name\":\"user\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"address\",\"name\":\"newAddress\",\"internalType\":\"address\",\"indexed\":true}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"UpdateEmissionRate\",\"inputs\":[{\"type\":\"address\",\"name\":\"user\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"fishPerBlock\",\"internalType\":\"uint256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Withdraw\",\"inputs\":[{\"type\":\"address\",\"name\":\"user\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"pid\",\"internalType\":\"uint256\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"amount\",\"internalType\":\"uint256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint16\",\"name\":\"\",\"internalType\":\"uint16\"}],\"name\":\"MAXIMUM_REFERRAL_COMMISSION_RATE\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"add\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"_allocPoint\",\"internalType\":\"uint256\"},{\"type\":\"address\",\"name\":\"_lpToken\",\"internalType\":\"contractIERC20\"},{\"type\":\"uint16\",\"name\":\"_depositFeeBP\",\"internalType\":\"uint16\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"na
// Masterchef is an auto generated Go binding around an Ethereum contract.
type Masterchef struct {
MasterchefCaller // Read-only binding to the contract
MasterchefTransactor // Write-only binding to the contract
MasterchefFilterer // Log filterer for contract events
}
// MasterchefCaller is an auto generated read-only Go binding around an Ethereum contract.
type MasterchefCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// MasterchefTransactor is an auto generated write-only Go binding around an Ethereum contract.
type MasterchefTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// MasterchefFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type MasterchefFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// MasterchefSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type MasterchefSession struct {
Contract *Masterchef // Generic contract binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// MasterchefCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type MasterchefCallerSession struct {
Contract *MasterchefCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// MasterchefTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type MasterchefTransactorSession struct {
Contract *MasterchefTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// MasterchefRaw is an auto generated low-level Go binding around an Ethereum contract.
type MasterchefRaw struct {
Contract *Masterchef // Generic contract binding to access the raw methods on
}
// MasterchefCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type MasterchefCallerRaw struct {
Contract *MasterchefCaller // Generic read-only contract binding to access the raw methods on
}
// MasterchefTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type MasterchefTransactorRaw struct {
Contract *MasterchefTransactor // Generic write-only contract binding to access the raw methods on
}
// NewMasterchef creates a new instance of Masterchef, bound to a specific deployed contract.
func NewMasterchef(address common.Address, backend bind.ContractBackend) (*Masterchef, error) {
contract, err := bindMasterchef(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &Masterchef{MasterchefCaller: MasterchefCaller{contract: contract}, MasterchefTransactor: MasterchefTransactor{contract: contract}, MasterchefFilterer: MasterchefFilterer{contract: contract}}, nil
}
// NewMasterchefCaller creates a new read-only instance of Masterchef, bound to a specific deployed contract.
func NewMasterchefCaller(address common.Address, caller bind.ContractCaller) (*MasterchefCaller, error) {
contract, err := bindMasterchef(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &MasterchefCaller{contract: contract}, nil
}
// NewMasterchefTransactor creates a new write-only instance of Masterchef, bound to a specific deployed contract.
func NewMasterchefTransactor(address common.Address, transactor bind.ContractTransactor) (*MasterchefTransactor, error) {
contract, err := bindMasterchef(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &MasterchefTransactor{contract: contract}, nil
}
// NewMasterchefFilterer creates a new log filterer instance of Masterchef, bound to a specific deployed contract.
func NewMasterchefFilterer(address common.Address, filterer bind.ContractFilterer) (*MasterchefFilterer, error) {
contract, err := bindMasterchef(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &MasterchefFilterer{contract: contract}, nil
}
// bindMasterchef binds a generic wrapper to an already deployed contract.
func bindMasterchef(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(MasterchefABI))
if err != nil {
return nil, err
}
return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
}
// Call invokes the (constant) contract method with params as input values and
// sets the output to result. The result type might be a single field for simple
// returns, a slice of interfaces for anonymous returns and a struct for named
// returns.
func (_Masterchef *MasterchefRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Masterchef.Contract.MasterchefCaller.contract.Call(opts, result, method, params...)
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func (_Masterchef *MasterchefRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Masterchef.Contract.MasterchefTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Masterchef *MasterchefRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Masterchef.Contract.MasterchefTransactor.contract.Transact(opts, method, params...)
}
// Call invokes the (constant) contract method with params as input values and
// sets the output to result. The result type might be a single field for simple
// returns, a slice of interfaces for anonymous returns and a struct for named
// returns.
func (_Masterchef *MasterchefCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Masterchef.Contract.contract.Call(opts, result, method, params...)
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func (_Masterchef *MasterchefTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Masterchef.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Masterchef *MasterchefTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Masterchef.Contract.contract.Transact(opts, method, params...)
}
// MAXIMUMREFERRALCOMMISSIONRATE is a free data retrieval call binding the contract method 0x48b22bfb.
//
// Solidity: function MAXIMUM_REFERRAL_COMMISSION_RATE() view returns(uint16)
func (_Masterchef *MasterchefCaller) MAXIMUMREFERRALCOMMISSIONRATE(opts *bind.CallOpts) (uint16, error) {
var out []interface{}
err := _Masterchef.contract.Call(opts, &out, "MAXIMUM_REFERRAL_COMMISSION_RATE")
if err != nil {
return *new(uint16), err
}
out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16)
return out0, err
}
// MAXIMUMREFERRALCOMMISSIONRATE is a free data retrieval call binding the contract method 0x48b22bfb.
//
// Solidity: function MAXIMUM_REFERRAL_COMMISSION_RATE() view returns(uint16)
func (_Masterchef *MasterchefSession) MAXIMUMREFERRALCOMMISSIONRATE() (uint16, error) {
return _Masterchef.Contract.MAXIMUMREFERRALCOMMISSIONRATE(&_Masterchef.CallOpts)
}
// MAXIMUMREFERRALCOMMISSIONRATE is a free data retrieval call binding the contract method 0x48b22bfb.
//
// Solidity: function MAXIMUM_REFERRAL_COMMISSION_RATE() view returns(uint16)
func (_Masterchef *MasterchefCallerSession) MAXIMUMREFERRALCOMMISSIONRATE() (uint16, error) {
return _Masterchef.Contract.MAXIMUMREFERRALCOMMISSIONRATE(&_Masterchef.CallOpts)
}
// DevAddress is a free data retrieval call binding the contract method 0x3ad10ef6.
//
// Solidity: function devAddress() view returns(address)
func (_Masterchef *MasterchefCaller) DevAddress(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Masterchef.contract.Call(opts, &out, "devAddress")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// DevAddress is a free data retrieval call binding the contract method 0x3ad10ef6.
//
// Solidity: function devAddress() view returns(address)
func (_Masterchef *MasterchefSession) DevAddress() (common.Address, error) {
return _Masterchef.Contract.DevAddress(&_Masterchef.CallOpts)
}
// DevAddress is a free data retrieval call binding the contract method 0x3ad10ef6.
//
// Solidity: function devAddress() view returns(address)
func (_Masterchef *MasterchefCallerSession) DevAddress() (common.Address, error) {
return _Masterchef.Contract.DevAddress(&_Masterchef.CallOpts)
}
// FeeAddress is a free data retrieval call binding the contract method 0x41275358.
//
// Solidity: function feeAddress() view returns(address)
func (_Masterchef *MasterchefCaller) FeeAddress(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Masterchef.contract.Call(opts, &out, "feeAddress")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// FeeAddress is a free data retrieval call binding the contract method 0x41275358.
//
// Solidity: function feeAddress() view returns(address)
func (_Masterchef *MasterchefSession) FeeAddress() (common.Address, error) {
return _Masterchef.Contract.FeeAddress(&_Masterchef.CallOpts)
}
// FeeAddress is a free data retrieval call binding the contract method 0x41275358.
//
// Solidity: function feeAddress() view returns(address)
func (_Masterchef *MasterchefCallerSession) FeeAddress() (common.Address, error) {
return _Masterchef.Contract.FeeAddress(&_Masterchef.CallOpts)
}
// Fish is a free data retrieval call binding the contract method 0xd14775d9.
//
// Solidity: function fish() view returns(address)
func (_Masterchef *MasterchefCaller) Fish(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Masterchef.contract.Call(opts, &out, "fish")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// Fish is a free data retrieval call binding the contract method 0xd14775d9.
//
// Solidity: function fish() view returns(address)
func (_Masterchef *MasterchefSession) Fish() (common.Address, error) {
return _Masterchef.Contract.Fish(&_Masterchef.CallOpts)
}
// Fish is a free data retrieval call binding the contract method 0xd14775d9.
//
// Solidity: function fish() view returns(address)
func (_Masterchef *MasterchefCallerSession) Fish() (common.Address, error) {
return _Masterchef.Contract.Fish(&_Masterchef.CallOpts)
}
// FishPerBlock is a free data retrieval call binding the contract method 0x7b4dbaac.
//
// Solidity: function fishPerBlock() view returns(uint256)
func (_Masterchef *MasterchefCaller) FishPerBlock(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Masterchef.contract.Call(opts, &out, "fishPerBlock")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// FishPerBlock is a free data retrieval call binding the contract method 0x7b4dbaac.
//
// Solidity: function fishPerBlock() view returns(uint256)
func (_Masterchef *MasterchefSession) FishPerBlock() (*big.Int, error) {
return _Masterchef.Contract.FishPerBlock(&_Masterchef.CallOpts)
}
// FishPerBlock is a free data retrieval call binding the contract method 0x7b4dbaac.
//
// Solidity: function fishPerBlock() view returns(uint256)
func (_Masterchef *MasterchefCallerSession) FishPerBlock() (*big.Int, error) {
return _Masterchef.Contract.FishPerBlock(&_Masterchef.CallOpts)
}
// GetMultiplier is a free data retrieval call binding the contract method 0x8dbb1e3a.
//
// Solidity: function getMultiplier(uint256 _from, uint256 _to) pure returns(uint256)
func (_Masterchef *MasterchefCaller) GetMultiplier(opts *bind.CallOpts, _from *big.Int, _to *big.Int) (*big.Int, error) {
var out []interface{}
err := _Masterchef.contract.Call(opts, &out, "getMultiplier", _from, _to)
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// GetMultiplier is a free data retrieval call binding the contract method 0x8dbb1e3a.
//
// Solidity: function getMultiplier(uint256 _from, uint256 _to) pure returns(uint256)
func (_Masterchef *MasterchefSession) GetMultiplier(_from *big.Int, _to *big.Int) (*big.Int, error) {
return _Masterchef.Contract.GetMultiplier(&_Masterchef.CallOpts, _from, _to)
}
// GetMultiplier is a free data retrieval call binding the contract method 0x8dbb1e3a.
//
// Solidity: function getMultiplier(uint256 _from, uint256 _to) pure returns(uint256)
func (_Masterchef *MasterchefCallerSession) GetMultiplier(_from *big.Int, _to *big.Int) (*big.Int, error) {
return _Masterchef.Contract.GetMultiplier(&_Masterchef.CallOpts, _from, _to)
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_Masterchef *MasterchefCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Masterchef.contract.Call(opts, &out, "owner")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_Masterchef *MasterchefSession) Owner() (common.Address, error) {
return _Masterchef.Contract.Owner(&_Masterchef.CallOpts)
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_Masterchef *MasterchefCallerSession) Owner() (common.Address, error) {
return _Masterchef.Contract.Owner(&_Masterchef.CallOpts)
}
// PendingFish is a free data retrieval call binding the contract method 0xb1a8f6f1.
//
// Solidity: function pendingFish(uint256 _pid, address _user) view returns(uint256)
func (_Masterchef *MasterchefCaller) PendingFish(opts *bind.CallOpts, _pid *big.Int, _user common.Address) (*big.Int, error) {
var out []interface{}
err := _Masterchef.contract.Call(opts, &out, "pendingFish", _pid, _user)
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// PendingFish is a free data retrieval call binding the contract method 0xb1a8f6f1.
//
// Solidity: function pendingFish(uint256 _pid, address _user) view returns(uint256)
func (_Masterchef *MasterchefSession) PendingFish(_pid *big.Int, _user common.Address) (*big.Int, error) {
return _Masterchef.Contract.PendingFish(&_Masterchef.CallOpts, _pid, _user)
}
// PendingFish is a free data retrieval call binding the contract method 0xb1a8f6f1.
//
// Solidity: function pendingFish(uint256 _pid, address _user) view returns(uint256)
func (_Masterchef *MasterchefCallerSession) PendingFish(_pid *big.Int, _user common.Address) (*big.Int, error) {
return _Masterchef.Contract.PendingFish(&_Masterchef.CallOpts, _pid, _user)
}
// PoolExistence is a free data retrieval call binding the contract method 0xcbd258b5.
//
// Solidity: function poolExistence(address ) view returns(bool)
func (_Masterchef *MasterchefCaller) PoolExistence(opts *bind.CallOpts, arg0 common.Address) (bool, error) {
var out []interface{}
err := _Masterchef.contract.Call(opts, &out, "poolExistence", arg0)
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
// PoolExistence is a free data retrieval call binding the contract method 0xcbd258b5.
//
// Solidity: function poolExistence(address ) view returns(bool)
func (_Masterchef *MasterchefSession) PoolExistence(arg0 common.Address) (bool, error) {
return _Masterchef.Contract.PoolExistence(&_Masterchef.CallOpts, arg0)
}
// PoolExistence is a free data retrieval call binding the contract method 0xcbd258b5.
//
// Solidity: function poolExistence(address ) view returns(bool)
func (_Masterchef *MasterchefCallerSession) PoolExistence(arg0 common.Address) (bool, error) {
return _Masterchef.Contract.PoolExistence(&_Masterchef.CallOpts, arg0)
}
// PoolInfo is a free data retrieval call binding the contract method 0x1526fe27.
//
// Solidity: function poolInfo(uint256 ) view returns(address lpToken, uint256 allocPoint, uint256 lastRewardBlock, uint256 accFishPerShare, uint16 depositFeeBP)
func (_Masterchef *MasterchefCaller) PoolInfo(opts *bind.CallOpts, arg0 *big.Int) (struct {
LpToken common.Address
AllocPoint *big.Int
LastRewardBlock *big.Int
AccFishPerShare *big.Int
DepositFeeBP uint16
}, error) {
var out []interface{}
err := _Masterchef.contract.Call(opts, &out, "poolInfo", arg0)
outstruct := new(struct {
LpToken common.Address
AllocPoint *big.Int
LastRewardBlock *big.Int
AccFishPerShare *big.Int
DepositFeeBP uint16
})
if err != nil {
return *outstruct, err
}
outstruct.LpToken = *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
outstruct.AllocPoint = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
outstruct.LastRewardBlock = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int)
outstruct.AccFishPerShare = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int)
outstruct.DepositFeeBP = *abi.ConvertType(out[4], new(uint16)).(*uint16)
return *outstruct, err
}
// PoolInfo is a free data retrieval call binding the contract method 0x1526fe27.
//
// Solidity: function poolInfo(uint256 ) view returns(address lpToken, uint256 allocPoint, uint256 lastRewardBlock, uint256 accFishPerShare, uint16 depositFeeBP)
func (_Masterchef *MasterchefSession) PoolInfo(arg0 *big.Int) (struct {
LpToken common.Address
AllocPoint *big.Int
LastRewardBlock *big.Int
AccFishPerShare *big.Int
DepositFeeBP uint16
}, error) {
return _Masterchef.Contract.PoolInfo(&_Masterchef.CallOpts, arg0)
}
// PoolInfo is a free data retrieval call binding the contract method 0x1526fe27.
//
// Solidity: function poolInfo(uint256 ) view returns(address lpToken, uint256 allocPoint, uint256 lastRewardBlock, uint256 accFishPerShare, uint16 depositFeeBP)
func (_Masterchef *MasterchefCallerSession) PoolInfo(arg0 *big.Int) (struct {
LpToken common.Address
AllocPoint *big.Int
LastRewardBlock *big.Int
AccFishPerShare *big.Int
DepositFeeBP uint16
}, error) {
return _Masterchef.Contract.PoolInfo(&_Masterchef.CallOpts, arg0)
}
// PoolLength is a free data retrieval call binding the contract method 0x081e3eda.
//
// Solidity: function poolLength() view returns(uint256)
func (_Masterchef *MasterchefCaller) PoolLength(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Masterchef.contract.Call(opts, &out, "poolLength")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// PoolLength is a free data retrieval call binding the contract method 0x081e3eda.
//
// Solidity: function poolLength() view returns(uint256)
func (_Masterchef *MasterchefSession) PoolLength() (*big.Int, error) {
return _Masterchef.Contract.PoolLength(&_Masterchef.CallOpts)
}
// PoolLength is a free data retrieval call binding the contract method 0x081e3eda.
//
// Solidity: function poolLength() view returns(uint256)
func (_Masterchef *MasterchefCallerSession) PoolLength() (*big.Int, error) {
return _Masterchef.Contract.PoolLength(&_Masterchef.CallOpts)
}
// Referral is a free data retrieval call binding the contract method 0x1441a5a9.
//
// Solidity: function referral() view returns(address)
func (_Masterchef *MasterchefCaller) Referral(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Masterchef.contract.Call(opts, &out, "referral")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// Referral is a free data retrieval call binding the contract method 0x1441a5a9.
//
// Solidity: function referral() view returns(address)
func (_Masterchef *MasterchefSession) Referral() (common.Address, error) {
return _Masterchef.Contract.Referral(&_Masterchef.CallOpts)
}
// Referral is a free data retrieval call binding the contract method 0x1441a5a9.
//
// Solidity: function referral() view returns(address)
func (_Masterchef *MasterchefCallerSession) Referral() (common.Address, error) {
return _Masterchef.Contract.Referral(&_Masterchef.CallOpts)
}
// ReferralCommissionRate is a free data retrieval call binding the contract method 0xd30ef61b.
//
// Solidity: function referralCommissionRate() view returns(uint16)
func (_Masterchef *MasterchefCaller) ReferralCommissionRate(opts *bind.CallOpts) (uint16, error) {
var out []interface{}
err := _Masterchef.contract.Call(opts, &out, "referralCommissionRate")
if err != nil {
return *new(uint16), err
}
out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16)
return out0, err
}
// ReferralCommissionRate is a free data retrieval call binding the contract method 0xd30ef61b.
//
// Solidity: function referralCommissionRate() view returns(uint16)
func (_Masterchef *MasterchefSession) ReferralCommissionRate() (uint16, error) {
return _Masterchef.Contract.ReferralCommissionRate(&_Masterchef.CallOpts)
}
// ReferralCommissionRate is a free data retrieval call binding the contract method 0xd30ef61b.
//
// Solidity: function referralCommissionRate() view returns(uint16)
func (_Masterchef *MasterchefCallerSession) ReferralCommissionRate() (uint16, error) {
return _Masterchef.Contract.ReferralCommissionRate(&_Masterchef.CallOpts)
}
// StartBlock is a free data retrieval call binding the contract method 0x48cd4cb1.
//
// Solidity: function startBlock() view returns(uint256)
func (_Masterchef *MasterchefCaller) StartBlock(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Masterchef.contract.Call(opts, &out, "startBlock")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// StartBlock is a free data retrieval call binding the contract method 0x48cd4cb1.
//
// Solidity: function startBlock() view returns(uint256)
func (_Masterchef *MasterchefSession) StartBlock() (*big.Int, error) {
return _Masterchef.Contract.StartBlock(&_Masterchef.CallOpts)
}
// StartBlock is a free data retrieval call binding the contract method 0x48cd4cb1.
//
// Solidity: function startBlock() view returns(uint256)
func (_Masterchef *MasterchefCallerSession) StartBlock() (*big.Int, error) {
return _Masterchef.Contract.StartBlock(&_Masterchef.CallOpts)
}
// TotalAllocPoint is a free data retrieval call binding the contract method 0x17caf6f1.
//
// Solidity: function totalAllocPoint() view returns(uint256)
func (_Masterchef *MasterchefCaller) TotalAllocPoint(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Masterchef.contract.Call(opts, &out, "totalAllocPoint")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// TotalAllocPoint is a free data retrieval call binding the contract method 0x17caf6f1.
//
// Solidity: function totalAllocPoint() view returns(uint256)
func (_Masterchef *MasterchefSession) TotalAllocPoint() (*big.Int, error) {
return _Masterchef.Contract.TotalAllocPoint(&_Masterchef.CallOpts)
}
// TotalAllocPoint is a free data retrieval call binding the contract method 0x17caf6f1.
//
// Solidity: function totalAllocPoint() view returns(uint256)
func (_Masterchef *MasterchefCallerSession) TotalAllocPoint() (*big.Int, error) {
return _Masterchef.Contract.TotalAllocPoint(&_Masterchef.CallOpts)
}
// UserInfo is a free data retrieval call binding the contract method 0x93f1a40b.
//
// Solidity: function userInfo(uint256 , address ) view returns(uint256 amount, uint256 rewardDebt)
func (_Masterchef *MasterchefCaller) UserInfo(opts *bind.CallOpts, arg0 *big.Int, arg1 common.Address) (struct {
Amount *big.Int
RewardDebt *big.Int
}, error) {
var out []interface{}
err := _Masterchef.contract.Call(opts, &out, "userInfo", arg0, arg1)
outstruct := new(struct {
Amount *big.Int
RewardDebt *big.Int
})
if err != nil {
return *outstruct, err
}
outstruct.Amount = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
outstruct.RewardDebt = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
return *outstruct, err
}
// UserInfo is a free data retrieval call binding the contract method 0x93f1a40b.
//
// Solidity: function userInfo(uint256 , address ) view returns(uint256 amount, uint256 rewardDebt)
func (_Masterchef *MasterchefSession) UserInfo(arg0 *big.Int, arg1 common.Address) (struct {
Amount *big.Int
RewardDebt *big.Int
}, error) {
return _Masterchef.Contract.UserInfo(&_Masterchef.CallOpts, arg0, arg1)
}
// UserInfo is a free data retrieval call binding the contract method 0x93f1a40b.
//
// Solidity: function userInfo(uint256 , address ) view returns(uint256 amount, uint256 rewardDebt)
func (_Masterchef *MasterchefCallerSession) UserInfo(arg0 *big.Int, arg1 common.Address) (struct {
Amount *big.Int
RewardDebt *big.Int
}, error) {
return _Masterchef.Contract.UserInfo(&_Masterchef.CallOpts, arg0, arg1)
}
// VaultAddress is a free data retrieval call binding the contract method 0x430bf08a.
//
// Solidity: function vaultAddress() view returns(address)
func (_Masterchef *MasterchefCaller) VaultAddress(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Masterchef.contract.Call(opts, &out, "vaultAddress")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// VaultAddress is a free data retrieval call binding the contract method 0x430bf08a.
//
// Solidity: function vaultAddress() view returns(address)
func (_Masterchef *MasterchefSession) VaultAddress() (common.Address, error) {
return _Masterchef.Contract.VaultAddress(&_Masterchef.CallOpts)
}
// VaultAddress is a free data retrieval call binding the contract method 0x430bf08a.
//
// Solidity: function vaultAddress() view returns(address)
func (_Masterchef *MasterchefCallerSession) VaultAddress() (common.Address, error) {
return _Masterchef.Contract.VaultAddress(&_Masterchef.CallOpts)
}
// Add is a paid mutator transaction binding the contract method 0x06539275.
//
// Solidity: function add(uint256 _allocPoint, address _lpToken, uint16 _depositFeeBP) returns()
func (_Masterchef *MasterchefTransactor) Add(opts *bind.TransactOpts, _allocPoint *big.Int, _lpToken common.Address, _depositFeeBP uint16) (*types.Transaction, error) {
return _Masterchef.contract.Transact(opts, "add", _allocPoint, _lpToken, _depositFeeBP)
}
// Add is a paid mutator transaction binding the contract method 0x06539275.
//
// Solidity: function add(uint256 _allocPoint, address _lpToken, uint16 _depositFeeBP) returns()
func (_Masterchef *MasterchefSession) Add(_allocPoint *big.Int, _lpToken common.Address, _depositFeeBP uint16) (*types.Transaction, error) {
return _Masterchef.Contract.Add(&_Masterchef.TransactOpts, _allocPoint, _lpToken, _depositFeeBP)
}
// Add is a paid mutator transaction binding the contract method 0x06539275.
//
// Solidity: function add(uint256 _allocPoint, address _lpToken, uint16 _depositFeeBP) returns()
func (_Masterchef *MasterchefTransactorSession) Add(_allocPoint *big.Int, _lpToken common.Address, _depositFeeBP uint16) (*types.Transaction, error) {
return _Masterchef.Contract.Add(&_Masterchef.TransactOpts, _allocPoint, _lpToken, _depositFeeBP)
}
// Deposit is a paid mutator transaction binding the contract method 0x8dbdbe6d.
//
// Solidity: function deposit(uint256 _pid, uint256 _amount, address _referrer) returns()
func (_Masterchef *MasterchefTransactor) Deposit(opts *bind.TransactOpts, _pid *big.Int, _amount *big.Int, _referrer common.Address) (*types.Transaction, error) {
return _Masterchef.contract.Transact(opts, "deposit", _pid, _amount, _referrer)
}
// Deposit is a paid mutator transaction binding the contract method 0x8dbdbe6d.
//
// Solidity: function deposit(uint256 _pid, uint256 _amount, address _referrer) returns()
func (_Masterchef *MasterchefSession) Deposit(_pid *big.Int, _amount *big.Int, _referrer common.Address) (*types.Transaction, error) {
return _Masterchef.Contract.Deposit(&_Masterchef.TransactOpts, _pid, _amount, _referrer)
}
// Deposit is a paid mutator transaction binding the contract method 0x8dbdbe6d.
//
// Solidity: function deposit(uint256 _pid, uint256 _amount, address _referrer) returns()
func (_Masterchef *MasterchefTransactorSession) Deposit(_pid *big.Int, _amount *big.Int, _referrer common.Address) (*types.Transaction, error) {
return _Masterchef.Contract.Deposit(&_Masterchef.TransactOpts, _pid, _amount, _referrer)
}
// EmergencyWithdraw is a paid mutator transaction binding the contract method 0x5312ea8e.
//
// Solidity: function emergencyWithdraw(uint256 _pid) returns()
func (_Masterchef *MasterchefTransactor) EmergencyWithdraw(opts *bind.TransactOpts, _pid *big.Int) (*types.Transaction, error) {
return _Masterchef.contract.Transact(opts, "emergencyWithdraw", _pid)
}
// EmergencyWithdraw is a paid mutator transaction binding the contract method 0x5312ea8e.
//
// Solidity: function emergencyWithdraw(uint256 _pid) returns()
func (_Masterchef *MasterchefSession) EmergencyWithdraw(_pid *big.Int) (*types.Transaction, error) {
return _Masterchef.Contract.EmergencyWithdraw(&_Masterchef.TransactOpts, _pid)
}
// EmergencyWithdraw is a paid mutator transaction binding the contract method 0x5312ea8e.
//
// Solidity: function emergencyWithdraw(uint256 _pid) returns()
func (_Masterchef *MasterchefTransactorSession) EmergencyWithdraw(_pid *big.Int) (*types.Transaction, error) {
return _Masterchef.Contract.EmergencyWithdraw(&_Masterchef.TransactOpts, _pid)
}
// MassUpdatePools is a paid mutator transaction binding the contract method 0x630b5ba1.
//
// Solidity: function massUpdatePools() returns()
func (_Masterchef *MasterchefTransactor) MassUpdatePools(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Masterchef.contract.Transact(opts, "massUpdatePools")
}
// MassUpdatePools is a paid mutator transaction binding the contract method 0x630b5ba1.
//
// Solidity: function massUpdatePools() returns()
func (_Masterchef *MasterchefSession) MassUpdatePools() (*types.Transaction, error) {
return _Masterchef.Contract.MassUpdatePools(&_Masterchef.TransactOpts)
}
// MassUpdatePools is a paid mutator transaction binding the contract method 0x630b5ba1.
//
// Solidity: function massUpdatePools() returns()
func (_Masterchef *MasterchefTransactorSession) MassUpdatePools() (*types.Transaction, error) {
return _Masterchef.Contract.MassUpdatePools(&_Masterchef.TransactOpts)
}
// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
//
// Solidity: function renounceOwnership() returns()
func (_Masterchef *MasterchefTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Masterchef.contract.Transact(opts, "renounceOwnership")
}
// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
//
// Solidity: function renounceOwnership() returns()
func (_Masterchef *MasterchefSession) RenounceOwnership() (*types.Transaction, error) {
return _Masterchef.Contract.RenounceOwnership(&_Masterchef.TransactOpts)
}
// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
//
// Solidity: function renounceOwnership() returns()
func (_Masterchef *MasterchefTransactorSession) RenounceOwnership() (*types.Transaction, error) {
return _Masterchef.Contract.RenounceOwnership(&_Masterchef.TransactOpts)
}
// Set is a paid mutator transaction binding the contract method 0x24bcb38c.
//
// Solidity: function set(uint256 _pid, uint256 _allocPoint, uint16 _depositFeeBP) returns()
func (_Masterchef *MasterchefTransactor) Set(opts *bind.TransactOpts, _pid *big.Int, _allocPoint *big.Int, _depositFeeBP uint16) (*types.Transaction, error) {
return _Masterchef.contract.Transact(opts, "set", _pid, _allocPoint, _depositFeeBP)
}
// Set is a paid mutator transaction binding the contract method 0x24bcb38c.
//
// Solidity: function set(uint256 _pid, uint256 _allocPoint, uint16 _depositFeeBP) returns()
func (_Masterchef *MasterchefSession) Set(_pid *big.Int, _allocPoint *big.Int, _depositFeeBP uint16) (*types.Transaction, error) {
return _Masterchef.Contract.Set(&_Masterchef.TransactOpts, _pid, _allocPoint, _depositFeeBP)
}
// Set is a paid mutator transaction binding the contract method 0x24bcb38c.
//
// Solidity: function set(uint256 _pid, uint256 _allocPoint, uint16 _depositFeeBP) returns()
func (_Masterchef *MasterchefTransactorSession) Set(_pid *big.Int, _allocPoint *big.Int, _depositFeeBP uint16) (*types.Transaction, error) {
return _Masterchef.Contract.Set(&_Masterchef.TransactOpts, _pid, _allocPoint, _depositFeeBP)
}
// SetDevAddress is a paid mutator transaction binding the contract method 0xd0d41fe1.
//
// Solidity: function setDevAddress(address _devAddress) returns()
func (_Masterchef *MasterchefTransactor) SetDevAddress(opts *bind.TransactOpts, _devAddress common.Address) (*types.Transaction, error) {
return _Masterchef.contract.Transact(opts, "setDevAddress", _devAddress)
}
// SetDevAddress is a paid mutator transaction binding the contract method 0xd0d41fe1.
//
// Solidity: function setDevAddress(address _devAddress) returns()
func (_Masterchef *MasterchefSession) SetDevAddress(_devAddress common.Address) (*types.Transaction, error) {
return _Masterchef.Contract.SetDevAddress(&_Masterchef.TransactOpts, _devAddress)
}
// SetDevAddress is a paid mutator transaction binding the contract method 0xd0d41fe1.
//
// Solidity: function setDevAddress(address _devAddress) returns()
func (_Masterchef *MasterchefTransactorSession) SetDevAddress(_devAddress common.Address) (*types.Transaction, error) {
return _Masterchef.Contract.SetDevAddress(&_Masterchef.TransactOpts, _devAddress)
}
// SetFeeAddress is a paid mutator transaction binding the contract method 0x8705fcd4.
//
// Solidity: function setFeeAddress(address _feeAddress) returns()
func (_Masterchef *MasterchefTransactor) SetFeeAddress(opts *bind.TransactOpts, _feeAddress common.Address) (*types.Transaction, error) {
return _Masterchef.contract.Transact(opts, "setFeeAddress", _feeAddress)
}
// SetFeeAddress is a paid mutator transaction binding the contract method 0x8705fcd4.
//
// Solidity: function setFeeAddress(address _feeAddress) returns()
func (_Masterchef *MasterchefSession) SetFeeAddress(_feeAddress common.Address) (*types.Transaction, error) {
return _Masterchef.Contract.SetFeeAddress(&_Masterchef.TransactOpts, _feeAddress)
}
// SetFeeAddress is a paid mutator transaction binding the contract method 0x8705fcd4.
//
// Solidity: function setFeeAddress(address _feeAddress) returns()
func (_Masterchef *MasterchefTransactorSession) SetFeeAddress(_feeAddress common.Address) (*types.Transaction, error) {
return _Masterchef.Contract.SetFeeAddress(&_Masterchef.TransactOpts, _feeAddress)
}
// SetReferralAddress is a paid mutator transaction binding the contract method 0xb3caba5a.
//
// Solidity: function setReferralAddress(address _referral) returns()
func (_Masterchef *MasterchefTransactor) SetReferralAddress(opts *bind.TransactOpts, _referral common.Address) (*types.Transaction, error) {
return _Masterchef.contract.Transact(opts, "setReferralAddress", _referral)
}
// SetReferralAddress is a paid mutator transaction binding the contract method 0xb3caba5a.
//
// Solidity: function setReferralAddress(address _referral) returns()
func (_Masterchef *MasterchefSession) SetReferralAddress(_referral common.Address) (*types.Transaction, error) {
return _Masterchef.Contract.SetReferralAddress(&_Masterchef.TransactOpts, _referral)
}
// SetReferralAddress is a paid mutator transaction binding the contract method 0xb3caba5a.
//
// Solidity: function setReferralAddress(address _referral) returns()
func (_Masterchef *MasterchefTransactorSession) SetReferralAddress(_referral common.Address) (*types.Transaction, error) {
return _Masterchef.Contract.SetReferralAddress(&_Masterchef.TransactOpts, _referral)
}
// SetReferralCommissionRate is a paid mutator transaction binding the contract method 0x55dbc826.
//
// Solidity: function setReferralCommissionRate(uint16 _referralCommissionRate) returns()
func (_Masterchef *MasterchefTransactor) SetReferralCommissionRate(opts *bind.TransactOpts, _referralCommissionRate uint16) (*types.Transaction, error) {
return _Masterchef.contract.Transact(opts, "setReferralCommissionRate", _referralCommissionRate)
}
// SetReferralCommissionRate is a paid mutator transaction binding the contract method 0x55dbc826.
//
// Solidity: function setReferralCommissionRate(uint16 _referralCommissionRate) returns()
func (_Masterchef *MasterchefSession) SetReferralCommissionRate(_referralCommissionRate uint16) (*types.Transaction, error) {
return _Masterchef.Contract.SetReferralCommissionRate(&_Masterchef.TransactOpts, _referralCommissionRate)
}
// SetReferralCommissionRate is a paid mutator transaction binding the contract method 0x55dbc826.
//
// Solidity: function setReferralCommissionRate(uint16 _referralCommissionRate) returns()
func (_Masterchef *MasterchefTransactorSession) SetReferralCommissionRate(_referralCommissionRate uint16) (*types.Transaction, error) {
return _Masterchef.Contract.SetReferralCommissionRate(&_Masterchef.TransactOpts, _referralCommissionRate)
}
// SetVaultAddress is a paid mutator transaction binding the contract method 0x85535cc5.
//
// Solidity: function setVaultAddress(address _vaultAddress) returns()
func (_Masterchef *MasterchefTransactor) SetVaultAddress(opts *bind.TransactOpts, _vaultAddress common.Address) (*types.Transaction, error) {
return _Masterchef.contract.Transact(opts, "setVaultAddress", _vaultAddress)
}
// SetVaultAddress is a paid mutator transaction binding the contract method 0x85535cc5.
//
// Solidity: function setVaultAddress(address _vaultAddress) returns()
func (_Masterchef *MasterchefSession) SetVaultAddress(_vaultAddress common.Address) (*types.Transaction, error) {
return _Masterchef.Contract.SetVaultAddress(&_Masterchef.TransactOpts, _vaultAddress)
}
// SetVaultAddress is a paid mutator transaction binding the contract method 0x85535cc5.
//
// Solidity: function setVaultAddress(address _vaultAddress) returns()
func (_Masterchef *MasterchefTransactorSession) SetVaultAddress(_vaultAddress common.Address) (*types.Transaction, error) {
return _Masterchef.Contract.SetVaultAddress(&_Masterchef.TransactOpts, _vaultAddress)
}
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
func (_Masterchef *MasterchefTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) {
return _Masterchef.contract.Transact(opts, "transferOwnership", newOwner)
}
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
func (_Masterchef *MasterchefSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
return _Masterchef.Contract.TransferOwnership(&_Masterchef.TransactOpts, newOwner)
}
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
func (_Masterchef *MasterchefTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
return _Masterchef.Contract.TransferOwnership(&_Masterchef.TransactOpts, newOwner)
}
// UpdateEmissionRate is a paid mutator transaction binding the contract method 0x0ba84cd2.
//
// Solidity: function updateEmissionRate(uint256 _fishPerBlock) returns()
func (_Masterchef *MasterchefTransactor) UpdateEmissionRate(opts *bind.TransactOpts, _fishPerBlock *big.Int) (*types.Transaction, error) {
return _Masterchef.contract.Transact(opts, "updateEmissionRate", _fishPerBlock)
}
// UpdateEmissionRate is a paid mutator transaction binding the contract method 0x0ba84cd2.
//
// Solidity: function updateEmissionRate(uint256 _fishPerBlock) returns()
func (_Masterchef *MasterchefSession) UpdateEmissionRate(_fishPerBlock *big.Int) (*types.Transaction, error) {
return _Masterchef.Contract.UpdateEmissionRate(&_Masterchef.TransactOpts, _fishPerBlock)
}
// UpdateEmissionRate is a paid mutator transaction binding the contract method 0x0ba84cd2.
//
// Solidity: function updateEmissionRate(uint256 _fishPerBlock) returns()
func (_Masterchef *MasterchefTransactorSession) UpdateEmissionRate(_fishPerBlock *big.Int) (*types.Transaction, error) {
return _Masterchef.Contract.UpdateEmissionRate(&_Masterchef.TransactOpts, _fishPerBlock)
}
// UpdatePool is a paid mutator transaction binding the contract method 0x51eb05a6.
//
// Solidity: function updatePool(uint256 _pid) returns()
func (_Masterchef *MasterchefTransactor) UpdatePool(opts *bind.TransactOpts, _pid *big.Int) (*types.Transaction, error) {
return _Masterchef.contract.Transact(opts, "updatePool", _pid)
}
// UpdatePool is a paid mutator transaction binding the contract method 0x51eb05a6.
//
// Solidity: function updatePool(uint256 _pid) returns()
func (_Masterchef *MasterchefSession) UpdatePool(_pid *big.Int) (*types.Transaction, error) {
return _Masterchef.Contract.UpdatePool(&_Masterchef.TransactOpts, _pid)
}
// UpdatePool is a paid mutator transaction binding the contract method 0x51eb05a6.
//
// Solidity: function updatePool(uint256 _pid) returns()
func (_Masterchef *MasterchefTransactorSession) UpdatePool(_pid *big.Int) (*types.Transaction, error) {
return _Masterchef.Contract.UpdatePool(&_Masterchef.TransactOpts, _pid)
}
// UpdateStartBlock is a paid mutator transaction binding the contract method 0xfac2b9ba.
//
// Solidity: function updateStartBlock(uint256 _startBlock) returns()
func (_Masterchef *MasterchefTransactor) UpdateStartBlock(opts *bind.TransactOpts, _startBlock *big.Int) (*types.Transaction, error) {
return _Masterchef.contract.Transact(opts, "updateStartBlock", _startBlock)
}
// UpdateStartBlock is a paid mutator transaction binding the contract method 0xfac2b9ba.
//
// Solidity: function updateStartBlock(uint256 _startBlock) returns()
func (_Masterchef *MasterchefSession) UpdateStartBlock(_startBlock *big.Int) (*types.Transaction, error) {
return _Masterchef.Contract.UpdateStartBlock(&_Masterchef.TransactOpts, _startBlock)
}
// UpdateStartBlock is a paid mutator transaction binding the contract method 0xfac2b9ba.
//
// Solidity: function updateStartBlock(uint256 _startBlock) returns()
func (_Masterchef *MasterchefTransactorSession) UpdateStartBlock(_startBlock *big.Int) (*types.Transaction, error) {
return _Masterchef.Contract.UpdateStartBlock(&_Masterchef.TransactOpts, _startBlock)
}
// Withdraw is a paid mutator transaction binding the contract method 0x441a3e70.
//
// Solidity: function withdraw(uint256 _pid, uint256 _amount) returns()
func (_Masterchef *MasterchefTransactor) Withdraw(opts *bind.TransactOpts, _pid *big.Int, _amount *big.Int) (*types.Transaction, error) {
return _Masterchef.contract.Transact(opts, "withdraw", _pid, _amount)
}
// Withdraw is a paid mutator transaction binding the contract method 0x441a3e70.
//
// Solidity: function withdraw(uint256 _pid, uint256 _amount) returns()
func (_Masterchef *MasterchefSession) Withdraw(_pid *big.Int, _amount *big.Int) (*types.Transaction, error) {
return _Masterchef.Contract.Withdraw(&_Masterchef.TransactOpts, _pid, _amount)
}
// Withdraw is a paid mutator transaction binding the contract method 0x441a3e70.
//
// Solidity: function withdraw(uint256 _pid, uint256 _amount) returns()
func (_Masterchef *MasterchefTransactorSession) Withdraw(_pid *big.Int, _amount *big.Int) (*types.Transaction, error) {
return _Masterchef.Contract.Withdraw(&_Masterchef.TransactOpts, _pid, _amount)
}
// MasterchefDepositIterator is returned from FilterDeposit and is used to iterate over the raw logs and unpacked data for Deposit events raised by the Masterchef contract.
type MasterchefDepositIterator struct {
Event *MasterchefDeposit // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *MasterchefDepositIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(MasterchefDeposit)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(MasterchefDeposit)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *MasterchefDepositIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *MasterchefDepositIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// MasterchefDeposit represents a Deposit event raised by the Masterchef contract.
type MasterchefDeposit struct {
User common.Address
Pid *big.Int
Amount *big.Int
Raw types.Log // Blockchain specific contextual infos
}
// FilterDeposit is a free log retrieval operation binding the contract event 0x90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15.
//
// Solidity: event Deposit(address indexed user, uint256 indexed pid, uint256 amount)
func (_Masterchef *MasterchefFilterer) FilterDeposit(opts *bind.FilterOpts, user []common.Address, pid []*big.Int) (*MasterchefDepositIterator, error) {
var userRule []interface{}
for _, userItem := range user {
userRule = append(userRule, userItem)
}
var pidRule []interface{}
for _, pidItem := range pid {
pidRule = append(pidRule, pidItem)
}
logs, sub, err := _Masterchef.contract.FilterLogs(opts, "Deposit", userRule, pidRule)
if err != nil {
return nil, err
}
return &MasterchefDepositIterator{contract: _Masterchef.contract, event: "Deposit", logs: logs, sub: sub}, nil
}
// WatchDeposit is a free log subscription operation binding the contract event 0x90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15.
//
// Solidity: event Deposit(address indexed user, uint256 indexed pid, uint256 amount)
func (_Masterchef *MasterchefFilterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *MasterchefDeposit, user []common.Address, pid []*big.Int) (event.Subscription, error) {
var userRule []interface{}
for _, userItem := range user {
userRule = append(userRule, userItem)
}
var pidRule []interface{}
for _, pidItem := range pid {
pidRule = append(pidRule, pidItem)
}
logs, sub, err := _Masterchef.contract.WatchLogs(opts, "Deposit", userRule, pidRule)
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(MasterchefDeposit)
if err := _Masterchef.contract.UnpackLog(event, "Deposit", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseDeposit is a log parse operation binding the contract event 0x90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15.
//
// Solidity: event Deposit(address indexed user, uint256 indexed pid, uint256 amount)
func (_Masterchef *MasterchefFilterer) ParseDeposit(log types.Log) (*MasterchefDeposit, error) {
event := new(MasterchefDeposit)
if err := _Masterchef.contract.UnpackLog(event, "Deposit", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// MasterchefEmergencyWithdrawIterator is returned from FilterEmergencyWithdraw and is used to iterate over the raw logs and unpacked data for EmergencyWithdraw events raised by the Masterchef contract.
type MasterchefEmergencyWithdrawIterator struct {
Event *MasterchefEmergencyWithdraw // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *MasterchefEmergencyWithdrawIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(MasterchefEmergencyWithdraw)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(MasterchefEmergencyWithdraw)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *MasterchefEmergencyWithdrawIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *MasterchefEmergencyWithdrawIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// MasterchefEmergencyWithdraw represents a EmergencyWithdraw event raised by the Masterchef contract.
type MasterchefEmergencyWithdraw struct {
User common.Address
Pid *big.Int
Amount *big.Int
Raw types.Log // Blockchain specific contextual infos
}
// FilterEmergencyWithdraw is a free log retrieval operation binding the contract event 0xbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595.
//
// Solidity: event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount)
func (_Masterchef *MasterchefFilterer) FilterEmergencyWithdraw(opts *bind.FilterOpts, user []common.Address, pid []*big.Int) (*MasterchefEmergencyWithdrawIterator, error) {
var userRule []interface{}
for _, userItem := range user {
userRule = append(userRule, userItem)
}
var pidRule []interface{}
for _, pidItem := range pid {
pidRule = append(pidRule, pidItem)
}
logs, sub, err := _Masterchef.contract.FilterLogs(opts, "EmergencyWithdraw", userRule, pidRule)
if err != nil {
return nil, err
}
return &MasterchefEmergencyWithdrawIterator{contract: _Masterchef.contract, event: "EmergencyWithdraw", logs: logs, sub: sub}, nil
}
// WatchEmergencyWithdraw is a free log subscription operation binding the contract event 0xbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595.
//
// Solidity: event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount)
func (_Masterchef *MasterchefFilterer) WatchEmergencyWithdraw(opts *bind.WatchOpts, sink chan<- *MasterchefEmergencyWithdraw, user []common.Address, pid []*big.Int) (event.Subscription, error) {
var userRule []interface{}
for _, userItem := range user {
userRule = append(userRule, userItem)
}
var pidRule []interface{}
for _, pidItem := range pid {
pidRule = append(pidRule, pidItem)
}
logs, sub, err := _Masterchef.contract.WatchLogs(opts, "EmergencyWithdraw", userRule, pidRule)
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(MasterchefEmergencyWithdraw)
if err := _Masterchef.contract.UnpackLog(event, "EmergencyWithdraw", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseEmergencyWithdraw is a log parse operation binding the contract event 0xbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595.
//
// Solidity: event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount)
func (_Masterchef *MasterchefFilterer) ParseEmergencyWithdraw(log types.Log) (*MasterchefEmergencyWithdraw, error) {
event := new(MasterchefEmergencyWithdraw)
if err := _Masterchef.contract.UnpackLog(event, "EmergencyWithdraw", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// MasterchefOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Masterchef contract.
type MasterchefOwnershipTransferredIterator struct {
Event *MasterchefOwnershipTransferred // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *MasterchefOwnershipTransferredIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(MasterchefOwnershipTransferred)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(MasterchefOwnershipTransferred)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *MasterchefOwnershipTransferredIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *MasterchefOwnershipTransferredIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// MasterchefOwnershipTransferred represents a OwnershipTransferred event raised by the Masterchef contract.
type MasterchefOwnershipTransferred struct {
PreviousOwner common.Address
NewOwner common.Address
Raw types.Log // Blockchain specific contextual infos
}
// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
func (_Masterchef *MasterchefFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*MasterchefOwnershipTransferredIterator, error) {
var previousOwnerRule []interface{}
for _, previousOwnerItem := range previousOwner {
previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
}
var newOwnerRule []interface{}
for _, newOwnerItem := range newOwner {
newOwnerRule = append(newOwnerRule, newOwnerItem)
}
logs, sub, err := _Masterchef.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
if err != nil {
return nil, err
}
return &MasterchefOwnershipTransferredIterator{contract: _Masterchef.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil
}
// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
func (_Masterchef *MasterchefFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *MasterchefOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) {
var previousOwnerRule []interface{}
for _, previousOwnerItem := range previousOwner {
previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
}
var newOwnerRule []interface{}
for _, newOwnerItem := range newOwner {
newOwnerRule = append(newOwnerRule, newOwnerItem)
}
logs, sub, err := _Masterchef.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(MasterchefOwnershipTransferred)
if err := _Masterchef.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
func (_Masterchef *MasterchefFilterer) ParseOwnershipTransferred(log types.Log) (*MasterchefOwnershipTransferred, error) {
event := new(MasterchefOwnershipTransferred)
if err := _Masterchef.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// MasterchefReferralCommissionPaidIterator is returned from FilterReferralCommissionPaid and is used to iterate over the raw logs and unpacked data for ReferralCommissionPaid events raised by the Masterchef contract.
type MasterchefReferralCommissionPaidIterator struct {
Event *MasterchefReferralCommissionPaid // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *MasterchefReferralCommissionPaidIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(MasterchefReferralCommissionPaid)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(MasterchefReferralCommissionPaid)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *MasterchefReferralCommissionPaidIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *MasterchefReferralCommissionPaidIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// MasterchefReferralCommissionPaid represents a ReferralCommissionPaid event raised by the Masterchef contract.
type MasterchefReferralCommissionPaid struct {
User common.Address
Referrer common.Address
CommissionAmount *big.Int
Raw types.Log // Blockchain specific contextual infos
}
// FilterReferralCommissionPaid is a free log retrieval operation binding the contract event 0x86ddab457291316e0f5496737e5ca67c4037234c32c3be04c48ae96186893a7b.
//
// Solidity: event ReferralCommissionPaid(address indexed user, address indexed referrer, uint256 commissionAmount)
func (_Masterchef *MasterchefFilterer) FilterReferralCommissionPaid(opts *bind.FilterOpts, user []common.Address, referrer []common.Address) (*MasterchefReferralCommissionPaidIterator, error) {
var userRule []interface{}
for _, userItem := range user {
userRule = append(userRule, userItem)
}
var referrerRule []interface{}
for _, referrerItem := range referrer {
referrerRule = append(referrerRule, referrerItem)
}
logs, sub, err := _Masterchef.contract.FilterLogs(opts, "ReferralCommissionPaid", userRule, referrerRule)
if err != nil {
return nil, err
}
return &MasterchefReferralCommissionPaidIterator{contract: _Masterchef.contract, event: "ReferralCommissionPaid", logs: logs, sub: sub}, nil
}
// WatchReferralCommissionPaid is a free log subscription operation binding the contract event 0x86ddab457291316e0f5496737e5ca67c4037234c32c3be04c48ae96186893a7b.
//
// Solidity: event ReferralCommissionPaid(address indexed user, address indexed referrer, uint256 commissionAmount)
func (_Masterchef *MasterchefFilterer) WatchReferralCommissionPaid(opts *bind.WatchOpts, sink chan<- *MasterchefReferralCommissionPaid, user []common.Address, referrer []common.Address) (event.Subscription, error) {
var userRule []interface{}
for _, userItem := range user {
userRule = append(userRule, userItem)
}
var referrerRule []interface{}
for _, referrerItem := range referrer {
referrerRule = append(referrerRule, referrerItem)
}
logs, sub, err := _Masterchef.contract.WatchLogs(opts, "ReferralCommissionPaid", userRule, referrerRule)
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(MasterchefReferralCommissionPaid)
if err := _Masterchef.contract.UnpackLog(event, "ReferralCommissionPaid", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseReferralCommissionPaid is a log parse operation binding the contract event 0x86ddab457291316e0f5496737e5ca67c4037234c32c3be04c48ae96186893a7b.
//
// Solidity: event ReferralCommissionPaid(address indexed user, address indexed referrer, uint256 commissionAmount)
func (_Masterchef *MasterchefFilterer) ParseReferralCommissionPaid(log types.Log) (*MasterchefReferralCommissionPaid, error) {
event := new(MasterchefReferralCommissionPaid)
if err := _Masterchef.contract.UnpackLog(event, "ReferralCommissionPaid", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// MasterchefSetDevAddressIterator is returned from FilterSetDevAddress and is used to iterate over the raw logs and unpacked data for SetDevAddress events raised by the Masterchef contract.
type MasterchefSetDevAddressIterator struct {
Event *MasterchefSetDevAddress // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *MasterchefSetDevAddressIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(MasterchefSetDevAddress)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(MasterchefSetDevAddress)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *MasterchefSetDevAddressIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *MasterchefSetDevAddressIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// MasterchefSetDevAddress represents a SetDevAddress event raised by the Masterchef contract.
type MasterchefSetDevAddress struct {
User common.Address
NewAddress common.Address
Raw types.Log // Blockchain specific contextual infos
}
// FilterSetDevAddress is a free log retrieval operation binding the contract event 0x618c54559e94f1499a808aad71ee8729f8e74e8c48e979616328ce493a1a52e7.
//
// Solidity: event SetDevAddress(address indexed user, address indexed newAddress)
func (_Masterchef *MasterchefFilterer) FilterSetDevAddress(opts *bind.FilterOpts, user []common.Address, newAddress []common.Address) (*MasterchefSetDevAddressIterator, error) {
var userRule []interface{}
for _, userItem := range user {
userRule = append(userRule, userItem)
}
var newAddressRule []interface{}
for _, newAddressItem := range newAddress {
newAddressRule = append(newAddressRule, newAddressItem)
}
logs, sub, err := _Masterchef.contract.FilterLogs(opts, "SetDevAddress", userRule, newAddressRule)
if err != nil {
return nil, err
}
return &MasterchefSetDevAddressIterator{contract: _Masterchef.contract, event: "SetDevAddress", logs: logs, sub: sub}, nil
}
// WatchSetDevAddress is a free log subscription operation binding the contract event 0x618c54559e94f1499a808aad71ee8729f8e74e8c48e979616328ce493a1a52e7.
//
// Solidity: event SetDevAddress(address indexed user, address indexed newAddress)
func (_Masterchef *MasterchefFilterer) WatchSetDevAddress(opts *bind.WatchOpts, sink chan<- *MasterchefSetDevAddress, user []common.Address, newAddress []common.Address) (event.Subscription, error) {
var userRule []interface{}
for _, userItem := range user {
userRule = append(userRule, userItem)
}
var newAddressRule []interface{}
for _, newAddressItem := range newAddress {
newAddressRule = append(newAddressRule, newAddressItem)
}
logs, sub, err := _Masterchef.contract.WatchLogs(opts, "SetDevAddress", userRule, newAddressRule)
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(MasterchefSetDevAddress)
if err := _Masterchef.contract.UnpackLog(event, "SetDevAddress", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseSetDevAddress is a log parse operation binding the contract event 0x618c54559e94f1499a808aad71ee8729f8e74e8c48e979616328ce493a1a52e7.
//
// Solidity: event SetDevAddress(address indexed user, address indexed newAddress)
func (_Masterchef *MasterchefFilterer) ParseSetDevAddress(log types.Log) (*MasterchefSetDevAddress, error) {
event := new(MasterchefSetDevAddress)
if err := _Masterchef.contract.UnpackLog(event, "SetDevAddress", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// MasterchefSetFeeAddressIterator is returned from FilterSetFeeAddress and is used to iterate over the raw logs and unpacked data for SetFeeAddress events raised by the Masterchef contract.
type MasterchefSetFeeAddressIterator struct {
Event *MasterchefSetFeeAddress // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *MasterchefSetFeeAddressIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(MasterchefSetFeeAddress)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(MasterchefSetFeeAddress)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *MasterchefSetFeeAddressIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *MasterchefSetFeeAddressIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// MasterchefSetFeeAddress represents a SetFeeAddress event raised by the Masterchef contract.
type MasterchefSetFeeAddress struct {
User common.Address
NewAddress common.Address
Raw types.Log // Blockchain specific contextual infos
}
// FilterSetFeeAddress is a free log retrieval operation binding the contract event 0xd44190acf9d04bdb5d3a1aafff7e6dee8b40b93dfb8c5d3f0eea4b9f4539c3f7.
//
// Solidity: event SetFeeAddress(address indexed user, address indexed newAddress)
func (_Masterchef *MasterchefFilterer) FilterSetFeeAddress(opts *bind.FilterOpts, user []common.Address, newAddress []common.Address) (*MasterchefSetFeeAddressIterator, error) {
var userRule []interface{}
for _, userItem := range user {
userRule = append(userRule, userItem)
}
var newAddressRule []interface{}
for _, newAddressItem := range newAddress {
newAddressRule = append(newAddressRule, newAddressItem)
}
logs, sub, err := _Masterchef.contract.FilterLogs(opts, "SetFeeAddress", userRule, newAddressRule)
if err != nil {
return nil, err
}
return &MasterchefSetFeeAddressIterator{contract: _Masterchef.contract, event: "SetFeeAddress", logs: logs, sub: sub}, nil
}
// WatchSetFeeAddress is a free log subscription operation binding the contract event 0xd44190acf9d04bdb5d3a1aafff7e6dee8b40b93dfb8c5d3f0eea4b9f4539c3f7.
//
// Solidity: event SetFeeAddress(address indexed user, address indexed newAddress)
func (_Masterchef *MasterchefFilterer) WatchSetFeeAddress(opts *bind.WatchOpts, sink chan<- *MasterchefSetFeeAddress, user []common.Address, newAddress []common.Address) (event.Subscription, error) {
var userRule []interface{}
for _, userItem := range user {
userRule = append(userRule, userItem)
}
var newAddressRule []interface{}
for _, newAddressItem := range newAddress {
newAddressRule = append(newAddressRule, newAddressItem)
}
logs, sub, err := _Masterchef.contract.WatchLogs(opts, "SetFeeAddress", userRule, newAddressRule)
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(MasterchefSetFeeAddress)
if err := _Masterchef.contract.UnpackLog(event, "SetFeeAddress", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseSetFeeAddress is a log parse operation binding the contract event 0xd44190acf9d04bdb5d3a1aafff7e6dee8b40b93dfb8c5d3f0eea4b9f4539c3f7.
//
// Solidity: event SetFeeAddress(address indexed user, address indexed newAddress)
func (_Masterchef *MasterchefFilterer) ParseSetFeeAddress(log types.Log) (*MasterchefSetFeeAddress, error) {
event := new(MasterchefSetFeeAddress)
if err := _Masterchef.contract.UnpackLog(event, "SetFeeAddress", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// MasterchefSetReferralAddressIterator is returned from FilterSetReferralAddress and is used to iterate over the raw logs and unpacked data for SetReferralAddress events raised by the Masterchef contract.
type MasterchefSetReferralAddressIterator struct {
Event *MasterchefSetReferralAddress // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *MasterchefSetReferralAddressIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(MasterchefSetReferralAddress)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(MasterchefSetReferralAddress)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *MasterchefSetReferralAddressIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *MasterchefSetReferralAddressIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// MasterchefSetReferralAddress represents a SetReferralAddress event raised by the Masterchef contract.
type MasterchefSetReferralAddress struct {
User common.Address
NewAddress common.Address
Raw types.Log // Blockchain specific contextual infos
}
// FilterSetReferralAddress is a free log retrieval operation binding the contract event 0xee63201fedda9e28e92efef9abb99bd9d2f90208a4fd0d0186c14daf364a2731.
//
// Solidity: event SetReferralAddress(address indexed user, address indexed newAddress)
func (_Masterchef *MasterchefFilterer) FilterSetReferralAddress(opts *bind.FilterOpts, user []common.Address, newAddress []common.Address) (*MasterchefSetReferralAddressIterator, error) {
var userRule []interface{}
for _, userItem := range user {
userRule = append(userRule, userItem)
}
var newAddressRule []interface{}
for _, newAddressItem := range newAddress {
newAddressRule = append(newAddressRule, newAddressItem)
}
logs, sub, err := _Masterchef.contract.FilterLogs(opts, "SetReferralAddress", userRule, newAddressRule)
if err != nil {
return nil, err
}
return &MasterchefSetReferralAddressIterator{contract: _Masterchef.contract, event: "SetReferralAddress", logs: logs, sub: sub}, nil
}
// WatchSetReferralAddress is a free log subscription operation binding the contract event 0xee63201fedda9e28e92efef9abb99bd9d2f90208a4fd0d0186c14daf364a2731.
//
// Solidity: event SetReferralAddress(address indexed user, address indexed newAddress)
func (_Masterchef *MasterchefFilterer) WatchSetReferralAddress(opts *bind.WatchOpts, sink chan<- *MasterchefSetReferralAddress, user []common.Address, newAddress []common.Address) (event.Subscription, error) {
var userRule []interface{}
for _, userItem := range user {
userRule = append(userRule, userItem)
}
var newAddressRule []interface{}
for _, newAddressItem := range newAddress {
newAddressRule = append(newAddressRule, newAddressItem)
}
logs, sub, err := _Masterchef.contract.WatchLogs(opts, "SetReferralAddress", userRule, newAddressRule)
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(MasterchefSetReferralAddress)
if err := _Masterchef.contract.UnpackLog(event, "SetReferralAddress", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseSetReferralAddress is a log parse operation binding the contract event 0xee63201fedda9e28e92efef9abb99bd9d2f90208a4fd0d0186c14daf364a2731.
//
// Solidity: event SetReferralAddress(address indexed user, address indexed newAddress)
func (_Masterchef *MasterchefFilterer) ParseSetReferralAddress(log types.Log) (*MasterchefSetReferralAddress, error) {
event := new(MasterchefSetReferralAddress)
if err := _Masterchef.contract.UnpackLog(event, "SetReferralAddress", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// MasterchefSetVaultAddressIterator is returned from FilterSetVaultAddress and is used to iterate over the raw logs and unpacked data for SetVaultAddress events raised by the Masterchef contract.
type MasterchefSetVaultAddressIterator struct {
Event *MasterchefSetVaultAddress // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *MasterchefSetVaultAddressIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(MasterchefSetVaultAddress)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(MasterchefSetVaultAddress)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *MasterchefSetVaultAddressIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *MasterchefSetVaultAddressIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// MasterchefSetVaultAddress represents a SetVaultAddress event raised by the Masterchef contract.
type MasterchefSetVaultAddress struct {
User common.Address
NewAddress common.Address
Raw types.Log // Blockchain specific contextual infos
}
// FilterSetVaultAddress is a free log retrieval operation binding the contract event 0xdfb3295f3e9d9cedf80122570b2468d2322b3443cacb59aa0e204dead9b3c627.
//
// Solidity: event SetVaultAddress(address indexed user, address indexed newAddress)
func (_Masterchef *MasterchefFilterer) FilterSetVaultAddress(opts *bind.FilterOpts, user []common.Address, newAddress []common.Address) (*MasterchefSetVaultAddressIterator, error) {
var userRule []interface{}
for _, userItem := range user {
userRule = append(userRule, userItem)
}
var newAddressRule []interface{}
for _, newAddressItem := range newAddress {
newAddressRule = append(newAddressRule, newAddressItem)
}
logs, sub, err := _Masterchef.contract.FilterLogs(opts, "SetVaultAddress", userRule, newAddressRule)
if err != nil {
return nil, err
}
return &MasterchefSetVaultAddressIterator{contract: _Masterchef.contract, event: "SetVaultAddress", logs: logs, sub: sub}, nil
}
// WatchSetVaultAddress is a free log subscription operation binding the contract event 0xdfb3295f3e9d9cedf80122570b2468d2322b3443cacb59aa0e204dead9b3c627.
//
// Solidity: event SetVaultAddress(address indexed user, address indexed newAddress)
func (_Masterchef *MasterchefFilterer) WatchSetVaultAddress(opts *bind.WatchOpts, sink chan<- *MasterchefSetVaultAddress, user []common.Address, newAddress []common.Address) (event.Subscription, error) {
var userRule []interface{}
for _, userItem := range user {
userRule = append(userRule, userItem)
}
var newAddressRule []interface{}
for _, newAddressItem := range newAddress {
newAddressRule = append(newAddressRule, newAddressItem)
}
logs, sub, err := _Masterchef.contract.WatchLogs(opts, "SetVaultAddress", userRule, newAddressRule)
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(MasterchefSetVaultAddress)
if err := _Masterchef.contract.UnpackLog(event, "SetVaultAddress", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseSetVaultAddress is a log parse operation binding the contract event 0xdfb3295f3e9d9cedf80122570b2468d2322b3443cacb59aa0e204dead9b3c627.
//
// Solidity: event SetVaultAddress(address indexed user, address indexed newAddress)
func (_Masterchef *MasterchefFilterer) ParseSetVaultAddress(log types.Log) (*MasterchefSetVaultAddress, error) {
event := new(MasterchefSetVaultAddress)
if err := _Masterchef.contract.UnpackLog(event, "SetVaultAddress", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// MasterchefUpdateEmissionRateIterator is returned from FilterUpdateEmissionRate and is used to iterate over the raw logs and unpacked data for UpdateEmissionRate events raised by the Masterchef contract.
type MasterchefUpdateEmissionRateIterator struct {
Event *MasterchefUpdateEmissionRate // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *MasterchefUpdateEmissionRateIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(MasterchefUpdateEmissionRate)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(MasterchefUpdateEmissionRate)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *MasterchefUpdateEmissionRateIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *MasterchefUpdateEmissionRateIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// MasterchefUpdateEmissionRate represents a UpdateEmissionRate event raised by the Masterchef contract.
type MasterchefUpdateEmissionRate struct {
User common.Address
FishPerBlock *big.Int
Raw types.Log // Blockchain specific contextual infos
}
// FilterUpdateEmissionRate is a free log retrieval operation binding the contract event 0xe2492e003bbe8afa53088b406f0c1cb5d9e280370fc72a74cf116ffd343c4053.
//
// Solidity: event UpdateEmissionRate(address indexed user, uint256 fishPerBlock)
func (_Masterchef *MasterchefFilterer) FilterUpdateEmissionRate(opts *bind.FilterOpts, user []common.Address) (*MasterchefUpdateEmissionRateIterator, error) {
var userRule []interface{}
for _, userItem := range user {
userRule = append(userRule, userItem)
}
logs, sub, err := _Masterchef.contract.FilterLogs(opts, "UpdateEmissionRate", userRule)
if err != nil {
return nil, err
}
return &MasterchefUpdateEmissionRateIterator{contract: _Masterchef.contract, event: "UpdateEmissionRate", logs: logs, sub: sub}, nil
}
// WatchUpdateEmissionRate is a free log subscription operation binding the contract event 0xe2492e003bbe8afa53088b406f0c1cb5d9e280370fc72a74cf116ffd343c4053.
//
// Solidity: event UpdateEmissionRate(address indexed user, uint256 fishPerBlock)
func (_Masterchef *MasterchefFilterer) WatchUpdateEmissionRate(opts *bind.WatchOpts, sink chan<- *MasterchefUpdateEmissionRate, user []common.Address) (event.Subscription, error) {
var userRule []interface{}
for _, userItem := range user {
userRule = append(userRule, userItem)
}
logs, sub, err := _Masterchef.contract.WatchLogs(opts, "UpdateEmissionRate", userRule)
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(MasterchefUpdateEmissionRate)
if err := _Masterchef.contract.UnpackLog(event, "UpdateEmissionRate", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseUpdateEmissionRate is a log parse operation binding the contract event 0xe2492e003bbe8afa53088b406f0c1cb5d9e280370fc72a74cf116ffd343c4053.
//
// Solidity: event UpdateEmissionRate(address indexed user, uint256 fishPerBlock)
func (_Masterchef *MasterchefFilterer) ParseUpdateEmissionRate(log types.Log) (*MasterchefUpdateEmissionRate, error) {
event := new(MasterchefUpdateEmissionRate)
if err := _Masterchef.contract.UnpackLog(event, "UpdateEmissionRate", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// MasterchefWithdrawIterator is returned from FilterWithdraw and is used to iterate over the raw logs and unpacked data for Withdraw events raised by the Masterchef contract.
type MasterchefWithdrawIterator struct {
Event *MasterchefWithdraw // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *MasterchefWithdrawIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(MasterchefWithdraw)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(MasterchefWithdraw)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *MasterchefWithdrawIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *MasterchefWithdrawIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// MasterchefWithdraw represents a Withdraw event raised by the Masterchef contract.
type MasterchefWithdraw struct {
User common.Address
Pid *big.Int
Amount *big.Int
Raw types.Log // Blockchain specific contextual infos
}
// FilterWithdraw is a free log retrieval operation binding the contract event 0xf279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568.
//
// Solidity: event Withdraw(address indexed user, uint256 indexed pid, uint256 amount)
func (_Masterchef *MasterchefFilterer) FilterWithdraw(opts *bind.FilterOpts, user []common.Address, pid []*big.Int) (*MasterchefWithdrawIterator, error) {
var userRule []interface{}
for _, userItem := range user {
userRule = append(userRule, userItem)
}
var pidRule []interface{}
for _, pidItem := range pid {
pidRule = append(pidRule, pidItem)
}
logs, sub, err := _Masterchef.contract.FilterLogs(opts, "Withdraw", userRule, pidRule)
if err != nil {
return nil, err
}
return &MasterchefWithdrawIterator{contract: _Masterchef.contract, event: "Withdraw", logs: logs, sub: sub}, nil
}
// WatchWithdraw is a free log subscription operation binding the contract event 0xf279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568.
//
// Solidity: event Withdraw(address indexed user, uint256 indexed pid, uint256 amount)
func (_Masterchef *MasterchefFilterer) WatchWithdraw(opts *bind.WatchOpts, sink chan<- *MasterchefWithdraw, user []common.Address, pid []*big.Int) (event.Subscription, error) {
var userRule []interface{}
for _, userItem := range user {
userRule = append(userRule, userItem)
}
var pidRule []interface{}
for _, pidItem := range pid {
pidRule = append(pidRule, pidItem)
}
logs, sub, err := _Masterchef.contract.WatchLogs(opts, "Withdraw", userRule, pidRule)
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(MasterchefWithdraw)
if err := _Masterchef.contract.UnpackLog(event, "Withdraw", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseWithdraw is a log parse operation binding the contract event 0xf279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568.
//
// Solidity: event Withdraw(address indexed user, uint256 indexed pid, uint256 amount)
func (_Masterchef *MasterchefFilterer) ParseWithdraw(log types.Log) (*MasterchefWithdraw, error) {
event := new(MasterchefWithdraw)
if err := _Masterchef.contract.UnpackLog(event, "Withdraw", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}