This flow covers the deploy and execution of uni-lockup-wallet
official frontend for creating the locking up transaction repository
compile uni-lockup-wallet
func -o uni-lockup-wallet-code.fif -SPA stdlib.fc uni-lockup-wallet.fc
-> uni-lockup-wallet-code.fif
deploy uni-lockup-wallet contract and generate 2 new keys (pk files) , 1. owner 2. config using deploy.fif to contract address will be referred as
fift -s src/deploy.fif <workchain> <subwallet_id> <owner_lockup_pk> <config_pk
result <lockup_address
and <lockup-query.boc
lite-client -C global.config.json -c 'sendfile src/lockup-query.boc
fift -s new-wallet-v3.fif <workchain> <subwallet_id> <config_pk
>output BOC file -> config.pk-query.boc
send a new message from config-wallet to lockup wallet , the message is signed by config.pk, and it has TON to lock, unlock timestamp, and if restricted flag (or locked funds can be used for nominators)
fift -s query-new-lockup.fif <time_to_lock_sec> <allow_funds_staking> <pk_flie
fift -s query-new-lockup.fif 300 0 config
BOC output: conifg-rs-transfer.boc
lite-client -C global.config.json -c 'runmethod <lockup-wallet> seqno'
-> <lockup-seqno>
build wallet query (wrap lockup query)
fift -s wallet-v3-query-builder.fif <config.pk> <lockup-wallet> <subwallet_id> <lockup-seqno> <amount_of_ton_to_lock> -B restricted_transfer.boc lockup-transfer
lite-client -C global.config.json -c 'sendfile src/lockup-transfer'
send this tx from config-wallet to lockup-wallet, so we use wallet-v3-query-builder ``
owner.pk wallet should withdraw the remaining balance
fift -s wallet-v3-query-builder.fif <config.pk> <lockup-wallet> <subwallet_id> <lockup-seqno> <amount_of_ton_to_lock> -B restricted_transfer.boc lockup-transfer
using runmethod get_balance_at
we can check in each future timestamp the funds status of unlocked, locked, and restricted funds.
lite-client -C global.config.json -c 'runmethod <> get_balances_at <unix_timestamp>' -> result [ $unlocked, $restricted, $locked]
fift -s wallet-v3-query-builder.fif owner <lockup_address> <subwallet_id> <seqno> <ton_amount> lockup-withdraw
lite-client -C global.config.json -c 'sendfile src/lockup-withdraw.boc'