evm/pancakeswap/contracts/masterchef.go

1583 lines
68 KiB
Go
Raw Permalink Normal View History

2021-11-08 18:20:31 +00:00
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package contracts
import (
"errors"
"math/big"
"strings"
ethereum "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
)
// Reference imports to suppress errors if they are not otherwise used.
var (
_ = errors.New
_ = big.NewInt
_ = strings.NewReader
_ = ethereum.NotFound
_ = bind.Bind
_ = common.Big1
_ = types.BloomLookup
_ = event.NewSubscription
)
// MasterChefMetaData contains all meta data concerning the MasterChef contract.
var MasterChefMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[{\"internalType\":\"contractCakeToken\",\"name\":\"_cake\",\"type\":\"address\"},{\"internalType\":\"contractSyrupBar\",\"name\":\"_syrup\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_devaddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_cakePerBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_startBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"EmergencyWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BONUS_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_allocPoint\",\"type\":\"uint256\"},{\"internalType\":\"contractIBEP20\",\"name\":\"_lpToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_withUpdate\",\"type\":\"bool\"}],\"name\":\"add\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"cake\",\"outputs\":[{\"internalType\":\"contractCakeToken\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"cakePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devaddr\",\"type\":\"address\"}],\"name\":\"dev\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devaddr\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"}],\"name\":\"emergencyWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"enterStaking\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_from\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_to\",\"type\":\"uint256\"}],\"name\":\"getMultiplier\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"leaveStaking\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"func
}
// MasterChefABI is the input ABI used to generate the binding from.
// Deprecated: Use MasterChefMetaData.ABI instead.
var MasterChefABI = MasterChefMetaData.ABI
// 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...)
}
// BONUSMULTIPLIER is a free data retrieval call binding the contract method 0x8aa28550.
//
// Solidity: function BONUS_MULTIPLIER() view returns(uint256)
func (_MasterChef *MasterChefCaller) BONUSMULTIPLIER(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _MasterChef.contract.Call(opts, &out, "BONUS_MULTIPLIER")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// BONUSMULTIPLIER is a free data retrieval call binding the contract method 0x8aa28550.
//
// Solidity: function BONUS_MULTIPLIER() view returns(uint256)
func (_MasterChef *MasterChefSession) BONUSMULTIPLIER() (*big.Int, error) {
return _MasterChef.Contract.BONUSMULTIPLIER(&_MasterChef.CallOpts)
}
// BONUSMULTIPLIER is a free data retrieval call binding the contract method 0x8aa28550.
//
// Solidity: function BONUS_MULTIPLIER() view returns(uint256)
func (_MasterChef *MasterChefCallerSession) BONUSMULTIPLIER() (*big.Int, error) {
return _MasterChef.Contract.BONUSMULTIPLIER(&_MasterChef.CallOpts)
}
// Cake is a free data retrieval call binding the contract method 0xdce17484.
//
// Solidity: function cake() view returns(address)
func (_MasterChef *MasterChefCaller) Cake(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _MasterChef.contract.Call(opts, &out, "cake")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// Cake is a free data retrieval call binding the contract method 0xdce17484.
//
// Solidity: function cake() view returns(address)
func (_MasterChef *MasterChefSession) Cake() (common.Address, error) {
return _MasterChef.Contract.Cake(&_MasterChef.CallOpts)
}
// Cake is a free data retrieval call binding the contract method 0xdce17484.
//
// Solidity: function cake() view returns(address)
func (_MasterChef *MasterChefCallerSession) Cake() (common.Address, error) {
return _MasterChef.Contract.Cake(&_MasterChef.CallOpts)
}
// CakePerBlock is a free data retrieval call binding the contract method 0x0755e0b6.
//
// Solidity: function cakePerBlock() view returns(uint256)
func (_MasterChef *MasterChefCaller) CakePerBlock(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _MasterChef.contract.Call(opts, &out, "cakePerBlock")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// CakePerBlock is a free data retrieval call binding the contract method 0x0755e0b6.
//
// Solidity: function cakePerBlock() view returns(uint256)
func (_MasterChef *MasterChefSession) CakePerBlock() (*big.Int, error) {
return _MasterChef.Contract.CakePerBlock(&_MasterChef.CallOpts)
}
// CakePerBlock is a free data retrieval call binding the contract method 0x0755e0b6.
//
// Solidity: function cakePerBlock() view returns(uint256)
func (_MasterChef *MasterChefCallerSession) CakePerBlock() (*big.Int, error) {
return _MasterChef.Contract.CakePerBlock(&_MasterChef.CallOpts)
}
// Devaddr is a free data retrieval call binding the contract method 0xd49e77cd.
//
// Solidity: function devaddr() view returns(address)
func (_MasterChef *MasterChefCaller) Devaddr(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _MasterChef.contract.Call(opts, &out, "devaddr")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// Devaddr is a free data retrieval call binding the contract method 0xd49e77cd.
//
// Solidity: function devaddr() view returns(address)
func (_MasterChef *MasterChefSession) Devaddr() (common.Address, error) {
return _MasterChef.Contract.Devaddr(&_MasterChef.CallOpts)
}
// Devaddr is a free data retrieval call binding the contract method 0xd49e77cd.
//
// Solidity: function devaddr() view returns(address)
func (_MasterChef *MasterChefCallerSession) Devaddr() (common.Address, error) {
return _MasterChef.Contract.Devaddr(&_MasterChef.CallOpts)
}
// GetMultiplier is a free data retrieval call binding the contract method 0x8dbb1e3a.
//
// Solidity: function getMultiplier(uint256 _from, uint256 _to) view 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) view 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) view returns(uint256)
func (_MasterChef *MasterChefCallerSession) GetMultiplier(_from *big.Int, _to *big.Int) (*big.Int, error) {
return _MasterChef.Contract.GetMultiplier(&_MasterChef.CallOpts, _from, _to)
}
// Migrator is a free data retrieval call binding the contract method 0x7cd07e47.
//
// Solidity: function migrator() view returns(address)
func (_MasterChef *MasterChefCaller) Migrator(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _MasterChef.contract.Call(opts, &out, "migrator")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// Migrator is a free data retrieval call binding the contract method 0x7cd07e47.
//
// Solidity: function migrator() view returns(address)
func (_MasterChef *MasterChefSession) Migrator() (common.Address, error) {
return _MasterChef.Contract.Migrator(&_MasterChef.CallOpts)
}
// Migrator is a free data retrieval call binding the contract method 0x7cd07e47.
//
// Solidity: function migrator() view returns(address)
func (_MasterChef *MasterChefCallerSession) Migrator() (common.Address, error) {
return _MasterChef.Contract.Migrator(&_MasterChef.CallOpts)
}
// 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)
}
// PendingCake is a free data retrieval call binding the contract method 0x1175a1dd.
//
// Solidity: function pendingCake(uint256 _pid, address _user) view returns(uint256)
func (_MasterChef *MasterChefCaller) PendingCake(opts *bind.CallOpts, _pid *big.Int, _user common.Address) (*big.Int, error) {
var out []interface{}
err := _MasterChef.contract.Call(opts, &out, "pendingCake", _pid, _user)
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// PendingCake is a free data retrieval call binding the contract method 0x1175a1dd.
//
// Solidity: function pendingCake(uint256 _pid, address _user) view returns(uint256)
func (_MasterChef *MasterChefSession) PendingCake(_pid *big.Int, _user common.Address) (*big.Int, error) {
return _MasterChef.Contract.PendingCake(&_MasterChef.CallOpts, _pid, _user)
}
// PendingCake is a free data retrieval call binding the contract method 0x1175a1dd.
//
// Solidity: function pendingCake(uint256 _pid, address _user) view returns(uint256)
func (_MasterChef *MasterChefCallerSession) PendingCake(_pid *big.Int, _user common.Address) (*big.Int, error) {
return _MasterChef.Contract.PendingCake(&_MasterChef.CallOpts, _pid, _user)
}
// 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 accCakePerShare)
func (_MasterChef *MasterChefCaller) PoolInfo(opts *bind.CallOpts, arg0 *big.Int) (struct {
LpToken common.Address
AllocPoint *big.Int
LastRewardBlock *big.Int
AccCakePerShare *big.Int
}, error) {
var out []interface{}
err := _MasterChef.contract.Call(opts, &out, "poolInfo", arg0)
outstruct := new(struct {
LpToken common.Address
AllocPoint *big.Int
LastRewardBlock *big.Int
AccCakePerShare *big.Int
})
if err != nil {
return *outstruct, err
}
outstruct.LpToken = *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
outstruct.AllocPoint = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
outstruct.LastRewardBlock = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int)
outstruct.AccCakePerShare = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int)
return *outstruct, err
}
// PoolInfo is a free data retrieval call binding the contract method 0x1526fe27.
//
// Solidity: function poolInfo(uint256 ) view returns(address lpToken, uint256 allocPoint, uint256 lastRewardBlock, uint256 accCakePerShare)
func (_MasterChef *MasterChefSession) PoolInfo(arg0 *big.Int) (struct {
LpToken common.Address
AllocPoint *big.Int
LastRewardBlock *big.Int
AccCakePerShare *big.Int
}, 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 accCakePerShare)
func (_MasterChef *MasterChefCallerSession) PoolInfo(arg0 *big.Int) (struct {
LpToken common.Address
AllocPoint *big.Int
LastRewardBlock *big.Int
AccCakePerShare *big.Int
}, 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)
}
// 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)
}
// Syrup is a free data retrieval call binding the contract method 0x86a952c4.
//
// Solidity: function syrup() view returns(address)
func (_MasterChef *MasterChefCaller) Syrup(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _MasterChef.contract.Call(opts, &out, "syrup")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// Syrup is a free data retrieval call binding the contract method 0x86a952c4.
//
// Solidity: function syrup() view returns(address)
func (_MasterChef *MasterChefSession) Syrup() (common.Address, error) {
return _MasterChef.Contract.Syrup(&_MasterChef.CallOpts)
}
// Syrup is a free data retrieval call binding the contract method 0x86a952c4.
//
// Solidity: function syrup() view returns(address)
func (_MasterChef *MasterChefCallerSession) Syrup() (common.Address, error) {
return _MasterChef.Contract.Syrup(&_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)
}
// Add is a paid mutator transaction binding the contract method 0x1eaaa045.
//
// Solidity: function add(uint256 _allocPoint, address _lpToken, bool _withUpdate) returns()
func (_MasterChef *MasterChefTransactor) Add(opts *bind.TransactOpts, _allocPoint *big.Int, _lpToken common.Address, _withUpdate bool) (*types.Transaction, error) {
return _MasterChef.contract.Transact(opts, "add", _allocPoint, _lpToken, _withUpdate)
}
// Add is a paid mutator transaction binding the contract method 0x1eaaa045.
//
// Solidity: function add(uint256 _allocPoint, address _lpToken, bool _withUpdate) returns()
func (_MasterChef *MasterChefSession) Add(_allocPoint *big.Int, _lpToken common.Address, _withUpdate bool) (*types.Transaction, error) {
return _MasterChef.Contract.Add(&_MasterChef.TransactOpts, _allocPoint, _lpToken, _withUpdate)
}
// Add is a paid mutator transaction binding the contract method 0x1eaaa045.
//
// Solidity: function add(uint256 _allocPoint, address _lpToken, bool _withUpdate) returns()
func (_MasterChef *MasterChefTransactorSession) Add(_allocPoint *big.Int, _lpToken common.Address, _withUpdate bool) (*types.Transaction, error) {
return _MasterChef.Contract.Add(&_MasterChef.TransactOpts, _allocPoint, _lpToken, _withUpdate)
}
// Deposit is a paid mutator transaction binding the contract method 0xe2bbb158.
//
// Solidity: function deposit(uint256 _pid, uint256 _amount) returns()
func (_MasterChef *MasterChefTransactor) Deposit(opts *bind.TransactOpts, _pid *big.Int, _amount *big.Int) (*types.Transaction, error) {
return _MasterChef.contract.Transact(opts, "deposit", _pid, _amount)
}
// Deposit is a paid mutator transaction binding the contract method 0xe2bbb158.
//
// Solidity: function deposit(uint256 _pid, uint256 _amount) returns()
func (_MasterChef *MasterChefSession) Deposit(_pid *big.Int, _amount *big.Int) (*types.Transaction, error) {
return _MasterChef.Contract.Deposit(&_MasterChef.TransactOpts, _pid, _amount)
}
// Deposit is a paid mutator transaction binding the contract method 0xe2bbb158.
//
// Solidity: function deposit(uint256 _pid, uint256 _amount) returns()
func (_MasterChef *MasterChefTransactorSession) Deposit(_pid *big.Int, _amount *big.Int) (*types.Transaction, error) {
return _MasterChef.Contract.Deposit(&_MasterChef.TransactOpts, _pid, _amount)
}
// Dev is a paid mutator transaction binding the contract method 0x8d88a90e.
//
// Solidity: function dev(address _devaddr) returns()
func (_MasterChef *MasterChefTransactor) Dev(opts *bind.TransactOpts, _devaddr common.Address) (*types.Transaction, error) {
return _MasterChef.contract.Transact(opts, "dev", _devaddr)
}
// Dev is a paid mutator transaction binding the contract method 0x8d88a90e.
//
// Solidity: function dev(address _devaddr) returns()
func (_MasterChef *MasterChefSession) Dev(_devaddr common.Address) (*types.Transaction, error) {
return _MasterChef.Contract.Dev(&_MasterChef.TransactOpts, _devaddr)
}
// Dev is a paid mutator transaction binding the contract method 0x8d88a90e.
//
// Solidity: function dev(address _devaddr) returns()
func (_MasterChef *MasterChefTransactorSession) Dev(_devaddr common.Address) (*types.Transaction, error) {
return _MasterChef.Contract.Dev(&_MasterChef.TransactOpts, _devaddr)
}
// 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)
}
// EnterStaking is a paid mutator transaction binding the contract method 0x41441d3b.
//
// Solidity: function enterStaking(uint256 _amount) returns()
func (_MasterChef *MasterChefTransactor) EnterStaking(opts *bind.TransactOpts, _amount *big.Int) (*types.Transaction, error) {
return _MasterChef.contract.Transact(opts, "enterStaking", _amount)
}
// EnterStaking is a paid mutator transaction binding the contract method 0x41441d3b.
//
// Solidity: function enterStaking(uint256 _amount) returns()
func (_MasterChef *MasterChefSession) EnterStaking(_amount *big.Int) (*types.Transaction, error) {
return _MasterChef.Contract.EnterStaking(&_MasterChef.TransactOpts, _amount)
}
// EnterStaking is a paid mutator transaction binding the contract method 0x41441d3b.
//
// Solidity: function enterStaking(uint256 _amount) returns()
func (_MasterChef *MasterChefTransactorSession) EnterStaking(_amount *big.Int) (*types.Transaction, error) {
return _MasterChef.Contract.EnterStaking(&_MasterChef.TransactOpts, _amount)
}
// LeaveStaking is a paid mutator transaction binding the contract method 0x1058d281.
//
// Solidity: function leaveStaking(uint256 _amount) returns()
func (_MasterChef *MasterChefTransactor) LeaveStaking(opts *bind.TransactOpts, _amount *big.Int) (*types.Transaction, error) {
return _MasterChef.contract.Transact(opts, "leaveStaking", _amount)
}
// LeaveStaking is a paid mutator transaction binding the contract method 0x1058d281.
//
// Solidity: function leaveStaking(uint256 _amount) returns()
func (_MasterChef *MasterChefSession) LeaveStaking(_amount *big.Int) (*types.Transaction, error) {
return _MasterChef.Contract.LeaveStaking(&_MasterChef.TransactOpts, _amount)
}
// LeaveStaking is a paid mutator transaction binding the contract method 0x1058d281.
//
// Solidity: function leaveStaking(uint256 _amount) returns()
func (_MasterChef *MasterChefTransactorSession) LeaveStaking(_amount *big.Int) (*types.Transaction, error) {
return _MasterChef.Contract.LeaveStaking(&_MasterChef.TransactOpts, _amount)
}
// 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)
}
// Migrate is a paid mutator transaction binding the contract method 0x454b0608.
//
// Solidity: function migrate(uint256 _pid) returns()
func (_MasterChef *MasterChefTransactor) Migrate(opts *bind.TransactOpts, _pid *big.Int) (*types.Transaction, error) {
return _MasterChef.contract.Transact(opts, "migrate", _pid)
}
// Migrate is a paid mutator transaction binding the contract method 0x454b0608.
//
// Solidity: function migrate(uint256 _pid) returns()
func (_MasterChef *MasterChefSession) Migrate(_pid *big.Int) (*types.Transaction, error) {
return _MasterChef.Contract.Migrate(&_MasterChef.TransactOpts, _pid)
}
// Migrate is a paid mutator transaction binding the contract method 0x454b0608.
//
// Solidity: function migrate(uint256 _pid) returns()
func (_MasterChef *MasterChefTransactorSession) Migrate(_pid *big.Int) (*types.Transaction, error) {
return _MasterChef.Contract.Migrate(&_MasterChef.TransactOpts, _pid)
}
// 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 0x64482f79.
//
// Solidity: function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) returns()
func (_MasterChef *MasterChefTransactor) Set(opts *bind.TransactOpts, _pid *big.Int, _allocPoint *big.Int, _withUpdate bool) (*types.Transaction, error) {
return _MasterChef.contract.Transact(opts, "set", _pid, _allocPoint, _withUpdate)
}
// Set is a paid mutator transaction binding the contract method 0x64482f79.
//
// Solidity: function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) returns()
func (_MasterChef *MasterChefSession) Set(_pid *big.Int, _allocPoint *big.Int, _withUpdate bool) (*types.Transaction, error) {
return _MasterChef.Contract.Set(&_MasterChef.TransactOpts, _pid, _allocPoint, _withUpdate)
}
// Set is a paid mutator transaction binding the contract method 0x64482f79.
//
// Solidity: function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) returns()
func (_MasterChef *MasterChefTransactorSession) Set(_pid *big.Int, _allocPoint *big.Int, _withUpdate bool) (*types.Transaction, error) {
return _MasterChef.Contract.Set(&_MasterChef.TransactOpts, _pid, _allocPoint, _withUpdate)
}
// SetMigrator is a paid mutator transaction binding the contract method 0x23cf3118.
//
// Solidity: function setMigrator(address _migrator) returns()
func (_MasterChef *MasterChefTransactor) SetMigrator(opts *bind.TransactOpts, _migrator common.Address) (*types.Transaction, error) {
return _MasterChef.contract.Transact(opts, "setMigrator", _migrator)
}
// SetMigrator is a paid mutator transaction binding the contract method 0x23cf3118.
//
// Solidity: function setMigrator(address _migrator) returns()
func (_MasterChef *MasterChefSession) SetMigrator(_migrator common.Address) (*types.Transaction, error) {
return _MasterChef.Contract.SetMigrator(&_MasterChef.TransactOpts, _migrator)
}
// SetMigrator is a paid mutator transaction binding the contract method 0x23cf3118.
//
// Solidity: function setMigrator(address _migrator) returns()
func (_MasterChef *MasterChefTransactorSession) SetMigrator(_migrator common.Address) (*types.Transaction, error) {
return _MasterChef.Contract.SetMigrator(&_MasterChef.TransactOpts, _migrator)
}
// 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)
}
// UpdateMultiplier is a paid mutator transaction binding the contract method 0x5ffe6146.
//
// Solidity: function updateMultiplier(uint256 multiplierNumber) returns()
func (_MasterChef *MasterChefTransactor) UpdateMultiplier(opts *bind.TransactOpts, multiplierNumber *big.Int) (*types.Transaction, error) {
return _MasterChef.contract.Transact(opts, "updateMultiplier", multiplierNumber)
}
// UpdateMultiplier is a paid mutator transaction binding the contract method 0x5ffe6146.
//
// Solidity: function updateMultiplier(uint256 multiplierNumber) returns()
func (_MasterChef *MasterChefSession) UpdateMultiplier(multiplierNumber *big.Int) (*types.Transaction, error) {
return _MasterChef.Contract.UpdateMultiplier(&_MasterChef.TransactOpts, multiplierNumber)
}
// UpdateMultiplier is a paid mutator transaction binding the contract method 0x5ffe6146.
//
// Solidity: function updateMultiplier(uint256 multiplierNumber) returns()
func (_MasterChef *MasterChefTransactorSession) UpdateMultiplier(multiplierNumber *big.Int) (*types.Transaction, error) {
return _MasterChef.Contract.UpdateMultiplier(&_MasterChef.TransactOpts, multiplierNumber)
}
// 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)
}
// 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
}
// 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
}