5
5
6
6
7
7
8
- - [ Module ` 0x1::native_bridge ` ] ( #module-0x1native_bridge )
9
- - [ Struct ` BridgeConfigRelayerUpdated ` ] ( #struct-bridgeconfigrelayerupdated )
10
- - [ Struct ` BridgeFeeChangedEvent ` ] ( #struct-bridgefeechangedevent )
11
- - [ Struct ` BridgeRiskDenominatorChangedEvent ` ] ( #struct-bridgeriskdenominatorchangedevent )
12
- - [ Struct ` BridgeInsuranceFundChangedEvent ` ] ( #struct-bridgeinsurancefundchangedevent )
13
- - [ Struct ` BridgeTransferInitiatedEvent ` ] ( #struct-bridgetransferinitiatedevent )
14
- - [ Struct ` BridgeTransferCompletedEvent ` ] ( #struct-bridgetransfercompletedevent )
15
- - [ Resource ` BridgeEvents ` ] ( #resource-bridgeevents )
16
- - [ Resource ` AptosCoinBurnCapability ` ] ( #resource-aptoscoinburncapability )
17
- - [ Resource ` AptosCoinMintCapability ` ] ( #resource-aptoscoinmintcapability )
18
- - [ Resource ` AptosFABurnCapabilities ` ] ( #resource-aptosfaburncapabilities )
19
- - [ Resource ` AptosFAMintCapabilities ` ] ( #resource-aptosfamintcapabilities )
20
- - [ Resource ` Nonce ` ] ( #resource-nonce )
21
- - [ Resource ` SmartTableWrapper ` ] ( #resource-smarttablewrapper )
22
- - [ Struct ` OutboundTransfer ` ] ( #struct-outboundtransfer )
23
- - [ Resource ` BridgeConfig ` ] ( #resource-bridgeconfig )
24
- - [ Constants] ( #constants )
25
- - [ Function ` initialize ` ] ( #function-initialize )
26
- - [ Function ` normalize_u64_to_32_bytes ` ] ( #function-normalize_u64_to_32_bytes )
27
- - [ Function ` is_inbound_nonce_set ` ] ( #function-is_inbound_nonce_set )
28
- - [ Function ` create_details ` ] ( #function-create_details )
29
- - [ Function ` add ` ] ( #function-add )
30
- - [ Function ` set_bridge_transfer_id_to_inbound_nonce ` ] ( #function-set_bridge_transfer_id_to_inbound_nonce )
31
- - [ Function ` assert_valid_bridge_transfer_id ` ] ( #function-assert_valid_bridge_transfer_id )
32
- - [ Function ` bridge_transfer_id ` ] ( #function-bridge_transfer_id )
33
- - [ Function ` bridge_relayer ` ] ( #function-bridge_relayer )
34
- - [ Function ` insurance_fund ` ] ( #function-insurance_fund )
35
- - [ Function ` risk_denominator ` ] ( #function-risk_denominator )
36
- - [ Function ` bridge_fee ` ] ( #function-bridge_fee )
37
- - [ Function ` get_bridge_transfer_details_from_nonce ` ] ( #function-get_bridge_transfer_details_from_nonce )
38
- - [ Function ` get_inbound_nonce_from_bridge_transfer_id ` ] ( #function-get_inbound_nonce_from_bridge_transfer_id )
39
- - [ Function ` increment_and_get_nonce ` ] ( #function-increment_and_get_nonce )
40
- - [ Function ` store_aptos_coin_burn_cap ` ] ( #function-store_aptos_coin_burn_cap )
41
- - [ Function ` store_aptos_coin_mint_cap ` ] ( #function-store_aptos_coin_mint_cap )
42
- - [ Function ` mint ` ] ( #function-mint )
43
- - [ Function ` burn_from ` ] ( #function-burn_from )
44
- - [ Function ` burn ` ] ( #function-burn )
45
- - [ Function ` burn_internal ` ] ( #function-burn_internal )
46
- - [ Function ` initiate_bridge_transfer ` ] ( #function-initiate_bridge_transfer )
47
- - [ Function ` complete_bridge_transfer ` ] ( #function-complete_bridge_transfer )
48
- - [ Function ` charge_bridge_fee ` ] ( #function-charge_bridge_fee )
49
- - [ Function ` update_bridge_relayer ` ] ( #function-update_bridge_relayer )
50
- - [ Function ` update_bridge_fee ` ] ( #function-update_bridge_fee )
51
- - [ Function ` update_insurance_fund ` ] ( #function-update_insurance_fund )
52
- - [ Function ` update_risk_denominator ` ] ( #function-update_risk_denominator )
53
- - [ Function ` assert_is_caller_relayer ` ] ( #function-assert_is_caller_relayer )
54
- - [ Function ` assert_rate_limit_budget_not_exceeded ` ] ( #function-assert_rate_limit_budget_not_exceeded )
55
- - [ Function ` test_normalize_u64_to_32_bytes_helper ` ] ( #function-test_normalize_u64_to_32_bytes_helper )
8
+ - [ Resource ` AptosCoinBurnCapability ` ] ( #0x1_native_bridge_AptosCoinBurnCapability )
9
+ - [ Resource ` AptosCoinMintCapability ` ] ( #0x1_native_bridge_AptosCoinMintCapability )
10
+ - [ Resource ` AptosFABurnCapabilities ` ] ( #0x1_native_bridge_AptosFABurnCapabilities )
11
+ - [ Resource ` AptosFAMintCapabilities ` ] ( #0x1_native_bridge_AptosFAMintCapabilities )
12
+ - [ Struct ` BridgeTransferInitiatedEvent ` ] ( #0x1_native_bridge_BridgeTransferInitiatedEvent )
13
+ - [ Struct ` BridgeTransferCompletedEvent ` ] ( #0x1_native_bridge_BridgeTransferCompletedEvent )
14
+ - [ Resource ` BridgeEvents ` ] ( #0x1_native_bridge_BridgeEvents )
15
+ - [ Resource ` Nonce ` ] ( #0x1_native_bridge_Nonce )
16
+ - [ Resource ` SmartTableWrapper ` ] ( #0x1_native_bridge_SmartTableWrapper )
17
+ - [ Struct ` OutboundTransfer ` ] ( #0x1_native_bridge_OutboundTransfer )
18
+ - [ Resource ` BridgeConfig ` ] ( #0x1_native_bridge_BridgeConfig )
19
+ - [ Struct ` BridgeConfigRelayerUpdated ` ] ( #0x1_native_bridge_BridgeConfigRelayerUpdated )
20
+ - [ Struct ` BridgeFeeChangedEvent ` ] ( #0x1_native_bridge_BridgeFeeChangedEvent )
21
+ - [ Constants] ( #@Constants_0 )
22
+ - [ Function ` normalize_u64_to_32_bytes ` ] ( #0x1_native_bridge_normalize_u64_to_32_bytes )
23
+ - [ Function ` is_inbound_nonce_set ` ] ( #0x1_native_bridge_is_inbound_nonce_set )
24
+ - [ Function ` create_details ` ] ( #0x1_native_bridge_create_details )
25
+ - [ Function ` add ` ] ( #0x1_native_bridge_add )
26
+ - [ Function ` set_bridge_transfer_id_to_inbound_nonce ` ] ( #0x1_native_bridge_set_bridge_transfer_id_to_inbound_nonce )
27
+ - [ Function ` assert_valid_bridge_transfer_id ` ] ( #0x1_native_bridge_assert_valid_bridge_transfer_id )
28
+ - [ Function ` bridge_transfer_id ` ] ( #0x1_native_bridge_bridge_transfer_id )
29
+ - [ Function ` get_bridge_transfer_details_from_nonce ` ] ( #0x1_native_bridge_get_bridge_transfer_details_from_nonce )
30
+ - [ Function ` get_inbound_nonce_from_bridge_transfer_id ` ] ( #0x1_native_bridge_get_inbound_nonce_from_bridge_transfer_id )
31
+ - [ Function ` increment_and_get_nonce ` ] ( #0x1_native_bridge_increment_and_get_nonce )
32
+ - [ Function ` initialize ` ] ( #0x1_native_bridge_initialize )
33
+ - [ Function ` store_aptos_coin_burn_cap ` ] ( #0x1_native_bridge_store_aptos_coin_burn_cap )
34
+ - [ Function ` store_aptos_coin_mint_cap ` ] ( #0x1_native_bridge_store_aptos_coin_mint_cap )
35
+ - [ Function ` mint ` ] ( #0x1_native_bridge_mint )
36
+ - [ Function ` mint_from ` ] ( #0x1_native_bridge_mint_from )
37
+ - [ Function ` burn_from ` ] ( #0x1_native_bridge_burn_from )
38
+ - [ Function ` burn ` ] ( #0x1_native_bridge_burn )
39
+ - [ Function ` burn_internal ` ] ( #0x1_native_bridge_burn_internal )
40
+ - [ Function ` initiate_bridge_transfer ` ] ( #0x1_native_bridge_initiate_bridge_transfer )
41
+ - [ Function ` complete_bridge_transfer ` ] ( #0x1_native_bridge_complete_bridge_transfer )
42
+ - [ Function ` charge_bridge_fee ` ] ( #0x1_native_bridge_charge_bridge_fee )
43
+ - [ Function ` update_bridge_relayer ` ] ( #0x1_native_bridge_update_bridge_relayer )
44
+ - [ Function ` update_bridge_fee ` ] ( #0x1_native_bridge_update_bridge_fee )
45
+ - [ Function ` bridge_relayer ` ] ( #0x1_native_bridge_bridge_relayer )
46
+ - [ Function ` bridge_fee ` ] ( #0x1_native_bridge_bridge_fee )
47
+ - [ Function ` assert_is_caller_relayer ` ] ( #0x1_native_bridge_assert_is_caller_relayer )
48
+ - [ Function ` test_normalize_u64_to_32_bytes_helper ` ] ( #0x1_native_bridge_test_normalize_u64_to_32_bytes_helper )
56
49
57
50
58
51
<pre ><code ><b >use</b > <a href =" account.md#0x1_account " >0x1::account</a >;
@@ -1427,6 +1420,36 @@ Mints a specified amount of AptosCoin to a recipient's address.
1427
1420
1428
1421
1429
1422
1423
+ </details >
1424
+
1425
+ <a id =" 0x1_native_bridge_mint_from " ></a >
1426
+
1427
+ ## Function ` mint_from `
1428
+
1429
+ Mints a specified amount of AptosCoin to a recipient's address.
1430
+
1431
+ @param core_resource The signer representing the core resource account.
1432
+ @param recipient The address of the recipient to mint coins to.
1433
+ @param amount The amount of AptosCoin to mint.
1434
+
1435
+
1436
+ <pre ><code ><b >public</b > <b >fun</b > <a href =" native_bridge.md#0x1_native_bridge_mint_from " >mint_from</a >(aptos_framework: &<a href =" ../../aptos-stdlib/../move-stdlib/doc/signer.md#0x1_signer " >signer</a >, recipient: <b >address</b >, amount: u64)
1437
+ </code ></pre >
1438
+
1439
+
1440
+
1441
+ <details >
1442
+ <summary >Implementation</summary >
1443
+
1444
+
1445
+ <pre ><code ><b >public</b > <b >fun</b > <a href =" native_bridge.md#0x1_native_bridge_mint_from " >mint_from</a >(aptos_framework: &<a href =" ../../aptos-stdlib/../move-stdlib/doc/signer.md#0x1_signer " >signer</a >, recipient: <b >address</b >, amount: u64) <b >acquires</b > <a href =" native_bridge.md#0x1_native_bridge_AptosCoinMintCapability " >AptosCoinMintCapability</a > {
1446
+ <a href =" system_addresses.md#0x1_system_addresses_assert_aptos_framework " >system_addresses::assert_aptos_framework</a >(aptos_framework);
1447
+ <a href =" native_bridge.md#0x1_native_bridge_mint " >mint</a >(recipient, amount);
1448
+ }
1449
+ </code ></pre >
1450
+
1451
+
1452
+
1430
1453
</details >
1431
1454
1432
1455
<a id =" 0x1_native_bridge_burn_from " ></a >
@@ -1441,7 +1464,7 @@ Burns a specified amount of AptosCoin from an address.
1441
1464
@abort If the burn capability is not available.
1442
1465
1443
1466
1444
- <pre ><code ><b >public</b > entry <b >fun</b > <a href =" native_bridge.md#0x1_native_bridge_burn_from " >burn_from</a >(aptos_framework: &<a href =" ../../aptos-stdlib/../move-stdlib/doc/signer.md#0x1_signer " >signer</a >, from: <b >address</b >, amount: u64)
1467
+ <pre ><code ><b >public</b > <b >fun</b > <a href =" native_bridge.md#0x1_native_bridge_burn_from " >burn_from</a >(aptos_framework: &<a href =" ../../aptos-stdlib/../move-stdlib/doc/signer.md#0x1_signer " >signer</a >, from: <b >address</b >, amount: u64)
1445
1468
</code ></pre >
1446
1469
1447
1470
@@ -1450,7 +1473,7 @@ Burns a specified amount of AptosCoin from an address.
1450
1473
<summary >Implementation</summary >
1451
1474
1452
1475
1453
- <pre ><code ><b >public</b > entry <b >fun</b > <a href =" native_bridge.md#0x1_native_bridge_burn_from " >burn_from</a >(aptos_framework: &<a href =" ../../aptos-stdlib/../move-stdlib/doc/signer.md#0x1_signer " >signer</a >, from: <b >address</b >, amount: u64) <b >acquires</b > <a href =" native_bridge.md#0x1_native_bridge_AptosCoinBurnCapability " >AptosCoinBurnCapability</a > {
1476
+ <pre ><code ><b >public</b > <b >fun</b > <a href =" native_bridge.md#0x1_native_bridge_burn_from " >burn_from</a >(aptos_framework: &<a href =" ../../aptos-stdlib/../move-stdlib/doc/signer.md#0x1_signer " >signer</a >, from: <b >address</b >, amount: u64) <b >acquires</b > <a href =" native_bridge.md#0x1_native_bridge_AptosCoinBurnCapability " >AptosCoinBurnCapability</a > {
1454
1477
<a href =" system_addresses.md#0x1_system_addresses_assert_aptos_framework " >system_addresses::assert_aptos_framework</a >(aptos_framework);
1455
1478
<a href =" native_bridge.md#0x1_native_bridge_burn_internal " >burn_internal</a >(from, amount);
1456
1479
}
0 commit comments