[ ] update internal balances using store_ft_balance_of
[ ] Check list of supported FT tokens get_ft_list
[ ] Check balances of FT tokens ft_balances
[ ] Transfer some FT tokens (ft_transfer) & validate (directly on the FT contract, with ft_balance_of)
Security Implications:
TBD - TC
Examples:
# FT balance is stored on each token account, to help these are fns that can retrieve and maintain that snapshot to be used for internal accounting.
# ------
near call $TREASURY_ACCOUNT_ID store_ft_balance_of '{"ft_account_id": "'$CHEDDAR_TOKEN'"}' --accountId $TREASURY_ACCOUNT_ID --gas $MAX_GAS
near view $TREASURY_ACCOUNT_ID get_ft_list
near view $TREASURY_ACCOUNT_ID ft_balances '{"from_index": "0", "limit": "10"}'
# NEAR_ENV=mainnet near view meta-token.near ft_balance_of '{"account_id": "croncat.sputnik-dao.near"}'
# near view $CHEDDAR_TOKEN ft_balance_of '{"account_id": "'$TREASURY_ACCOUNT_ID'"}'
# near view $TREASURY_ACCOUNT_ID ft_balance_of '{"account_id": "'$META_TOKEN'"}' --accountId $TREASURY_ACCOUNT_ID
# near view $TREASURY_ACCOUNT_ID ft_balance_of '{"account_id": "'$CHEDDAR_TOKEN'"}' --accountId $TREASURY_ACCOUNT_ID
near call $TREASURY_ACCOUNT_ID ft_transfer '{"ft_account_id": "'$CHEDDAR_TOKEN'", "to_account_id": "'$NEAR_ACCT'", "to_amount": "100000000000000000000000000"}' --accountId $TREASURY_ACCOUNT_ID --gas $MAX_GAS
Unit Tests
Workspace Tests
Security Implications:
Examples: