Skip to content

Commit 756d37b

Browse files
committed
[update] fa
1 parent e5364e4 commit 756d37b

File tree

4 files changed

+30
-12
lines changed

4 files changed

+30
-12
lines changed

apps/nextra/next-env.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/basic-features/typescript for more information.
5+
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.

apps/nextra/pages/en/build/guides/system-integrators-guide.mdx

+9-1
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,17 @@ For any `FungibleStore`
306306
s, [`fungible_asset::transfer`](https://github.com/aptos-labs/aptos-core/blob/main/aptos-move/framework/aptos-framework/sources/fungible_asset.move#L347)
307307
would be invoked with `FungibleStore` object addresses.
308308

309+
It is noted in the migration phase from coin to FA, withdraw/deposit/transfer FA paired from coin should
310+
call `0x1::coin::deposit/withdraw/transfer`(coin module API) to transfer the asset because the account may have the asset in both
311+
form but fungible asset API can only move FA part but not the coin part. In contrast, coin API could move both parts. For other FA,
312+
since it does not have a paired coin type, only fungible asset API can be used to move assets.
313+
To know which API to call, please refer to [`concurrent_fungible_asset_balance`](../../../indexer/fungible-asset-balances.mdx) table `standard` field, where "v1" means using coin API and "v2" means using fungible asset API.
314+
309315
### Current balance for Fungible Asset
310316

311-
The current balance for an APT FA of FungibleStore is available at the account resources URL: `https://{rest_api_server}/accounts/{fungible_store_object_address}/resource/0x1::fungible_asset::FungibleStore`. The balance is stored as `balance`. The resource also contains a metadata object of the FA type and the frozen status. The address of the primary fungible store can be calculated as `sha3_256(32-byte account address | 32-byte metadata object address | 0xFC)`. The metadata object address of APT FA is `0xA`.
317+
Indexer users can just query [`concurrent_fungible_asset_balance`](../../indexer/fungible-asset-balances.mdx) to get the balance.
318+
319+
For node API, the current balance for an APT FA of FungibleStore is available at the account resources URL: `https://{rest_api_server}/accounts/{fungible_store_object_address}/resource/0x1::fungible_asset::FungibleStore`. The balance is stored as `balance`. The resource also contains a metadata object of the FA type and the frozen status. The address of the primary fungible store can be calculated as `sha3_256(32-byte account address | 32-byte metadata object address | 0xFC)`. The metadata object address of APT FA is `0xA`.
312320

313321
Aptos users have the option to upgrade to concurrent fungible balance to allow parallelization of balance updates, improving the performance of a single account. When a user has upgraded a fungible store balance to support concurrent update, the fungible store object will have another resource `ConcurrentFungibleBalance` that contains the balance of the store, and the `balance` field of FungibleStore will be set to 0. The current balance for an APT FA of `ConcurrentFungibleBalance` (if exists) is available at the account resources URL: `https://{rest_api_server}/accounts/{fungible_store_object_address}/resource/0x1::fungible_asset::ConcurrentFungibleBalance`.
314322

apps/nextra/pages/en/build/smart-contracts/fungible-asset.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ There are two changes needed for off-chain services:
417417

418418
Since a user may possess **both** a `coin` balance and a paired FA balance, off-chain applications should be updated to reflect the **sum** of both the `coin` balance and its paired FA balance.
419419

420-
- For Aptos Indexer users, you may utilize a new table called `current_unified_fungible_asset_balances` to obtain the latest sum of coin balance and FA balance representing the same asset type.
420+
- For Aptos Indexer users, you may utilize the table called `current_fungible_asset_balances` to obtain the latest sum of coin balance and FA balance representing the same asset type. If the FA has a paired coin type, the asset type would be set to the coin type, such as `0x1::aptos_coin::AptosCoin`. Otherwise, for FA not paired from a coin, the asset type would be the metadata address. Users could filter by this field to get the FA balance of their interest.
421421
- For users employing Node API or other customized indexing, they should add the balance of the paired FA in users' `FungibleStore` and `ConcurrentFungibleBalance` if any of them exist to the coin balance.
422422

423423
To retrieve the balance of the `PrimaryFungibleStore` for a paired FA to an existing `coin` of type `CoinType`:

apps/nextra/utils/generated/localeMap.ts

+19-9
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,30 @@
44

55
export const localeMap = {
66
"/build/apis/aptos-labs-developer-portal": {
7-
"en": true
7+
"en": true,
8+
"zh": true
89
},
910
"/build/apis/data-providers": {
10-
"en": true
11+
"en": true,
12+
"zh": true
1113
},
1214
"/build/apis/faucet-api": {
13-
"en": true
15+
"en": true,
16+
"zh": true
1417
},
1518
"/build/apis/fullnode-rest-api-reference": {
16-
"en": true
19+
"en": true,
20+
"zh": true
1721
},
1822
"/build/apis/fullnode-rest-api": {
19-
"en": true
23+
"en": true,
24+
"zh": true
2025
},
2126
"/build/apis": {
27+
"en": true,
28+
"zh": true
29+
},
30+
"/build/cli/formatting-move-contracts": {
2231
"en": true
2332
},
2433
"/build/cli/install-cli/install-cli-linux": {
@@ -131,7 +140,8 @@ export const localeMap = {
131140
"en": true
132141
},
133142
"/build/get-started": {
134-
"en": true
143+
"en": true,
144+
"zh": true
135145
},
136146
"/build/guides/aptos-keyless/how-keyless-works": {
137147
"en": true
@@ -574,9 +584,6 @@ export const localeMap = {
574584
"/build/smart-contracts/objects": {
575585
"en": true
576586
},
577-
"/build/smart-contracts/pokemon/[name]": {
578-
"en": true
579-
},
580587
"/build/smart-contracts/prover/prover-guide": {
581588
"en": true
582589
},
@@ -755,6 +762,9 @@ export const localeMap = {
755762
"/network/blockchain/events": {
756763
"en": true
757764
},
765+
"/network/blockchain/execution": {
766+
"en": true
767+
},
758768
"/network/blockchain/fullnodes": {
759769
"en": true
760770
},

0 commit comments

Comments
 (0)