@@ -1034,16 +1034,6 @@ The value of aggregatable coin used for transaction fees redistribution does not
10341034
10351035
10361036
1037- <a id =" 0x1_coin_EAPT_PAIRING_IS_NOT_ENABLED " ></a >
1038-
1039- SUPRA pairing is not eanbled yet.
1040-
1041-
1042- <pre ><code ><b >const</b > <a href =" coin.md#0x1_coin_EAPT_PAIRING_IS_NOT_ENABLED " >EAPT_PAIRING_IS_NOT_ENABLED</a >: u64 = 28;
1043- </code ></pre >
1044-
1045-
1046-
10471037<a id =" 0x1_coin_EBURN_REF_NOT_FOUND " ></a >
10481038
10491039The BurnRef does not exist.
@@ -1254,6 +1244,16 @@ PairedFungibleAssetRefs resource does not exist.
12541244
12551245
12561246
1247+ <a id =" 0x1_coin_ESUP_PAIRING_IS_NOT_ENABLED " ></a >
1248+
1249+ SUPRA pairing is not eanbled yet.
1250+
1251+
1252+ <pre ><code ><b >const</b > <a href =" coin.md#0x1_coin_ESUP_PAIRING_IS_NOT_ENABLED " >ESUP_PAIRING_IS_NOT_ENABLED</a >: u64 = 28;
1253+ </code ></pre >
1254+
1255+
1256+
12571257<a id =" 0x1_coin_ETRANSFER_REF_NOT_FOUND " ></a >
12581258
12591259The TransferRef does not exist.
@@ -1375,6 +1375,9 @@ Create SUPRA pairing by passing <code>SupraCoin</code>.
13751375 supra_framework: &<a href =" ../../aptos-stdlib/../move-stdlib/doc/signer.md#0x1_signer " >signer</a >
13761376) <b >acquires</b > <a href =" coin.md#0x1_coin_CoinConversionMap " >CoinConversionMap</a >, <a href =" coin.md#0x1_coin_CoinInfo " >CoinInfo</a > {
13771377 <a href =" system_addresses.md#0x1_system_addresses_assert_supra_framework " >system_addresses::assert_supra_framework</a >(supra_framework);
1378+ <b >if</b > (!<a href =" ../../aptos-stdlib/../move-stdlib/doc/features.md#0x1_features_coin_to_fungible_asset_migration_feature_enabled " >features::coin_to_fungible_asset_migration_feature_enabled</a >()) {
1379+ <b >abort</b > <a href =" ../../aptos-stdlib/../move-stdlib/doc/error.md#0x1_error_unavailable " >error::unavailable</a >(<a href =" coin.md#0x1_coin_ECOIN_TO_FUNGIBLE_ASSET_FEATURE_NOT_ENABLED " >ECOIN_TO_FUNGIBLE_ASSET_FEATURE_NOT_ENABLED</a >)
1380+ };
13781381 <a href =" coin.md#0x1_coin_create_and_return_paired_metadata_if_not_exist " >create_and_return_paired_metadata_if_not_exist</a >< ; CoinType> ; (<b >true</b >);
13791382}
13801383</code ></pre >
@@ -1413,7 +1416,7 @@ Create SUPRA pairing by passing <code>SupraCoin</code>.
14131416
14141417
14151418
1416- <pre ><code ><b >fun</b > <a href =" coin.md#0x1_coin_create_and_return_paired_metadata_if_not_exist " >create_and_return_paired_metadata_if_not_exist</a >< ; CoinType> ; (allow_apt_creation : bool): <a href =" object.md#0x1_object_Object " >object::Object</a >< ; <a href =" fungible_asset.md#0x1_fungible_asset_Metadata " >fungible_asset::Metadata</a >> ;
1419+ <pre ><code ><b >fun</b > <a href =" coin.md#0x1_coin_create_and_return_paired_metadata_if_not_exist " >create_and_return_paired_metadata_if_not_exist</a >< ; CoinType> ; (allow_sup_creation : bool): <a href =" object.md#0x1_object_Object " >object::Object</a >< ; <a href =" fungible_asset.md#0x1_fungible_asset_Metadata " >fungible_asset::Metadata</a >> ;
14171420</code ></pre >
14181421
14191422
@@ -1422,7 +1425,7 @@ Create SUPRA pairing by passing <code>SupraCoin</code>.
14221425<summary >Implementation</summary >
14231426
14241427
1425- <pre ><code >inline <b >fun</b > <a href =" coin.md#0x1_coin_create_and_return_paired_metadata_if_not_exist " >create_and_return_paired_metadata_if_not_exist</a >< ; CoinType> ; (allow_apt_creation : bool): Object< ; Metadata> ; {
1428+ <pre ><code >inline <b >fun</b > <a href =" coin.md#0x1_coin_create_and_return_paired_metadata_if_not_exist " >create_and_return_paired_metadata_if_not_exist</a >< ; CoinType> ; (allow_sup_creation : bool): Object< ; Metadata> ; {
14261429 <b >assert</b >!(
14271430 <a href =" ../../aptos-stdlib/../move-stdlib/doc/features.md#0x1_features_coin_to_fungible_asset_migration_feature_enabled " >features::coin_to_fungible_asset_migration_feature_enabled</a >(),
14281431 <a href =" ../../aptos-stdlib/../move-stdlib/doc/error.md#0x1_error_invalid_state " >error::invalid_state</a >(<a href =" coin.md#0x1_coin_EMIGRATION_FRAMEWORK_NOT_ENABLED " >EMIGRATION_FRAMEWORK_NOT_ENABLED</a >)
@@ -1432,13 +1435,13 @@ Create SUPRA pairing by passing <code>SupraCoin</code>.
14321435 <b >let</b > type = <a href =" ../../aptos-stdlib/doc/type_info.md#0x1_type_info_type_of " >type_info::type_of</a >< ; CoinType> ; ();
14331436 <b >if</b > (!<a href =" ../../aptos-stdlib/doc/table.md#0x1_table_contains " >table::contains</a >(&map.coin_to_fungible_asset_map, type)) {
14341437 <b >let</b > is_sup = <a href =" coin.md#0x1_coin_is_sup " >is_sup</a >< ; CoinType> ; ();
1435- <b >assert</b >!(!is_sup || allow_apt_creation , <a href =" ../../aptos-stdlib/../move-stdlib/doc/error.md#0x1_error_invalid_state " >error::invalid_state</a >(<a href =" coin.md#0x1_coin_EAPT_PAIRING_IS_NOT_ENABLED " >EAPT_PAIRING_IS_NOT_ENABLED </a >));
1438+ <b >assert</b >!(!is_sup || allow_sup_creation , <a href =" ../../aptos-stdlib/../move-stdlib/doc/error.md#0x1_error_invalid_state " >error::invalid_state</a >(<a href =" coin.md#0x1_coin_ESUP_PAIRING_IS_NOT_ENABLED " >ESUP_PAIRING_IS_NOT_ENABLED </a >));
14361439 <b >let</b > metadata_object_cref =
14371440 <b >if</b > (is_sup) {
1438- <a href =" object.md#0x1_object_create_sticky_object_at_address " >object::create_sticky_object_at_address</a >(@supra_framework, @aptos_fungible_asset )
1441+ <a href =" object.md#0x1_object_create_sticky_object_at_address " >object::create_sticky_object_at_address</a >(@supra_framework, @supra_fungible_asset )
14391442 } <b >else</b > {
14401443 <a href =" object.md#0x1_object_create_named_object " >object::create_named_object</a >(
1441- &<a href =" create_signer.md#0x1_create_signer_create_signer " >create_signer::create_signer</a >(@aptos_fungible_asset ),
1444+ &<a href =" create_signer.md#0x1_create_signer_create_signer " >create_signer::create_signer</a >(@supra_fungible_asset ),
14421445 *<a href =" ../../aptos-stdlib/../move-stdlib/doc/string.md#0x1_string_bytes " >string::bytes</a >(&<a href =" ../../aptos-stdlib/doc/type_info.md#0x1_type_info_type_name " >type_info::type_name</a >< ; CoinType> ; ())
14431446 )
14441447 };
@@ -1558,16 +1561,10 @@ Conversion from coin to fungible asset
15581561<pre ><code ><b >public</b > <b >fun</b > <a href =" coin.md#0x1_coin_coin_to_fungible_asset " >coin_to_fungible_asset</a >< ; CoinType> ; (
15591562 <a href =" coin.md#0x1_coin " >coin</a >: <a href =" coin.md#0x1_coin_Coin " >Coin</a >< ; CoinType> ;
15601563): FungibleAsset <b >acquires</b > <a href =" coin.md#0x1_coin_CoinConversionMap " >CoinConversionMap</a >, <a href =" coin.md#0x1_coin_CoinInfo " >CoinInfo</a > {
1561- // TODO: Replace the below <a href =" code.md#0x1_code " >code</a > <b >with</b > a call <b >to</b > `coin_to_fungible_asset_internal`
1562- // once we fully support `FungibleAsset`s. The below guard is used because we need <b >to</b >
1563- // preserve the function signature but want <b >to</b > keep the feature flag active <b >to</b > avoid
1564- // breaking the tests. The `<b >else</b >` branch will never be taken in the production <a href =" code.md#0x1_code " >code</a >
1565- // <b >as</b > this feature is set by default.
1566- <b >if</b > (<a href =" ../../aptos-stdlib/../move-stdlib/doc/features.md#0x1_features_coin_to_fungible_asset_migration_feature_enabled " >features::coin_to_fungible_asset_migration_feature_enabled</a >()) {
1564+ <b >if</b > (!<a href =" ../../aptos-stdlib/../move-stdlib/doc/features.md#0x1_features_coin_to_fungible_asset_migration_feature_enabled " >features::coin_to_fungible_asset_migration_feature_enabled</a >()) {
15671565 <b >abort</b > <a href =" ../../aptos-stdlib/../move-stdlib/doc/error.md#0x1_error_unavailable " >error::unavailable</a >(<a href =" coin.md#0x1_coin_ECOIN_TO_FUNGIBLE_ASSET_FEATURE_NOT_ENABLED " >ECOIN_TO_FUNGIBLE_ASSET_FEATURE_NOT_ENABLED</a >)
1568- } <b >else</b > {
1569- <a href =" coin.md#0x1_coin_coin_to_fungible_asset_internal " >coin_to_fungible_asset_internal</a >(<a href =" coin.md#0x1_coin " >coin</a >)
1570- }
1566+ };
1567+ <a href =" coin.md#0x1_coin_coin_to_fungible_asset_internal " >coin_to_fungible_asset_internal</a >(<a href =" coin.md#0x1_coin " >coin</a >)
15711568}
15721569</code ></pre >
15731570
@@ -2367,16 +2364,10 @@ Voluntarily migrate to fungible store for <code>CoinType</code> if not yet.
23672364<pre ><code ><b >public</b > entry <b >fun</b > <a href =" coin.md#0x1_coin_migrate_to_fungible_store " >migrate_to_fungible_store</a >< ; CoinType> ; (
23682365 <a href =" account.md#0x1_account " >account</a >: &<a href =" ../../aptos-stdlib/../move-stdlib/doc/signer.md#0x1_signer " >signer</a >
23692366) <b >acquires</b > <a href =" coin.md#0x1_coin_CoinStore " >CoinStore</a >, <a href =" coin.md#0x1_coin_CoinConversionMap " >CoinConversionMap</a >, <a href =" coin.md#0x1_coin_CoinInfo " >CoinInfo</a > {
2370- // TODO: Replace the below <a href =" code.md#0x1_code " >code</a > <b >with</b > a call <b >to</b > `migrate_to_fungible_store_internal`
2371- // once we fully support `FungibleAsset`s. The below guard is used because we need <b >to</b >
2372- // preserve the function signature but want <b >to</b > keep the feature flag active <b >to</b > avoid
2373- // breaking the tests. The `<b >else</b >` branch will never be taken in the production <a href =" code.md#0x1_code " >code</a >
2374- // <b >as</b > this feature is set by default.
2375- <b >if</b > (<a href =" ../../aptos-stdlib/../move-stdlib/doc/features.md#0x1_features_coin_to_fungible_asset_migration_feature_enabled " >features::coin_to_fungible_asset_migration_feature_enabled</a >()) {
2367+ <b >if</b > (!<a href =" ../../aptos-stdlib/../move-stdlib/doc/features.md#0x1_features_coin_to_fungible_asset_migration_feature_enabled " >features::coin_to_fungible_asset_migration_feature_enabled</a >()) {
23762368 <b >abort</b > <a href =" ../../aptos-stdlib/../move-stdlib/doc/error.md#0x1_error_unavailable " >error::unavailable</a >(<a href =" coin.md#0x1_coin_ECOIN_TO_FUNGIBLE_ASSET_FEATURE_NOT_ENABLED " >ECOIN_TO_FUNGIBLE_ASSET_FEATURE_NOT_ENABLED</a >)
2377- } <b >else</b > {
2378- <a href =" coin.md#0x1_coin_migrate_to_fungible_store_internal " >migrate_to_fungible_store_internal</a >< ; CoinType> ; (<a href =" account.md#0x1_account " >account</a >)
2379- }
2369+ };
2370+ <a href =" coin.md#0x1_coin_migrate_to_fungible_store_internal " >migrate_to_fungible_store_internal</a >< ; CoinType> ; (<a href =" account.md#0x1_account " >account</a >)
23802371}
23812372</code ></pre >
23822373
0 commit comments