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
* support relaychain as fee
* add weight
* clean and comment
* clean
* use non fee asset as reserve
* update
* clippy
* update weight
* too many fee
* two xcm and split fee
* clean
* fix tests
* more test
* clippy
* fmt
* remove FeeNotEnough
* clean
* add parachain min fee setting
* more test and some limitation
* some notes
* fmt
* Revert "Polkadot v0.9.17 (#705)"
This reverts commit aac79b3.
* update comments
* Revert "Revert "Polkadot v0.9.17 (#705)""
This reverts commit dba578f.
* fix
* update README and add FeeNotEnough Error
Copy file name to clipboardExpand all lines: xtokens/README.md
+46
Original file line number
Diff line number
Diff line change
@@ -28,3 +28,49 @@ Integration tests could be done manually after integrating orml-xtokens into run
28
28
- Sending the tx from parachain A.
29
29
- Set the destination as Parachain B.
30
30
- Set the currency ID as parachain C token.
31
+
32
+
33
+
#### Transfer multiple currencies
34
+
35
+
- Transfer relay chain tokens to relay chain, and use relay chain token as fee
36
+
- Transfer relay chain tokens to parachain, and use relay chain token as fee
37
+
- Transfer tokens issued by parachain A, from parachain A to parachain B, and use parachain A token as fee
38
+
- Transfer tokens issued by parachain B, from parachain A to parachain B, and use parachain B token as fee
39
+
- Transfer tokens issued by parachain C, from parachain A to parachain B, and use parachain C token as fee
40
+
- Transfer tokens issued by parachain B, from parachain A to parachain B, and use relay chain token as fee
41
+
42
+
Notice, in the case of parachain A transfer parachain B token to parachain B, and use relay chain token as fee. Because fee asset is relaychain token, and non fee asset is parachain B token, this is two different chain. We call chain of fee asset as fee_reserve, and chain of non fee asset as non_fee_reserve. And in this case fee_reserve location is also refer to destination parachain.
43
+
44
+
The current implementation is sent two xcm from sender parachain. first xcm sent to fee reserve chain which will also route xcm message to destination parachain. second xcm directly sent to destination parachain.
45
+
46
+
the fee amount in fee asset is split into two parts.
47
+
1. fee asset sent to fee reserve chain = fee_amount - min_xcm_fee
48
+
2. fee asset sent to dest reserve chain = min_xcm_fee
49
+
50
+
Parachains should implements config `MinXcmFee` in `xtokens` module config:
Notice the implementation for now also rely on `SelfLocation` which already in `xtokens` config. The `SelfLocation` current is `(1, Parachain(id))` refer to sender parachain. If parachain set `SelfLocation` to (0, Here), it'll be error in this case.
75
+
76
+
We use `SelfLocation` to fund fee to sender's parachain sovereign account on destination parachain, which asset is originated from sender account on sender parachain. This means if user setup too much fee, the fee will not returned to user, instead deposit to sibling parachain sovereign account on destination parachain.
0 commit comments