Skip to content

Commit 74027f9

Browse files
committed
mdBook generated from gitorial2
1 parent d51de39 commit 74027f9

File tree

94 files changed

+244
-334
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+244
-334
lines changed

src/0/source/changes.diff

+9-12
Original file line numberDiff line numberDiff line change
@@ -4571,10 +4571,10 @@ index 0000000..8b13789
45714571
+
45724572
diff --git a/fundamentals/src/tests/asset.rs b/fundamentals/src/tests/asset.rs
45734573
new file mode 100644
4574-
index 0000000..1f27042
4574+
index 0000000..60afdca
45754575
--- /dev/null
45764576
+++ b/fundamentals/src/tests/asset.rs
4577-
@@ -0,0 +1,27 @@
4577+
@@ -0,0 +1,24 @@
45784578
+use crate::asset::*;
45794579
+use xcm::latest::prelude::*;
45804580
+
@@ -4589,10 +4589,7 @@ index 0000000..1f27042
45894589
+
45904590
+#[test]
45914591
+fn nonfungibles() {
4592-
+ assert_eq!(
4593-
+ NftLocation::get(),
4594-
+ Location::new(0, [PalletInstance(52), GeneralIndex(3)])
4595-
+ );
4592+
+ assert_eq!(NftLocation::get(), Location::new(0, [PalletInstance(52), GeneralIndex(3)]));
45964593
+ assert_eq!(Nft::get(), (NftLocation::get(), 69u64).into());
45974594
+}
45984595
+
@@ -4781,7 +4778,7 @@ index 0000000..7fbd677
47814778
+}
47824779
diff --git a/fundamentals/src/tests/location.rs b/fundamentals/src/tests/location.rs
47834780
new file mode 100644
4784-
index 0000000..5b415d1
4781+
index 0000000..146aac2
47854782
--- /dev/null
47864783
+++ b/fundamentals/src/tests/location.rs
47874784
@@ -0,0 +1,119 @@
@@ -4794,10 +4791,7 @@ index 0000000..5b415d1
47944791
+ assert_eq!(PolkadotPara1000::get(), Here.into());
47954792
+ assert_eq!(PolkadotPara2004::get(), (Parent, Parachain(2004)).into());
47964793
+ assert_eq!(PolkadotRelay::get(), Parent.into());
4797-
+ assert_eq!(
4798-
+ PolkadotPara1000Alice::get(),
4799-
+ Location::new(0, [AliceBytes::get().into()])
4800-
+ );
4794+
+ assert_eq!(PolkadotPara1000Alice::get(), Location::new(0, [AliceBytes::get().into()]));
48014795
+ assert_eq!(PolkadotPara1000AssetsPallet::get(), Location::new(0, [PalletInstance(50)]));
48024796
+ assert_eq!(
48034797
+ PolkadotPara1000Asset1984::get(),
@@ -4816,7 +4810,10 @@ index 0000000..5b415d1
48164810
+ PolkadotPara1000Alice::get(),
48174811
+ Location::new(0, [Parachain(1000), AliceBytes::get().into()])
48184812
+ );
4819-
+ assert_eq!(PolkadotPara1000AssetsPallet::get(), Location::new(0, [Parachain(1000), PalletInstance(50)]));
4813+
+ assert_eq!(
4814+
+ PolkadotPara1000AssetsPallet::get(),
4815+
+ Location::new(0, [Parachain(1000), PalletInstance(50)])
4816+
+ );
48204817
+ assert_eq!(
48214818
+ PolkadotPara1000Asset1984::get(),
48224819
+ Location::new(0, [Parachain(1000), PalletInstance(50), GeneralIndex(1984)])

src/0/source/fundamentals/src/tests/asset.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ fn fungibles() {
1212

1313
#[test]
1414
fn nonfungibles() {
15-
assert_eq!(
16-
NftLocation::get(),
17-
Location::new(0, [PalletInstance(52), GeneralIndex(3)])
18-
);
15+
assert_eq!(NftLocation::get(), Location::new(0, [PalletInstance(52), GeneralIndex(3)]));
1916
assert_eq!(Nft::get(), (NftLocation::get(), 69u64).into());
2017
}
2118

src/0/source/fundamentals/src/tests/location.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ fn relative_to_polkadot_para_1000_locations() {
77
assert_eq!(PolkadotPara1000::get(), Here.into());
88
assert_eq!(PolkadotPara2004::get(), (Parent, Parachain(2004)).into());
99
assert_eq!(PolkadotRelay::get(), Parent.into());
10-
assert_eq!(
11-
PolkadotPara1000Alice::get(),
12-
Location::new(0, [AliceBytes::get().into()])
13-
);
10+
assert_eq!(PolkadotPara1000Alice::get(), Location::new(0, [AliceBytes::get().into()]));
1411
assert_eq!(PolkadotPara1000AssetsPallet::get(), Location::new(0, [PalletInstance(50)]));
1512
assert_eq!(
1613
PolkadotPara1000Asset1984::get(),
@@ -29,7 +26,10 @@ fn relative_to_polkadot_relay_locations() {
2926
PolkadotPara1000Alice::get(),
3027
Location::new(0, [Parachain(1000), AliceBytes::get().into()])
3128
);
32-
assert_eq!(PolkadotPara1000AssetsPallet::get(), Location::new(0, [Parachain(1000), PalletInstance(50)]));
29+
assert_eq!(
30+
PolkadotPara1000AssetsPallet::get(),
31+
Location::new(0, [Parachain(1000), PalletInstance(50)])
32+
);
3333
assert_eq!(
3434
PolkadotPara1000Asset1984::get(),
3535
Location::new(0, [Parachain(1000), PalletInstance(50), GeneralIndex(1984)])

src/1/solution/fundamentals/src/tests/asset.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ fn fungibles() {
1212

1313
#[test]
1414
fn nonfungibles() {
15-
assert_eq!(
16-
NftLocation::get(),
17-
Location::new(0, [PalletInstance(52), GeneralIndex(3)])
18-
);
15+
assert_eq!(NftLocation::get(), Location::new(0, [PalletInstance(52), GeneralIndex(3)]));
1916
assert_eq!(Nft::get(), (NftLocation::get(), 69u64).into());
2017
}
2118

src/1/solution/fundamentals/src/tests/location.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ fn relative_to_polkadot_para_1000_locations() {
77
assert_eq!(PolkadotPara1000::get(), Here.into());
88
assert_eq!(PolkadotPara2004::get(), (Parent, Parachain(2004)).into());
99
assert_eq!(PolkadotRelay::get(), Parent.into());
10-
assert_eq!(
11-
PolkadotPara1000Alice::get(),
12-
Location::new(0, [AliceBytes::get().into()])
13-
);
10+
assert_eq!(PolkadotPara1000Alice::get(), Location::new(0, [AliceBytes::get().into()]));
1411
assert_eq!(PolkadotPara1000AssetsPallet::get(), Location::new(0, [PalletInstance(50)]));
1512
assert_eq!(
1613
PolkadotPara1000Asset1984::get(),
@@ -29,7 +26,10 @@ fn relative_to_polkadot_relay_locations() {
2926
PolkadotPara1000Alice::get(),
3027
Location::new(0, [Parachain(1000), AliceBytes::get().into()])
3128
);
32-
assert_eq!(PolkadotPara1000AssetsPallet::get(), Location::new(0, [Parachain(1000), PalletInstance(50)]));
29+
assert_eq!(
30+
PolkadotPara1000AssetsPallet::get(),
31+
Location::new(0, [Parachain(1000), PalletInstance(50)])
32+
);
3333
assert_eq!(
3434
PolkadotPara1000Asset1984::get(),
3535
Location::new(0, [Parachain(1000), PalletInstance(50), GeneralIndex(1984)])

src/1/template/fundamentals/src/tests/asset.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ fn fungibles() {
1212

1313
#[test]
1414
fn nonfungibles() {
15-
assert_eq!(
16-
NftLocation::get(),
17-
Location::new(0, [PalletInstance(52), GeneralIndex(3)])
18-
);
15+
assert_eq!(NftLocation::get(), Location::new(0, [PalletInstance(52), GeneralIndex(3)]));
1916
assert_eq!(Nft::get(), (NftLocation::get(), 69u64).into());
2017
}
2118

src/1/template/fundamentals/src/tests/location.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ fn relative_to_polkadot_para_1000_locations() {
77
assert_eq!(PolkadotPara1000::get(), Here.into());
88
assert_eq!(PolkadotPara2004::get(), (Parent, Parachain(2004)).into());
99
assert_eq!(PolkadotRelay::get(), Parent.into());
10-
assert_eq!(
11-
PolkadotPara1000Alice::get(),
12-
Location::new(0, [AliceBytes::get().into()])
13-
);
10+
assert_eq!(PolkadotPara1000Alice::get(), Location::new(0, [AliceBytes::get().into()]));
1411
assert_eq!(PolkadotPara1000AssetsPallet::get(), Location::new(0, [PalletInstance(50)]));
1512
assert_eq!(
1613
PolkadotPara1000Asset1984::get(),
@@ -29,7 +26,10 @@ fn relative_to_polkadot_relay_locations() {
2926
PolkadotPara1000Alice::get(),
3027
Location::new(0, [Parachain(1000), AliceBytes::get().into()])
3128
);
32-
assert_eq!(PolkadotPara1000AssetsPallet::get(), Location::new(0, [Parachain(1000), PalletInstance(50)]));
29+
assert_eq!(
30+
PolkadotPara1000AssetsPallet::get(),
31+
Location::new(0, [Parachain(1000), PalletInstance(50)])
32+
);
3333
assert_eq!(
3434
PolkadotPara1000Asset1984::get(),
3535
Location::new(0, [Parachain(1000), PalletInstance(50), GeneralIndex(1984)])

src/10/solution/fundamentals/src/holding.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl AssetsInHolding {
109109
0
110110
};
111111
if amount > 0 {
112-
taken.subsume(Asset::from((id, amount)).into());
112+
taken.subsume(Asset::from((id, amount)));
113113
}
114114
},
115115
Asset { fun: NonFungible(instance), id } => {

src/10/solution/fundamentals/src/tests/asset.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ fn fungibles() {
1212

1313
#[test]
1414
fn nonfungibles() {
15-
assert_eq!(
16-
NftLocation::get(),
17-
Location::new(0, [PalletInstance(52), GeneralIndex(3)])
18-
);
15+
assert_eq!(NftLocation::get(), Location::new(0, [PalletInstance(52), GeneralIndex(3)]));
1916
assert_eq!(Nft::get(), (NftLocation::get(), 69u64).into());
2017
}
2118

src/10/solution/fundamentals/src/tests/location.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ fn relative_to_polkadot_para_1000_locations() {
77
assert_eq!(PolkadotPara1000::get(), Here.into());
88
assert_eq!(PolkadotPara2004::get(), (Parent, Parachain(2004)).into());
99
assert_eq!(PolkadotRelay::get(), Parent.into());
10-
assert_eq!(
11-
PolkadotPara1000Alice::get(),
12-
Location::new(0, [AliceBytes::get().into()])
13-
);
10+
assert_eq!(PolkadotPara1000Alice::get(), Location::new(0, [AliceBytes::get().into()]));
1411
assert_eq!(PolkadotPara1000AssetsPallet::get(), Location::new(0, [PalletInstance(50)]));
1512
assert_eq!(
1613
PolkadotPara1000Asset1984::get(),
@@ -29,7 +26,10 @@ fn relative_to_polkadot_relay_locations() {
2926
PolkadotPara1000Alice::get(),
3027
Location::new(0, [Parachain(1000), AliceBytes::get().into()])
3128
);
32-
assert_eq!(PolkadotPara1000AssetsPallet::get(), Location::new(0, [Parachain(1000), PalletInstance(50)]));
29+
assert_eq!(
30+
PolkadotPara1000AssetsPallet::get(),
31+
Location::new(0, [Parachain(1000), PalletInstance(50)])
32+
);
3333
assert_eq!(
3434
PolkadotPara1000Asset1984::get(),
3535
Location::new(0, [Parachain(1000), PalletInstance(50), GeneralIndex(1984)])

src/10/template/fundamentals/src/holding.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl AssetsInHolding {
109109
0
110110
};
111111
if amount > 0 {
112-
taken.subsume(Asset::from((id, amount)).into());
112+
taken.subsume(Asset::from((id, amount)));
113113
}
114114
},
115115
Asset { fun: NonFungible(instance), id } => {

src/10/template/fundamentals/src/tests/asset.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ fn fungibles() {
1212

1313
#[test]
1414
fn nonfungibles() {
15-
assert_eq!(
16-
NftLocation::get(),
17-
Location::new(0, [PalletInstance(52), GeneralIndex(3)])
18-
);
15+
assert_eq!(NftLocation::get(), Location::new(0, [PalletInstance(52), GeneralIndex(3)]));
1916
assert_eq!(Nft::get(), (NftLocation::get(), 69u64).into());
2017
}
2118

src/10/template/fundamentals/src/tests/location.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ fn relative_to_polkadot_para_1000_locations() {
77
assert_eq!(PolkadotPara1000::get(), Here.into());
88
assert_eq!(PolkadotPara2004::get(), (Parent, Parachain(2004)).into());
99
assert_eq!(PolkadotRelay::get(), Parent.into());
10-
assert_eq!(
11-
PolkadotPara1000Alice::get(),
12-
Location::new(0, [AliceBytes::get().into()])
13-
);
10+
assert_eq!(PolkadotPara1000Alice::get(), Location::new(0, [AliceBytes::get().into()]));
1411
assert_eq!(PolkadotPara1000AssetsPallet::get(), Location::new(0, [PalletInstance(50)]));
1512
assert_eq!(
1613
PolkadotPara1000Asset1984::get(),
@@ -29,7 +26,10 @@ fn relative_to_polkadot_relay_locations() {
2926
PolkadotPara1000Alice::get(),
3027
Location::new(0, [Parachain(1000), AliceBytes::get().into()])
3128
);
32-
assert_eq!(PolkadotPara1000AssetsPallet::get(), Location::new(0, [Parachain(1000), PalletInstance(50)]));
29+
assert_eq!(
30+
PolkadotPara1000AssetsPallet::get(),
31+
Location::new(0, [Parachain(1000), PalletInstance(50)])
32+
);
3333
assert_eq!(
3434
PolkadotPara1000Asset1984::get(),
3535
Location::new(0, [Parachain(1000), PalletInstance(50), GeneralIndex(1984)])

src/11/solution/fundamentals/src/holding.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl AssetsInHolding {
109109
0
110110
};
111111
if amount > 0 {
112-
taken.subsume(Asset::from((id, amount)).into());
112+
taken.subsume(Asset::from((id, amount)));
113113
}
114114
},
115115
Asset { fun: NonFungible(instance), id } => {

src/11/solution/fundamentals/src/tests/asset.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ fn fungibles() {
1212

1313
#[test]
1414
fn nonfungibles() {
15-
assert_eq!(
16-
NftLocation::get(),
17-
Location::new(0, [PalletInstance(52), GeneralIndex(3)])
18-
);
15+
assert_eq!(NftLocation::get(), Location::new(0, [PalletInstance(52), GeneralIndex(3)]));
1916
assert_eq!(Nft::get(), (NftLocation::get(), 69u64).into());
2017
}
2118

src/11/solution/fundamentals/src/tests/location.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ fn relative_to_polkadot_para_1000_locations() {
77
assert_eq!(PolkadotPara1000::get(), Here.into());
88
assert_eq!(PolkadotPara2004::get(), (Parent, Parachain(2004)).into());
99
assert_eq!(PolkadotRelay::get(), Parent.into());
10-
assert_eq!(
11-
PolkadotPara1000Alice::get(),
12-
Location::new(0, [AliceBytes::get().into()])
13-
);
10+
assert_eq!(PolkadotPara1000Alice::get(), Location::new(0, [AliceBytes::get().into()]));
1411
assert_eq!(PolkadotPara1000AssetsPallet::get(), Location::new(0, [PalletInstance(50)]));
1512
assert_eq!(
1613
PolkadotPara1000Asset1984::get(),
@@ -29,7 +26,10 @@ fn relative_to_polkadot_relay_locations() {
2926
PolkadotPara1000Alice::get(),
3027
Location::new(0, [Parachain(1000), AliceBytes::get().into()])
3128
);
32-
assert_eq!(PolkadotPara1000AssetsPallet::get(), Location::new(0, [Parachain(1000), PalletInstance(50)]));
29+
assert_eq!(
30+
PolkadotPara1000AssetsPallet::get(),
31+
Location::new(0, [Parachain(1000), PalletInstance(50)])
32+
);
3333
assert_eq!(
3434
PolkadotPara1000Asset1984::get(),
3535
Location::new(0, [Parachain(1000), PalletInstance(50), GeneralIndex(1984)])

src/11/template/fundamentals/src/holding.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl AssetsInHolding {
109109
0
110110
};
111111
if amount > 0 {
112-
taken.subsume(Asset::from((id, amount)).into());
112+
taken.subsume(Asset::from((id, amount)));
113113
}
114114
},
115115
Asset { fun: NonFungible(instance), id } => {

src/11/template/fundamentals/src/tests/asset.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ fn fungibles() {
1212

1313
#[test]
1414
fn nonfungibles() {
15-
assert_eq!(
16-
NftLocation::get(),
17-
Location::new(0, [PalletInstance(52), GeneralIndex(3)])
18-
);
15+
assert_eq!(NftLocation::get(), Location::new(0, [PalletInstance(52), GeneralIndex(3)]));
1916
assert_eq!(Nft::get(), (NftLocation::get(), 69u64).into());
2017
}
2118

src/11/template/fundamentals/src/tests/location.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ fn relative_to_polkadot_para_1000_locations() {
77
assert_eq!(PolkadotPara1000::get(), Here.into());
88
assert_eq!(PolkadotPara2004::get(), (Parent, Parachain(2004)).into());
99
assert_eq!(PolkadotRelay::get(), Parent.into());
10-
assert_eq!(
11-
PolkadotPara1000Alice::get(),
12-
Location::new(0, [AliceBytes::get().into()])
13-
);
10+
assert_eq!(PolkadotPara1000Alice::get(), Location::new(0, [AliceBytes::get().into()]));
1411
assert_eq!(PolkadotPara1000AssetsPallet::get(), Location::new(0, [PalletInstance(50)]));
1512
assert_eq!(
1613
PolkadotPara1000Asset1984::get(),
@@ -29,7 +26,10 @@ fn relative_to_polkadot_relay_locations() {
2926
PolkadotPara1000Alice::get(),
3027
Location::new(0, [Parachain(1000), AliceBytes::get().into()])
3128
);
32-
assert_eq!(PolkadotPara1000AssetsPallet::get(), Location::new(0, [Parachain(1000), PalletInstance(50)]));
29+
assert_eq!(
30+
PolkadotPara1000AssetsPallet::get(),
31+
Location::new(0, [Parachain(1000), PalletInstance(50)])
32+
);
3333
assert_eq!(
3434
PolkadotPara1000Asset1984::get(),
3535
Location::new(0, [Parachain(1000), PalletInstance(50), GeneralIndex(1984)])

src/12/source/fundamentals/src/holding.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl AssetsInHolding {
109109
0
110110
};
111111
if amount > 0 {
112-
taken.subsume(Asset::from((id, amount)).into());
112+
taken.subsume(Asset::from((id, amount)));
113113
}
114114
},
115115
Asset { fun: NonFungible(instance), id } => {

src/12/source/fundamentals/src/tests/asset.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ fn fungibles() {
1212

1313
#[test]
1414
fn nonfungibles() {
15-
assert_eq!(
16-
NftLocation::get(),
17-
Location::new(0, [PalletInstance(52), GeneralIndex(3)])
18-
);
15+
assert_eq!(NftLocation::get(), Location::new(0, [PalletInstance(52), GeneralIndex(3)]));
1916
assert_eq!(Nft::get(), (NftLocation::get(), 69u64).into());
2017
}
2118

src/12/source/fundamentals/src/tests/location.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ fn relative_to_polkadot_para_1000_locations() {
77
assert_eq!(PolkadotPara1000::get(), Here.into());
88
assert_eq!(PolkadotPara2004::get(), (Parent, Parachain(2004)).into());
99
assert_eq!(PolkadotRelay::get(), Parent.into());
10-
assert_eq!(
11-
PolkadotPara1000Alice::get(),
12-
Location::new(0, [AliceBytes::get().into()])
13-
);
10+
assert_eq!(PolkadotPara1000Alice::get(), Location::new(0, [AliceBytes::get().into()]));
1411
assert_eq!(PolkadotPara1000AssetsPallet::get(), Location::new(0, [PalletInstance(50)]));
1512
assert_eq!(
1613
PolkadotPara1000Asset1984::get(),
@@ -29,7 +26,10 @@ fn relative_to_polkadot_relay_locations() {
2926
PolkadotPara1000Alice::get(),
3027
Location::new(0, [Parachain(1000), AliceBytes::get().into()])
3128
);
32-
assert_eq!(PolkadotPara1000AssetsPallet::get(), Location::new(0, [Parachain(1000), PalletInstance(50)]));
29+
assert_eq!(
30+
PolkadotPara1000AssetsPallet::get(),
31+
Location::new(0, [Parachain(1000), PalletInstance(50)])
32+
);
3333
assert_eq!(
3434
PolkadotPara1000Asset1984::get(),
3535
Location::new(0, [Parachain(1000), PalletInstance(50), GeneralIndex(1984)])

src/13/source/fundamentals/src/holding.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl AssetsInHolding {
109109
0
110110
};
111111
if amount > 0 {
112-
taken.subsume(Asset::from((id, amount)).into());
112+
taken.subsume(Asset::from((id, amount)));
113113
}
114114
},
115115
Asset { fun: NonFungible(instance), id } => {

0 commit comments

Comments
 (0)