Skip to content

Commit deed206

Browse files
committed
mdBook generated from gitorial
1 parent 3291af9 commit deed206

File tree

5 files changed

+41
-6
lines changed

5 files changed

+41
-6
lines changed

src/11/README.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,18 @@
1616

1717
<div id="Template" class="maintab tabcontent active">
1818

19-
No files edited in this step.
19+
<div class="tab">
20+
<button class="subtab tablinks file-template file-modified active" onclick="switchSubTab(event, 'fundamentals/src/xcm_executor.rs')" data-id="fundamentals/src/xcm_executor.rs">fundamentals/src/xcm_executor.rs</button>
21+
</div>
22+
<div id="template/fundamentals/src/xcm_executor.rs" class="subtab tabcontent active" data-id="fundamentals/src/xcm_executor.rs">
23+
24+
```rust
25+
{{#include ./template/fundamentals/src/xcm_executor.rs}}
26+
```
27+
28+
</div>
29+
30+
2031

2132
</div>
2233

src/11/solution/README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
# Execute XCM
22

3-
As we do with almost all systems in the Polkadot SDK, we create trait abstractions to access underlying systems.
4-
5-
This allows us to
3+
Solution

src/11/solution/solution.diff

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
diff --git a/fundamentals/src/xcm_executor.rs b/fundamentals/src/xcm_executor.rs
2-
index f03d79b..f7e8d2e 100644
2+
index 168bda0..f7e8d2e 100644
33
--- a/fundamentals/src/xcm_executor.rs
44
+++ b/fundamentals/src/xcm_executor.rs
5-
@@ -194,6 +194,8 @@ impl<Config: XcmConfig> ExecuteXcm for XcmExecutor<Config> {
5+
@@ -194,11 +194,8 @@ impl<Config: XcmConfig> ExecuteXcm for XcmExecutor<Config> {
66
/// Execute an XCM from a given `origin`.
77
fn execute(origin: impl Into<Location>, xcm: Xcm<()>) -> XcmResult {
88
log::trace!(target: "xcm::execute", "xcm: {:?}", xcm);
9+
- /* TODO:
10+
- - Convert the `origin` `into` a `Location`.
11+
- - Create a new mutable instance of the XCM Executor as `vm`.
12+
- - Use the `vm` to `process` the `xcm`.
13+
- */
914
- todo!("{:?}", origin.into())
1015
+ let origin: Location = origin.into();
1116
+ let mut vm = Self::new(origin);

src/11/template/fundamentals/src/xcm_executor.rs

+5
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,11 @@ impl<Config: XcmConfig> ExecuteXcm for XcmExecutor<Config> {
194194
/// Execute an XCM from a given `origin`.
195195
fn execute(origin: impl Into<Location>, xcm: Xcm<()>) -> XcmResult {
196196
log::trace!(target: "xcm::execute", "xcm: {:?}", xcm);
197+
/* TODO:
198+
- Convert the `origin` `into` a `Location`.
199+
- Create a new mutable instance of the XCM Executor as `vm`.
200+
- Use the `vm` to `process` the `xcm`.
201+
*/
197202
todo!("{:?}", origin.into())
198203
}
199204
}

src/11/template/template.diff

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
diff --git a/fundamentals/src/xcm_executor.rs b/fundamentals/src/xcm_executor.rs
2+
index f03d79b..168bda0 100644
3+
--- a/fundamentals/src/xcm_executor.rs
4+
+++ b/fundamentals/src/xcm_executor.rs
5+
@@ -194,6 +194,11 @@ impl<Config: XcmConfig> ExecuteXcm for XcmExecutor<Config> {
6+
/// Execute an XCM from a given `origin`.
7+
fn execute(origin: impl Into<Location>, xcm: Xcm<()>) -> XcmResult {
8+
log::trace!(target: "xcm::execute", "xcm: {:?}", xcm);
9+
+ /* TODO:
10+
+ - Convert the `origin` `into` a `Location`.
11+
+ - Create a new mutable instance of the XCM Executor as `vm`.
12+
+ - Use the `vm` to `process` the `xcm`.
13+
+ */
14+
todo!("{:?}", origin.into())
15+
}
16+
}

0 commit comments

Comments
 (0)