@@ -29,68 +29,139 @@ interface XCM {
2929 uint256 amount;
3030 }
3131
32+ // The values start at `0` and are represented as `uint8`
33+ enum TransferType {
34+ Teleport,
35+ LocalReserve,
36+ DestinationReserve
37+ }
38+
3239 /// @dev Function to send assets via XCM using transfer_assets() pallet-xcm extrinsic.
33- /// @custom:selector 59df8416
40+ /// @custom:selector 9ea8ada7
3441 /// @param dest The destination chain.
3542 /// @param beneficiary The actual account that will receive the tokens on dest.
36- /// @param assets The combination (array) of assets to send.
43+ /// @param assets The combination (array) of assets to send in Location format .
3744 /// @param feeAssetItem The index of the asset that will be used to pay for fees.
38- /// @param weight The weight to be used for the whole XCM operation.
39- /// (uint64::MAX in refTime means Unlimited weight)
4045 function transferAssetsLocation (
4146 Location memory dest ,
4247 Location memory beneficiary ,
4348 AssetLocationInfo[] memory assets ,
44- uint32 feeAssetItem ,
45- Weight memory weight
49+ uint32 feeAssetItem
4650 ) external ;
4751
4852 /// @dev Function to send assets via XCM to a 20 byte-like parachain
4953 /// using transfer_assets() pallet-xcm extrinsic.
50- /// @custom:selector b489262e
54+ /// @custom:selector a0aeb5fe
5155 /// @param paraId The para-id of the destination chain.
5256 /// @param beneficiary The actual account that will receive the tokens on paraId destination.
53- /// @param assets The combination (array) of assets to send.
57+ /// @param assets The combination (array) of assets to send in Address format .
5458 /// @param feeAssetItem The index of the asset that will be used to pay for fees.
55- /// @param weight The weight to be used for the whole XCM operation.
56- /// (uint64::MAX in refTime means Unlimited weight)
5759 function transferAssetsToPara20 (
5860 uint32 paraId ,
5961 address beneficiary ,
6062 AssetAddressInfo[] memory assets ,
61- uint32 feeAssetItem ,
62- Weight memory weight
63+ uint32 feeAssetItem
6364 ) external ;
6465
6566 /// @dev Function to send assets via XCM to a 32 byte-like parachain
6667 /// using transfer_assets() pallet-xcm extrinsic.
67- /// @custom:selector 4461e6f5
68+ /// @custom:selector f23032c3
6869 /// @param paraId The para-id of the destination chain.
6970 /// @param beneficiary The actual account that will receive the tokens on paraId destination.
70- /// @param assets The combination (array) of assets to send.
71+ /// @param assets The combination (array) of assets to send in Address format .
7172 /// @param feeAssetItem The index of the asset that will be used to pay for fees.
72- /// @param weight The weight to be used for the whole XCM operation.
73- /// (uint64::MAX in refTime means Unlimited weight)
7473 function transferAssetsToPara32 (
7574 uint32 paraId ,
7675 bytes32 beneficiary ,
7776 AssetAddressInfo[] memory assets ,
78- uint32 feeAssetItem ,
79- Weight memory weight
77+ uint32 feeAssetItem
8078 ) external ;
8179
8280 /// @dev Function to send assets via XCM to the relay chain
8381 /// using transfer_assets() pallet-xcm extrinsic.
84- /// @custom:selector d7c89659
82+ /// @custom:selector 6521cc2c
8583 /// @param beneficiary The actual account that will receive the tokens on the relay chain.
86- /// @param assets The combination (array) of assets to send.
84+ /// @param assets The combination (array) of assets to send in Address format .
8785 /// @param feeAssetItem The index of the asset that will be used to pay for fees.
88- /// @param weight The weight to be used for the whole XCM operation.
89- /// (uint64::MAX in refTime means Unlimited weight)
9086 function transferAssetsToRelay (
9187 bytes32 beneficiary ,
9288 AssetAddressInfo[] memory assets ,
93- uint32 feeAssetItem ,
94- Weight memory weight
89+ uint32 feeAssetItem
90+ ) external ;
91+
92+ /// @dev Function to send assets through transfer_assets_using_type_and_then() pallet-xcm
93+ /// extrinsic.
94+ /// Important: in this selector RemoteReserve type (for either assets or fees) is not allowed.
95+ /// If users want to send assets and fees (in Location format) with a remote reserve,
96+ /// they must use the selector fc19376c.
97+ /// @custom:selector 8425d893
98+ /// @param dest The destination chain.
99+ /// @param assets The combination (array) of assets to send in Location format.
100+ /// @param assetsTransferType The TransferType corresponding to assets being sent.
101+ /// @param remoteFeesIdIndex The index of the asset (inside assets array) to use as fees.
102+ /// @param feesTransferType The TransferType corresponding to the asset used as fees.
103+ /// @param customXcmOnDest The XCM message to execute on destination chain (SCALE encoded).
104+ function transferAssetsUsingTypeAndThenLocation (
105+ Location memory dest ,
106+ AssetLocationInfo[] memory assets ,
107+ TransferType assetsTransferType ,
108+ uint8 remoteFeesIdIndex ,
109+ TransferType feesTransferType ,
110+ bytes memory customXcmOnDest
111+ ) external ;
112+
113+ /// @dev Function to send assets through transfer_assets_using_type_and_then() pallet-xcm
114+ /// extrinsic.
115+ /// @custom:selector fc19376c
116+ /// @param dest The destination chain.
117+ /// @param assets The combination (array) of assets to send in Location format.
118+ /// @param remoteFeesIdIndex The index of the asset (inside assets array) to use as fees.
119+ /// @param customXcmOnDest The XCM message to execute on destination chain (SCALE encoded).
120+ /// @param remoteReserve The remote reserve corresponding for assets and fees. They MUST
121+ /// share the same reserve.
122+ function transferAssetsUsingTypeAndThenLocation (
123+ Location memory dest ,
124+ AssetLocationInfo[] memory assets ,
125+ uint8 remoteFeesIdIndex ,
126+ bytes memory customXcmOnDest ,
127+ Location memory remoteReserve
128+ ) external ;
129+
130+ /// @dev Function to send assets through transfer_assets_using_type_and_then() pallet-xcm
131+ /// extrinsic.
132+ /// Important: in this selector RemoteReserve type (for either assets or fees) is not allowed.
133+ /// If users want to send assets and fees (in Address format) with a remote reserve,
134+ /// they must use the selector aaecfc62.
135+ /// @custom:selector 998093ee
136+ /// @param dest The destination chain.
137+ /// @param assets The combination (array) of assets to send in Address format.
138+ /// @param assetsTransferType The TransferType corresponding to assets being sent.
139+ /// @param remoteFeesIdIndex The index of the asset (inside assets array) to use as fees.
140+ /// @param feesTransferType The TransferType corresponding to the asset used as fees.
141+ /// @param customXcmOnDest The XCM message to execute on destination chain (SCALE encoded).
142+ function transferAssetsUsingTypeAndThenAddress (
143+ Location memory dest ,
144+ AssetAddressInfo[] memory assets ,
145+ TransferType assetsTransferType ,
146+ uint8 remoteFeesIdIndex ,
147+ TransferType feesTransferType ,
148+ bytes memory customXcmOnDest
149+ ) external ;
150+
151+ /// @dev Function to send assets through transfer_assets_using_type_and_then() pallet-xcm
152+ /// extrinsic.
153+ /// @custom:selector aaecfc62
154+ /// @param dest The destination chain.
155+ /// @param assets The combination (array) of assets to send in Address format.
156+ /// @param remoteFeesIdIndex The index of the asset (inside assets array) to use as fees.
157+ /// @param customXcmOnDest The XCM message to execute on destination chain (SCALE encoded).
158+ /// @param remoteReserve The remote reserve corresponding for assets and fees. They MUST
159+ /// share the same reserve.
160+ function transferAssetsUsingTypeAndThenAddress (
161+ Location memory dest ,
162+ AssetAddressInfo[] memory assets ,
163+ uint8 remoteFeesIdIndex ,
164+ bytes memory customXcmOnDest ,
165+ Location memory remoteReserve
95166 ) external ;
96167}
0 commit comments