File tree 5 files changed +41
-6
lines changed
5 files changed +41
-6
lines changed Original file line number Diff line number Diff line change 16
16
17
17
<div id =" Template " class =" maintab tabcontent active " >
18
18
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
+
20
31
21
32
</div >
22
33
Original file line number Diff line number Diff line change 1
1
# Execute XCM
2
2
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
Original file line number Diff line number Diff line change 1
1
diff --git a/fundamentals/src/xcm_executor.rs b/fundamentals/src/xcm_executor.rs
2
- index f03d79b ..f7e8d2e 100644
2
+ index 168bda0 ..f7e8d2e 100644
3
3
--- a/fundamentals/src/xcm_executor.rs
4
4
+++ 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> {
6
6
/// Execute an XCM from a given `origin`.
7
7
fn execute(origin: impl Into<Location>, xcm: Xcm<()>) -> XcmResult {
8
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
+ - */
9
14
- todo!("{:?}", origin.into())
10
15
+ let origin: Location = origin.into();
11
16
+ let mut vm = Self::new(origin);
Original file line number Diff line number Diff line change @@ -194,6 +194,11 @@ impl<Config: XcmConfig> ExecuteXcm for XcmExecutor<Config> {
194
194
/// Execute an XCM from a given `origin`.
195
195
fn execute ( origin : impl Into < Location > , xcm : Xcm < ( ) > ) -> XcmResult {
196
196
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
+ */
197
202
todo ! ( "{:?}" , origin. into( ) )
198
203
}
199
204
}
Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments