imo

package
v0.0.0-...-24e5678 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2023 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

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) OnReward

func (cont *ImoContract) OnReward(cc *types.ContractContext, b *types.Block, CountMap map[common.Address]uint32) (map[common.Address]*amount.Amount, 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
}

func (*ImoContractConstruction) ReadFrom

func (s *ImoContractConstruction) ReadFrom(r io.Reader) (int64, error)

func (*ImoContractConstruction) WriteTo

func (s *ImoContractConstruction) WriteTo(w io.Writer) (int64, error)

type UserInfo

type UserInfo struct {
	Amt     *amount.Amount
	Claimed bool
}

func (*UserInfo) ReadFrom

func (s *UserInfo) ReadFrom(r io.Reader) (int64, error)

func (*UserInfo) WriteTo

func (s *UserInfo) WriteTo(w io.Writer) (int64, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL