Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

XCM v1 #2815

Merged
merged 87 commits into from
Aug 6, 2021
Merged

XCM v1 #2815

Changes from 1 commit
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
3e15173
MultiAsset TWO
gavofyork Apr 4, 2021
12054df
Merge remote-tracking branch 'origin/master' into gav-multiasset-2
gavofyork Jul 29, 2021
ee80e03
Draft next MultiAsset API.
gavofyork Jul 30, 2021
2661b91
XCM core builds
gavofyork Jul 30, 2021
6fc030e
XCM Executor builds
gavofyork Jul 30, 2021
8017453
XCM Builder builds
gavofyork Jul 31, 2021
5445d06
API changes making their way throughout
gavofyork Aug 1, 2021
958d79a
Some TODOs
gavofyork Aug 1, 2021
7d47d21
Further build fixes
gavofyork Aug 1, 2021
bb5bf44
Basic compile builds
gavofyork Aug 1, 2021
acef319
First test fixed
gavofyork Aug 1, 2021
7d700b6
All executor tests fixed
gavofyork Aug 1, 2021
3e62aa3
Typo
gavofyork Aug 1, 2021
ca477f0
Optimize subsume_assets and add test
gavofyork Aug 1, 2021
3cc428f
Optimize checked_sub
gavofyork Aug 1, 2021
099aea7
XCM Builder first test fixed
gavofyork Aug 1, 2021
5158442
Fix builder tests
gavofyork Aug 2, 2021
6814aa8
Fix doc test
gavofyork Aug 2, 2021
529a931
fix some doc tests
gavofyork Aug 2, 2021
3e93d54
spelling
gavofyork Aug 2, 2021
f42b3ab
named fields for AllOf
gavofyork Aug 2, 2021
97051b2
Update xcm/src/v0/multiasset.rs
gavofyork Aug 3, 2021
84b79cf
Update xcm/src/v0/multiasset.rs
gavofyork Aug 3, 2021
1f98872
Update xcm/src/v0/multiasset.rs
gavofyork Aug 3, 2021
0cc61de
Update xcm/src/v0/multiasset.rs
gavofyork Aug 3, 2021
4f57497
Merge branch 'master' into gav-multiasset-2-reformat
gavofyork Aug 3, 2021
723990c
Reformat
gavofyork Aug 3, 2021
9e2e009
Move to XCM version 1
gavofyork Aug 3, 2021
00ca37b
Spelling
gavofyork Aug 3, 2021
768c96a
warnings
gavofyork Aug 3, 2021
2936419
Replace some more v0->v1s
gavofyork Aug 3, 2021
015fff2
warnings
gavofyork Aug 3, 2021
b5fe03e
format
gavofyork Aug 3, 2021
608a212
Add max_assets param
gavofyork Aug 3, 2021
dee3be5
building
gavofyork Aug 3, 2021
a6eaaa2
test fixes
gavofyork Aug 3, 2021
f58a659
tests
gavofyork Aug 3, 2021
8a78100
another test
gavofyork Aug 3, 2021
6eb75ad
final test
gavofyork Aug 3, 2021
9d0b9f9
tests
gavofyork Aug 4, 2021
b5b63c8
Rename Null -> Here
gavofyork Aug 4, 2021
e9dbc72
Introduce
gavofyork Aug 4, 2021
36ccb47
More ergonomics
gavofyork Aug 4, 2021
de33d7d
More ergonomics
gavofyork Aug 4, 2021
7ff0493
test fix
gavofyork Aug 4, 2021
d43d987
Merge branch 'gav-multiasset-2' into gav-max-assets
gavofyork Aug 4, 2021
84c44f8
test fixes
gavofyork Aug 4, 2021
7d52b93
docs
gavofyork Aug 4, 2021
51c7d05
BuyExecution includes
gavofyork Aug 4, 2021
851b00e
Fix XCM extrinsics
gavofyork Aug 4, 2021
20bb714
fmt
gavofyork Aug 4, 2021
3f85ebd
Make Vec<MultiAsset>/MultiAssets conversions safe
gavofyork Aug 4, 2021
61a2231
More MultiAssets conversion safety
gavofyork Aug 4, 2021
7646446
Merge remote-tracking branch 'origin/master' into gav-multiasset-2
gavofyork Aug 4, 2021
8644265
spelling
gavofyork Aug 4, 2021
1e75953
fix doc test
gavofyork Aug 4, 2021
669dcb0
Apply suggestions from code review
gavofyork Aug 5, 2021
767bdb5
Apply suggestions from code review
gavofyork Aug 5, 2021
ec2c1e9
fmt
gavofyork Aug 5, 2021
740f6f3
Add v0, remove VersionedMultiAsset
gavofyork Aug 5, 2021
9f8606d
Remove VersionedMultiLocation
gavofyork Aug 5, 2021
1c4a89a
Update xcm/src/v1/order.rs
gavofyork Aug 5, 2021
d3fb090
Update xcm/src/v1/mod.rs
gavofyork Aug 5, 2021
a5c2bde
XCM v0 backwards compatibility
gavofyork Aug 5, 2021
2d0479a
Merge branch 'gav-multiasset-2' of github.com:paritytech/polkadot int…
gavofyork Aug 5, 2021
7130ed7
Full compatibility
gavofyork Aug 5, 2021
efa012d
fmt
gavofyork Aug 5, 2021
a0658e1
Merge branch 'master' into gav-multiasset-2
gavofyork Aug 5, 2021
e33710b
Update xcm/pallet-xcm/src/lib.rs
shawntabrizi Aug 5, 2021
a31887c
Merge branch 'master' into gav-multiasset-2
gavofyork Aug 5, 2021
fe59886
Update xcm/src/v0/order.rs
gavofyork Aug 5, 2021
d2bd1e0
Tweaks to versioning system
gavofyork Aug 6, 2021
089d90c
Merge branch 'gav-multiasset-2' of github.com:paritytech/polkadot int…
gavofyork Aug 6, 2021
d9ff88c
Fixes
gavofyork Aug 6, 2021
b40668e
fmt
gavofyork Aug 6, 2021
53baf5f
Update xcm/xcm-executor/src/assets.rs
gavofyork Aug 6, 2021
0309b2d
Update xcm/xcm-executor/src/assets.rs
gavofyork Aug 6, 2021
0383e58
Grumbles
gavofyork Aug 6, 2021
277f705
Merge branch 'gav-multiasset-2' of github.com:paritytech/polkadot int…
gavofyork Aug 6, 2021
3eee7b3
Update xcm/src/v1/multiasset.rs
gavofyork Aug 6, 2021
c61cd59
fmt
gavofyork Aug 6, 2021
ac31e7e
Merge branch 'gav-multiasset-2' of github.com:paritytech/polkadot int…
gavofyork Aug 6, 2021
0547932
Update xcm/src/v1/multiasset.rs
gavofyork Aug 6, 2021
18dca5f
Update xcm/src/v1/multiasset.rs
gavofyork Aug 6, 2021
48e3eba
Merge branch 'gav-multiasset-2' of github.com:paritytech/polkadot int…
gavofyork Aug 6, 2021
04e32dc
Fixes
gavofyork Aug 6, 2021
c234c51
Formatting
gavofyork Aug 6, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
More ergonomics
gavofyork committed Aug 4, 2021
commit de33d7d1cc392a16f47989a727520de3fbd32478
10 changes: 8 additions & 2 deletions xcm/pallet-xcm/src/tests.rs
Original file line number Diff line number Diff line change
@@ -157,7 +157,10 @@ fn reserve_transfer_assets_works() {
Parachain(PARA_ID).into(),
Xcm::ReserveAssetDeposited {
assets: (X1(Parent), SEND_AMOUNT).into(),
effects: vec![buy_execution(weight), DepositAsset { assets: Wild(All), beneficiary: dest },]
effects: vec![
buy_execution(weight),
DepositAsset { assets: Wild(All), beneficiary: dest },
]
}
)]
);
@@ -185,7 +188,10 @@ fn execute_withdraw_to_deposit_works() {
Origin::signed(ALICE),
Box::new(Xcm::WithdrawAsset {
assets: (Here, SEND_AMOUNT).into(),
effects: vec![buy_execution(weight), DepositAsset { assets: Wild(All), beneficiary: dest }],
effects: vec![
buy_execution(weight),
DepositAsset { assets: Wild(All), beneficiary: dest }
],
}),
weight
));
6 changes: 4 additions & 2 deletions xcm/src/v1/mod.rs
Original file line number Diff line number Diff line change
@@ -304,8 +304,10 @@ impl<Call> Xcm<Call> {
assets,
effects: effects.into_iter().map(Order::into).collect(),
},
ReceiveTeleportedAsset { assets, effects } =>
ReceiveTeleportedAsset { assets, effects: effects.into_iter().map(Order::into).collect() },
ReceiveTeleportedAsset { assets, effects } => ReceiveTeleportedAsset {
assets,
effects: effects.into_iter().map(Order::into).collect(),
},
QueryResponse { query_id: u64, response } => QueryResponse { query_id: u64, response },
TransferAsset { assets, beneficiary } => TransferAsset { assets, beneficiary },
TransferReserveAsset { assets, dest, effects } =>
9 changes: 6 additions & 3 deletions xcm/xcm-builder/src/tests.rs
Original file line number Diff line number Diff line change
@@ -56,7 +56,8 @@ fn weigher_should_work() {

#[test]
fn take_weight_credit_barrier_should_work() {
let mut message = opaque::Xcm::TransferAsset { assets: (X1(Parent), 100).into(), beneficiary: Here };
let mut message =
opaque::Xcm::TransferAsset { assets: (X1(Parent), 100).into(), beneficiary: Here };

let mut weight_credit = 10;
let r =
@@ -72,7 +73,8 @@ fn take_weight_credit_barrier_should_work() {

#[test]
fn allow_unpaid_should_work() {
let mut message = opaque::Xcm::TransferAsset { assets: (X1(Parent), 100).into(), beneficiary: Here };
let mut message =
opaque::Xcm::TransferAsset { assets: (X1(Parent), 100).into(), beneficiary: Here };

AllowUnpaidFrom::set(vec![X1(Parent)]);

@@ -99,7 +101,8 @@ fn allow_unpaid_should_work() {
fn allow_paid_should_work() {
AllowPaidFrom::set(vec![X1(Parent)]);

let mut message = opaque::Xcm::TransferAsset { assets: (X1(Parent), 100).into(), beneficiary: Here };
let mut message =
opaque::Xcm::TransferAsset { assets: (X1(Parent), 100).into(), beneficiary: Here };

let r = AllowTopLevelPaidExecutionFrom::<IsInVec<AllowPaidFrom>>::should_execute(
&X1(Parachain(1)),