Documentation ¶
Index ¶
- type ImoContract
- func (cont *ImoContract) Address() common.Address
- func (cont *ImoContract) AddressList(cc *types.ContractContext) ([]common.Address, error)
- func (cont *ImoContract) CheckWhiteList(cc *types.ContractContext, user common.Address) (bool, error)
- func (cont *ImoContract) Deposit(cc *types.ContractContext, _amount *amount.Amount) error
- func (cont *ImoContract) EndBlock(cc *types.ContractContext) uint32
- func (cont *ImoContract) Front() interface{}
- func (cont *ImoContract) GetAddressListLength(cc *types.ContractContext) (int, error)
- func (cont *ImoContract) GetOfferingAmount(cc *types.ContractContext, _user common.Address) (*amount.Amount, error)
- func (cont *ImoContract) GetRefundingAmount(cc *types.ContractContext, _user common.Address) (*amount.Amount, error)
- func (cont *ImoContract) GetUserAllocation(cc *types.ContractContext, _user common.Address) *big.Int
- func (cont *ImoContract) Harvest(cc *types.ContractContext) error
- func (cont *ImoContract) HarvestFeeFactor(cc *types.ContractContext) uint16
- func (cont *ImoContract) HasHarvest(cc *types.ContractContext, _user common.Address) (bool, error)
- func (cont *ImoContract) Init(addr common.Address, master common.Address)
- func (cont *ImoContract) IsOwner(cc *types.ContractContext) bool
- func (cont *ImoContract) Master() common.Address
- func (cont *ImoContract) Name() string
- func (cont *ImoContract) OnCreate(cc *types.ContractContext, Args []byte) error
- func (cont *ImoContract) OnReward(cc *types.ContractContext, b *types.Block, CountMap map[common.Address]uint32) (map[common.Address]*amount.Amount, error)
- func (cont *ImoContract) PayLimit(cc *types.ContractContext) *amount.Amount
- func (cont *ImoContract) PayToken(cc *types.ContractContext) common.Address
- func (cont *ImoContract) ProjectOffering(cc *types.ContractContext) *amount.Amount
- func (cont *ImoContract) ProjectOwner(cc *types.ContractContext) common.Address
- func (cont *ImoContract) ProjectRaising(cc *types.ContractContext) *amount.Amount
- func (cont *ImoContract) ProjectToken(cc *types.ContractContext) common.Address
- func (cont *ImoContract) StartBlock(cc *types.ContractContext) uint32
- func (cont *ImoContract) TotalAmount(cc *types.ContractContext) *amount.Amount
- func (cont *ImoContract) UserInfo(cc *types.ContractContext, user common.Address) (*amount.Amount, bool, error)
- func (cont *ImoContract) WhiteListAddress(cc *types.ContractContext) common.Address
- func (cont *ImoContract) WhiteListGroupId(cc *types.ContractContext) hash.Hash256
- type ImoContractConstruction
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImoContract ¶
type ImoContract struct {
// contains filtered or unexported fields
}
func (*ImoContract) Address ¶
func (cont *ImoContract) Address() common.Address
func (*ImoContract) AddressList ¶
func (cont *ImoContract) AddressList(cc *types.ContractContext) ([]common.Address, error)
func (*ImoContract) CheckWhiteList ¶
func (cont *ImoContract) CheckWhiteList(cc *types.ContractContext, user common.Address) (bool, error)
func (*ImoContract) Deposit ¶
func (cont *ImoContract) Deposit(cc *types.ContractContext, _amount *amount.Amount) error
//////////////////////////////////////////////// Public Write Functions ////////////////////////////////////////////////
func (*ImoContract) EndBlock ¶
func (cont *ImoContract) EndBlock(cc *types.ContractContext) uint32
func (*ImoContract) Front ¶
func (cont *ImoContract) Front() interface{}
func (*ImoContract) GetAddressListLength ¶
func (cont *ImoContract) GetAddressListLength(cc *types.ContractContext) (int, error)
func (*ImoContract) GetOfferingAmount ¶
func (cont *ImoContract) GetOfferingAmount(cc *types.ContractContext, _user common.Address) (*amount.Amount, error)
get the amount of IFO token you will get
func (*ImoContract) GetRefundingAmount ¶
func (cont *ImoContract) GetRefundingAmount(cc *types.ContractContext, _user common.Address) (*amount.Amount, error)
get the amount of lp token you will be refunded
func (*ImoContract) GetUserAllocation ¶
func (cont *ImoContract) GetUserAllocation(cc *types.ContractContext, _user common.Address) *big.Int
1e18 == 100%
func (*ImoContract) Harvest ¶
func (cont *ImoContract) Harvest(cc *types.ContractContext) error
func (*ImoContract) HarvestFeeFactor ¶
func (cont *ImoContract) HarvestFeeFactor(cc *types.ContractContext) uint16
func (*ImoContract) HasHarvest ¶
func (cont *ImoContract) HasHarvest(cc *types.ContractContext, _user common.Address) (bool, error)
func (*ImoContract) Init ¶
func (cont *ImoContract) Init(addr common.Address, master common.Address)
func (*ImoContract) IsOwner ¶
func (cont *ImoContract) IsOwner(cc *types.ContractContext) bool
func (*ImoContract) Master ¶
func (cont *ImoContract) Master() common.Address
func (*ImoContract) Name ¶
func (cont *ImoContract) Name() string
func (*ImoContract) OnCreate ¶
func (cont *ImoContract) OnCreate(cc *types.ContractContext, Args []byte) error
func (*ImoContract) PayLimit ¶
func (cont *ImoContract) PayLimit(cc *types.ContractContext) *amount.Amount
func (*ImoContract) PayToken ¶
func (cont *ImoContract) PayToken(cc *types.ContractContext) common.Address
func (*ImoContract) ProjectOffering ¶
func (cont *ImoContract) ProjectOffering(cc *types.ContractContext) *amount.Amount
func (*ImoContract) ProjectOwner ¶
func (cont *ImoContract) ProjectOwner(cc *types.ContractContext) common.Address
func (*ImoContract) ProjectRaising ¶
func (cont *ImoContract) ProjectRaising(cc *types.ContractContext) *amount.Amount
func (*ImoContract) ProjectToken ¶
func (cont *ImoContract) ProjectToken(cc *types.ContractContext) common.Address
func (*ImoContract) StartBlock ¶
func (cont *ImoContract) StartBlock(cc *types.ContractContext) uint32
func (*ImoContract) TotalAmount ¶
func (cont *ImoContract) TotalAmount(cc *types.ContractContext) *amount.Amount
func (*ImoContract) UserInfo ¶
func (cont *ImoContract) UserInfo(cc *types.ContractContext, user common.Address) (*amount.Amount, bool, error)
func (*ImoContract) WhiteListAddress ¶
func (cont *ImoContract) WhiteListAddress(cc *types.ContractContext) common.Address
func (*ImoContract) WhiteListGroupId ¶
func (cont *ImoContract) WhiteListGroupId(cc *types.ContractContext) hash.Hash256
type ImoContractConstruction ¶
type ImoContractConstruction struct { ProjectOwner common.Address PayToken common.Address ProjectToken common.Address ProjectOffering *amount.Amount ProjectRaising *amount.Amount PayLimit *amount.Amount StartBlock uint32 EndBlock uint32 HarvestFeeFactor uint16 //max 10000 WhiteListAddress common.Address WhiteListGroupId hash.Hash256 }
Click to show internal directories.
Click to hide internal directories.