You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: develop/smart-contracts/precompiles/xcm-precompile.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ Once connected, you can directly interact with the XCM precompile's functions (`
47
47
48
48
The `weighMessage` function estimates the computational cost required to execute an XCM message. This is crucial for understanding the resources needed before actually executing or sending a message.
49
49
50
-
To test this functionality in Remix, you can call `callWeighMessage` with a SCALEencoded XCM message. For example, for testing, you can use the following encoded XCM message:
50
+
To test this functionality in Remix, you can call `callWeighMessage` with a SCALE-encoded XCM message. For example, for testing, you can use the following encoded XCM message:
@@ -61,7 +61,7 @@ This encoded message represents a sequence of XCM instructions:
61
61
-**[Buy Execution](https://github.com/polkadot-fellows/xcm-format?tab=readme-ov-file#buyexecution){target=\_blank}**: This instruction purchases execution time on the destination chain using the withdrawn assets, ensuring the message can be processed.
62
62
-**[Deposit Asset](https://github.com/polkadot-fellows/xcm-format?tab=readme-ov-file#depositasset){target=\_blank}**: This instruction deposits the remaining assets into a specified account on the destination chain after execution costs have been deducted.
63
63
64
-
This encoded message is provided as an example. You can craft your own XCM message tailored to your specific use case as needed
64
+
This encoded message is provided as an example. You can craft your own XCM message tailored to your specific use case as needed.
65
65
66
66
The function returns a `Weight` struct containing `refTime` and `proofSize` values, which indicate the estimated computational cost of executing this message. If successful, after calling the `callWeighMessage` function, you should see the `refTime` and `proofSize` of the message:
67
67
@@ -83,7 +83,7 @@ To execute a message:
83
83
-`message`: The encoded XCM message bytes.
84
84
-`weight`: The `Weight` struct returned from `callWeighMessage`.
85
85
86
-
You can examine the full extrinsic structure for this operation [here](https://dev.papi.how/extrinsics#networkId=localhost&endpoint=wss%3A%2F%2Ftestnet-passet-hub.polkadot.io&data=0x1f03050c000401000003008c86471301000003008c8647000d010101000000010100368e8759910dab756d344995f1d3c79374ca8f70066d3a709e48029f6bf0ee7e0750c61e2901daad0600).
86
+
You can examine the complete extrinsic structure for this operation [here](https://dev.papi.how/extrinsics#networkId=localhost&endpoint=wss%3A%2F%2Ftestnet-passet-hub.polkadot.io&data=0x1f03050c000401000003008c86471301000003008c8647000d010101000000010100368e8759910dab756d344995f1d3c79374ca8f70066d3a709e48029f6bf0ee7e0750c61e2901daad0600){target=\_blank}.
87
87
88
88
5. Click on the **Transact** button to execute the xcm message:
89
89
@@ -93,7 +93,7 @@ If successful, you will see the following output in the Remix terminal:
Also, you can verify that the execution of this specific message succeeded by checking that the beneficiary account of the xcm message has received the funds accordingly.
96
+
Additionally, you can verify that the execution of this specific message was successful by checking that the beneficiary account associated with the xcm message has received the funds accordingly.
97
97
98
98
### Send a Message
99
99
@@ -111,7 +111,7 @@ Unlike `execute`, the `send` function doesn't require a weight parameter since t
111
111
112
112
## Cross Contract Calls
113
113
114
-
Beyond direct interaction and wrapper contracts, you can integrate XCM functionality directly into your existing smart contracts by inheriting from or importing the `IXcm` interface. This approach allows you to embed cross-chain capabilities seamlessly into your application logic.
114
+
Beyond direct interaction and wrapper contracts, you can integrate XCM functionality directly into your existing smart contracts by inheriting from or importing the `IXcm` interface. This approach enables you to seamlessly embed cross-chain capabilities into your application logic.
115
115
116
116
Whether you're building DeFi protocols, governance systems, or any application requiring cross-chain coordination, you can incorporate XCM calls directly within your contract's functions.
Copy file name to clipboardExpand all lines: llms.txt
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -12556,7 +12556,7 @@ Once connected, you can directly interact with the XCM precompile's functions (`
12556
12556
12557
12557
The `weighMessage` function estimates the computational cost required to execute an XCM message. This is crucial for understanding the resources needed before actually executing or sending a message.
12558
12558
12559
-
To test this functionality in Remix, you can call `callWeighMessage` with a SCALEencoded XCM message. For example, for testing, you can use the following encoded XCM message:
12559
+
To test this functionality in Remix, you can call `callWeighMessage` with a SCALE-encoded XCM message. For example, for testing, you can use the following encoded XCM message:
@@ -12570,7 +12570,7 @@ This encoded message represents a sequence of XCM instructions:
12570
12570
- **[Buy Execution](https://github.com/polkadot-fellows/xcm-format?tab=readme-ov-file#buyexecution){target=\_blank}**: This instruction purchases execution time on the destination chain using the withdrawn assets, ensuring the message can be processed.
12571
12571
- **[Deposit Asset](https://github.com/polkadot-fellows/xcm-format?tab=readme-ov-file#depositasset){target=\_blank}**: This instruction deposits the remaining assets into a specified account on the destination chain after execution costs have been deducted.
12572
12572
12573
-
This encoded message is provided as an example. You can craft your own XCM message tailored to your specific use case as needed
12573
+
This encoded message is provided as an example. You can craft your own XCM message tailored to your specific use case as needed.
12574
12574
12575
12575
The function returns a `Weight` struct containing `refTime` and `proofSize` values, which indicate the estimated computational cost of executing this message. If successful, after calling the `callWeighMessage` function, you should see the `refTime` and `proofSize` of the message:
12576
12576
@@ -12592,7 +12592,7 @@ To execute a message:
12592
12592
- `message`: The encoded XCM message bytes.
12593
12593
- `weight`: The `Weight` struct returned from `callWeighMessage`.
12594
12594
12595
-
You can examine the full extrinsic structure for this operation [here](https://dev.papi.how/extrinsics#networkId=localhost&endpoint=wss%3A%2F%2Ftestnet-passet-hub.polkadot.io&data=0x1f03050c000401000003008c86471301000003008c8647000d010101000000010100368e8759910dab756d344995f1d3c79374ca8f70066d3a709e48029f6bf0ee7e0750c61e2901daad0600).
12595
+
You can examine the complete extrinsic structure for this operation [here](https://dev.papi.how/extrinsics#networkId=localhost&endpoint=wss%3A%2F%2Ftestnet-passet-hub.polkadot.io&data=0x1f03050c000401000003008c86471301000003008c8647000d010101000000010100368e8759910dab756d344995f1d3c79374ca8f70066d3a709e48029f6bf0ee7e0750c61e2901daad0600){target=\_blank}.
12596
12596
12597
12597
5. Click on the **Transact** button to execute the xcm message:
12598
12598
@@ -12602,7 +12602,7 @@ If successful, you will see the following output in the Remix terminal:
Also, you can verify that the execution of this specific message succeeded by checking that the beneficiary account of the xcm message has received the funds accordingly.
12605
+
Additionally, you can verify that the execution of this specific message was successful by checking that the beneficiary account associated with the xcm message has received the funds accordingly.
12606
12606
12607
12607
### Send a Message
12608
12608
@@ -12620,7 +12620,7 @@ Unlike `execute`, the `send` function doesn't require a weight parameter since t
12620
12620
12621
12621
## Cross Contract Calls
12622
12622
12623
-
Beyond direct interaction and wrapper contracts, you can integrate XCM functionality directly into your existing smart contracts by inheriting from or importing the `IXcm` interface. This approach allows you to embed cross-chain capabilities seamlessly into your application logic.
12623
+
Beyond direct interaction and wrapper contracts, you can integrate XCM functionality directly into your existing smart contracts by inheriting from or importing the `IXcm` interface. This approach enables you to seamlessly embed cross-chain capabilities into your application logic.
12624
12624
12625
12625
Whether you're building DeFi protocols, governance systems, or any application requiring cross-chain coordination, you can incorporate XCM calls directly within your contract's functions.
0 commit comments