LumiWave.move

init (private func)

Executed only once upon contract deployment: Issues 77,007,546 LWA tokens Creates voting dashboard shared object information Creates the denyCapobject

make_voteboard (private func)

// func parameter
ctx [TxContext]: transaction information (auto-filled)

Creates the voting dashboard object.

add_deny (public entry func)

// func parameter
denylist [DenyList]: deny list (fixed at 0x403)
deny_cap[DenyCap<LWA>]: information for the deny (block)
objectrecipient[address]: wallet address information for adding to the deny
listctx[TxContext]: transaction information (auto-filled)

Adds a specific wallet to the LWA deny list.

remove_deny (public entry func)

// func parameter
denylist [DenyList]: deny list (fixed at 0x403)
deny_cap[DenyCap<LWA>]: information for the deny (block) object
recipient [address]: wallet address information for removing from the deny list
ctx[TxContext]: transaction information (auto-filled)

Removes a specific wallet from the LWA deny list.

mint (public func)

// func parameter
treasury_cap[TreasuryCap<LWA>]: object created during `init`
amount [u64]: quantity to be minted
recipient [address]: wallet address to receive the minted amount
ctx[TxContext]: transaction information (auto-filled)

Function for additional LWA minting, ensuring that the total supply does not exceed the maximum limit.

lock_coin_transfer (public entry func)

// func parameter
treasury_cap[TreasuryCap<LWA>]: object created during init
my_coin[Coin<LWA>]: the LWA object currently held
recipient [address]: wallet address to receive the transfer
amount [u64]: amount to be extracted and transferred from my_coinbalance
unlock_ts[u64]: lock release timestamp (UTC / ms)
ctx[TxContext]: transaction information (auto-filled)

Transfers LWA to a specific wallet by applying a lock through a wrapper.

unlock_coin (public entry func)

// func parameter
locked_coin[LockedCoin<LWA>]: wrapped object with a lock applied
clock[Clock]: current time information (fixed at 0x6)

Unwraps the locked object, allowing it to be used as LWA.

burn (public entry func)

// func parameter
treasury_cap[TreasuryCap<LWA>]: object created during init
coin [Coin<LWA>]: coin object to be burned

Burns the coin held by the creator.

enable_vote (public entry func)

// func parameter
treasury_cap[TreasuryCap<LWA>]: object created during init
vote_board[VoteBoard]: voting dashboard shared object
is_enable[bool]: indicates whether voting is enabled
vote_start_ts[u64]: voting start time (UTC / ms)
vote_end_ts[u64]: voting end time (UTC / ms)
ctx[TxContext]: transaction information (auto-filled)

Enables or disables the voting functionality.

vote (public entry func)

// func parameter
vote_board[VoteBoard]: voting dashboard shared object
coin [Coin<LWA>]: coin object held by the voter
clock_vote[Clock]: current time information (fixed at 0x6)
is_agree[bool]: vote in favor (true) or against (false)
ctx[TxContext]: transaction information (auto-filled)

Casts a vote.

vote_counting (public entry func)

// func parameter
recipient [address]: recipient wallet address
lock_ts[u64]: coin lock timestamp (UTC / ms)
unlock_ts[u64]: coin unlock timestamp (UTC / ms)
balance [Balance<T>]: information of the coins to be locked
ctx[TxContext]: transaction information (auto-filled)

Tallies the completed vote, and if the result is in favor, proceeds with additional coin minting.

vote_reset (public entry func)

// func parameter
treasury_cap[TreasuryCap<LWA>]: object created during init
vote_board[VoteBoard]: voting dashboard shared object
ctx[TxContext]: transaction information (auto-filled)

Resets the completed tally to prepare for the next vote.

Last updated