25
25
- [ Function ` register_apt ` ] ( #0x1_aptos_account_register_apt )
26
26
- [ Function ` fungible_transfer_only ` ] ( #0x1_aptos_account_fungible_transfer_only )
27
27
- [ Function ` is_fungible_balance_at_least ` ] ( #0x1_aptos_account_is_fungible_balance_at_least )
28
- - [ Function ` burn_from_fungible_store ` ] ( #0x1_aptos_account_burn_from_fungible_store )
28
+ - [ Function ` burn_from_fungible_store_for_gas ` ] ( #0x1_aptos_account_burn_from_fungible_store_for_gas )
29
29
- [ Function ` ensure_primary_fungible_store_exists ` ] ( #0x1_aptos_account_ensure_primary_fungible_store_exists )
30
30
- [ Function ` primary_fungible_store_address ` ] ( #0x1_aptos_account_primary_fungible_store_address )
31
31
- [ Specification] ( #@Specification_1 )
47
47
- [ Function ` register_apt ` ] ( #@Specification_1_register_apt )
48
48
- [ Function ` fungible_transfer_only ` ] ( #@Specification_1_fungible_transfer_only )
49
49
- [ Function ` is_fungible_balance_at_least ` ] ( #@Specification_1_is_fungible_balance_at_least )
50
- - [ Function ` burn_from_fungible_store ` ] ( #@Specification_1_burn_from_fungible_store )
50
+ - [ Function ` burn_from_fungible_store_for_gas ` ] ( #@Specification_1_burn_from_fungible_store_for_gas )
51
51
52
52
53
53
<pre ><code ><b >use</b > <a href =" account.md#0x1_account " >0x1::account</a >;
@@ -707,7 +707,7 @@ to transfer APT) - if we want to allow APT PFS without account itself
707
707
// <b >as</b > APT cannot be frozen or have dispatch, and PFS cannot be transfered
708
708
// (PFS could potentially be burned. regular transfer would permanently unburn the store.
709
709
// Ignoring the check here <b >has</b > the equivalent of unburning, transfers, and then burning again)
710
- <a href =" fungible_asset.md#0x1_fungible_asset_deposit_internal " >fungible_asset::deposit_internal </a >(recipient_store, <a href =" fungible_asset.md#0x1_fungible_asset_withdraw_internal " >fungible_asset::withdraw_internal </a >(sender_store, amount));
710
+ <a href =" fungible_asset.md#0x1_fungible_asset_unchecked_deposit " >fungible_asset::unchecked_deposit </a >(recipient_store, <a href =" fungible_asset.md#0x1_fungible_asset_unchecked_withdraw " >fungible_asset::unchecked_withdraw </a >(sender_store, amount));
711
711
}
712
712
</code ></pre >
713
713
@@ -741,14 +741,14 @@ Is balance from APT Primary FungibleStore at least the given amount
741
741
742
742
</details >
743
743
744
- <a id =" 0x1_aptos_account_burn_from_fungible_store " ></a >
744
+ <a id =" 0x1_aptos_account_burn_from_fungible_store_for_gas " ></a >
745
745
746
- ## Function ` burn_from_fungible_store `
746
+ ## Function ` burn_from_fungible_store_for_gas `
747
747
748
- Burn from APT Primary FungibleStore
748
+ Burn from APT Primary FungibleStore for gas charge
749
749
750
750
751
- <pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" aptos_account.md#0x1_aptos_account_burn_from_fungible_store " >burn_from_fungible_store </a >(ref: &<a href =" fungible_asset.md#0x1_fungible_asset_BurnRef " >fungible_asset::BurnRef</a >, <a href =" account.md#0x1_account " >account</a >: <b >address</b >, amount: u64)
751
+ <pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" aptos_account.md#0x1_aptos_account_burn_from_fungible_store_for_gas " >burn_from_fungible_store_for_gas </a >(ref: &<a href =" fungible_asset.md#0x1_fungible_asset_BurnRef " >fungible_asset::BurnRef</a >, <a href =" account.md#0x1_account " >account</a >: <b >address</b >, amount: u64)
752
752
</code ></pre >
753
753
754
754
@@ -757,15 +757,15 @@ Burn from APT Primary FungibleStore
757
757
<summary >Implementation</summary >
758
758
759
759
760
- <pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" aptos_account.md#0x1_aptos_account_burn_from_fungible_store " >burn_from_fungible_store </a >(
760
+ <pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" aptos_account.md#0x1_aptos_account_burn_from_fungible_store_for_gas " >burn_from_fungible_store_for_gas </a >(
761
761
ref: &BurnRef,
762
762
<a href =" account.md#0x1_account " >account</a >: <b >address</b >,
763
763
amount: u64,
764
764
) {
765
765
// Skip burning <b >if</b > amount is zero. This shouldn't <a href =" ../../aptos-stdlib/../move-stdlib/doc/error.md#0x1_error " >error</a > out <b >as</b > it's called <b >as</b > part of transaction fee burning.
766
766
<b >if</b > (amount != 0) {
767
767
<b >let</b > store_addr = <a href =" aptos_account.md#0x1_aptos_account_primary_fungible_store_address " >primary_fungible_store_address</a >(<a href =" account.md#0x1_account " >account</a >);
768
- <a href =" fungible_asset.md#0x1_fungible_asset_address_burn_from " >fungible_asset::address_burn_from </a >(ref, store_addr, amount);
768
+ <a href =" fungible_asset.md#0x1_fungible_asset_address_burn_from_for_gas " >fungible_asset::address_burn_from_for_gas </a >(ref, store_addr, amount);
769
769
};
770
770
}
771
771
</code ></pre >
@@ -1294,12 +1294,12 @@ Check if the AptosCoin under the address existed.
1294
1294
1295
1295
1296
1296
1297
- <a id =" @Specification_1_burn_from_fungible_store " ></a >
1297
+ <a id =" @Specification_1_burn_from_fungible_store_for_gas " ></a >
1298
1298
1299
- ### Function ` burn_from_fungible_store `
1299
+ ### Function ` burn_from_fungible_store_for_gas `
1300
1300
1301
1301
1302
- <pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" aptos_account.md#0x1_aptos_account_burn_from_fungible_store " >burn_from_fungible_store </a >(ref: &<a href =" fungible_asset.md#0x1_fungible_asset_BurnRef " >fungible_asset::BurnRef</a >, <a href =" account.md#0x1_account " >account</a >: <b >address</b >, amount: u64)
1302
+ <pre ><code ><b >public</b >(<b >friend</b >) <b >fun</b > <a href =" aptos_account.md#0x1_aptos_account_burn_from_fungible_store_for_gas " >burn_from_fungible_store_for_gas </a >(ref: &<a href =" fungible_asset.md#0x1_fungible_asset_BurnRef " >fungible_asset::BurnRef</a >, <a href =" account.md#0x1_account " >account</a >: <b >address</b >, amount: u64)
1303
1303
</code ></pre >
1304
1304
1305
1305
0 commit comments