launchpad_init.gno

CreateProject

func CreateProject(
	name string,
	tokenPath string,
	recipient std.Address,
	depositAmount uint64,
	conditionsToken string, //optional
	conditionsAmount string, //optional
	tier30Ratio uint64, //set distribution ratio for the three tiers.
	tier90Ratio uint64, //for example, if you put 20 here, it means 20% of the 100%.
	tier180Ratio uint64, //the sum of the three tiers must be 100.
	startTime uint64,
) string

Creates a new launchpad project (only callable by the admin).

Parameters

NameTypeDescription

name

string

The name of a project.

tokenPath

string

The token path to distribute as reward.

recipient

std.Address

The address of the project's to receive reward.

depositAmount

uint64

The amount of token to distribute as reward.

conditionsToken

string

A list of token paths to use as a condition when depositing (It's optional, and for multiple tokens, use *PAD* as separator).

conditionsAmount

string

A list of tokens' amount to use as condition when depositing (It's optional, and for multiple tokens, use *PAD* as separator).

tier30Ratio

uint64

The distribution ratio of the 30 days pool.

tier90Ratio

uint64

The distribution ratio of the 60 days pool.

tier180Ratio

uint64

The distribution ratio of the 180 days pool.

startTime

uint64

The start time of the project.

Return Values

NameTypeDescription

proposalId

uint64

The ID of the created project.

TransferLeftFromProjectByAdmin

func TransferLeftFromProjectByAdmin(
  projectId string,
  recipient std.Address,
) uint64

Transfers the remaining amount from the ended project to the recipient

Parameters

NameTypeDescription

projectId

string

The ID of the ended project.

recipient

std.Address

The recipient address to receive the remaining tokens.

Return Values

NameTypeDescription

amount

uint64

The amount of transfered tokens.

Last updated