Skip to content

Latest commit

 

History

History
60 lines (38 loc) · 3.57 KB

assets.md

File metadata and controls

60 lines (38 loc) · 3.57 KB

Asset management

Coin deposits

From a CoinStore

Coins can be deposited from a user's aptos_framework::coin::CoinStore into their MarketAccount via deposit_from_coinstore.

Standalone coins

Standalone coins can be deposited to a user's MarketAccount via deposit_coins.

Generic asset deposits

Generic assets can be deposited to a user's MarketAccount via deposit_generic_asset.

Coin withdrawals

To a CoinStore

Coins can be withdrawn from a user's MarketAccount into their aptos_framework::coin::CoinStore via withdraw_to_coinstore.

Standalone coins, signing user

Coins can be withdrawn from a user's MarketAccount and returned as standalone coins (under the authority of a signing user) via withdraw_coins_user.

Standalone coins, custodian

Coins can be withdrawn from a user's MarketAccount and returned as standalone coins (under the authority of a general custodian) via withdraw_coins_custodian.

Generic asset withdrawals

Generic assets can be withdrawn from a user's MarketAccount via withdraw_generic_asset.

Getting asset counts

As a signing user

get_asset_counts_user returns the asset counts from a user's MarketAccount, under the authority of a signing user.

As a general custodian

get_asset_counts_custodian returns the asset counts from a user's MarketAccount, under the authority of a general custodian.