Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for foreign asset multilocations #224

Merged
merged 60 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
efc3743
add system to system direction
marshacb Jun 23, 2023
61acc9b
Merge branch 'main' into cameron-implement-system-system
marshacb Jun 23, 2023
cdf89fe
update isLocalSystemTx
marshacb Jun 24, 2023
6748527
update createTransferTransaction
marshacb Jun 24, 2023
590257c
update system to system to check palletInstance only if not relay nat…
marshacb Jun 26, 2023
5bfcbb3
remove console logs
marshacb Jun 26, 2023
1a1d9ce
update Native direction to include SystemToSystem
marshacb Jun 27, 2023
7300c22
update system to system general index check
marshacb Jun 27, 2023
ce47c3a
re-add cypress to lookupAssetId test
marshacb Jun 27, 2023
64d0c47
update xcmDirections checks in AssetTransferApi to use enum
marshacb Jun 28, 2023
cfba4d8
update SystemToSystem integration tests
marshacb Jul 3, 2023
4bbe5e8
merge main
marshacb Jul 3, 2023
5e7d332
lint
marshacb Jul 3, 2023
811fc60
update SystemToSystem fetchAssetType tests
marshacb Jul 6, 2023
fc8048c
update AssetTransferApi establishDirection unit test for system to sy…
marshacb Jul 6, 2023
c452575
update checkIsValidSystemChainAssetId to accept xcm direction
marshacb Jul 6, 2023
4cd1a9b
add tests for getChainidBySpecName
marshacb Jul 6, 2023
08b3622
merge main
marshacb Jul 6, 2023
4c11e79
lint
marshacb Jul 6, 2023
90a0c64
update docs
marshacb Jul 6, 2023
234b973
removed destAddr AccountId20 for SystemToSytem
marshacb Jul 6, 2023
cfc3a67
abstract isSystemToSystemReserveTransfer conditional
marshacb Jul 6, 2023
71d26cc
add asset hub names to SYSTEM PARACHAIN NAMES
marshacb Jul 6, 2023
d3504a7
update createPayload to get address for both local and XCM transactions
marshacb Jul 6, 2023
4752a80
remove unecessary fields from submittable data interface
marshacb Jul 6, 2023
9d2fc2f
add AssetsPalletType
marshacb Jul 6, 2023
c48b860
Merge branch 'cameron-implement-system-to-system' into cameron-foreig…
marshacb Jul 6, 2023
787ed53
add transferForeignAssets option
marshacb Jul 7, 2023
76564f2
add tests for foreignAssets transfer and trasnferKeepAlive
marshacb Jul 10, 2023
75816d1
add transferForeignAssets option
marshacb Jul 13, 2023
40e7b4e
merge main
marshacb Jul 13, 2023
fda84bd
remove comments
marshacb Jul 13, 2023
5f33bf4
add AssetCallType
marshacb Jul 14, 2023
a232098
remove test call index code
marshacb Jul 14, 2023
0676ca8
lint
marshacb Jul 14, 2023
a21f260
remove comment
marshacb Jul 14, 2023
a2ad502
update error messages
marshacb Jul 14, 2023
7fc62aa
add system to system foreign assets examples
marshacb Jul 14, 2023
94c27e1
update example file name
marshacb Jul 14, 2023
cd20564
lint
marshacb Jul 17, 2023
3dde817
update multiassets sort to compare multilocation interiors
marshacb Jul 18, 2023
b132bac
update sorting tests
marshacb Jul 19, 2023
73fd782
updated multiasset sort to reflect standard ordering for multiassets
marshacb Jul 20, 2023
5c7dbcd
update paratosystem to check if asset being sent is native to the origin
marshacb Jul 20, 2023
7110561
add support for foreign assets to getFeeAssetItemIndex
marshacb Jul 21, 2023
850a0a0
remove log
marshacb Jul 21, 2023
3066aaf
update example
marshacb Jul 21, 2023
0642431
uncomment test
marshacb Jul 21, 2023
9c1a20c
update checkIsForeignAssetTransfer
marshacb Jul 21, 2023
e3b091a
added test cases for duplicate symbol, integer, empty string and mult…
marshacb Jul 27, 2023
7a4cede
assign MAX_ASSETS_FOR_TRANSFER as const
marshacb Jul 27, 2023
9a50ff9
update dupes to account for casing
marshacb Jul 27, 2023
b821767
lint
marshacb Jul 27, 2023
f26a518
update SystemToSystem fetchCallType comment
marshacb Jul 27, 2023
7c6bea2
remove para to system foreign asset reserve transfer assets example
marshacb Jul 27, 2023
1fe7f94
update foreign asset multilocation to include parachain and or pallet…
marshacb Jul 28, 2023
86676bb
move constructForeignAssetMultiLocationFromAssetId to utils
marshacb Jul 28, 2023
2c1b44d
update checkAssetIdsAreOfSameAssetIdType's error message
marshacb Jul 28, 2023
7b4b90c
update expected err message
marshacb Jul 28, 2023
036397a
update asset-transfer-api-registry
marshacb Aug 2, 2023
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
8 changes: 4 additions & 4 deletions docs/classes/AssetsTransferApi.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">AssetsTransferApi</span></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/4c11e79/src/AssetsTransferApi.ts#L63">AssetsTransferApi.ts:63</a></li></ul></aside>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/b132bac/src/AssetsTransferApi.ts#L68">AssetsTransferApi.ts:68</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand Down Expand Up @@ -83,7 +83,7 @@ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/TxResult.html" class="tsd-signature-type tsd-kind-interface">TxResult</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span></h4>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/4c11e79/src/AssetsTransferApi.ts#L93">AssetsTransferApi.ts:93</a></li></ul></aside></li></ul></section>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/b132bac/src/AssetsTransferApi.ts#L98">AssetsTransferApi.ts:98</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member"><a id="decodeExtrinsic" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>decode<wbr/>Extrinsic</span><a href="#decodeExtrinsic" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<ul class="tsd-signatures">
Expand Down Expand Up @@ -112,7 +112,7 @@ <h5><span class="tsd-kind-parameter">format</span>: <span class="tsd-signature-t
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/4c11e79/src/AssetsTransferApi.ts#L503">AssetsTransferApi.ts:503</a></li></ul></aside></li></ul></section>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/b132bac/src/AssetsTransferApi.ts#L665">AssetsTransferApi.ts:665</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member"><a id="fetchFeeInfo" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>fetch<wbr/>Fee<wbr/>Info</span><a href="#fetchFeeInfo" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<ul class="tsd-signatures">
Expand Down Expand Up @@ -141,7 +141,7 @@ <h5><span class="tsd-kind-parameter">format</span>: <span class="tsd-signature-t
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">RuntimeDispatchInfo</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">RuntimeDispatchInfoV1</span><span class="tsd-signature-symbol">&gt;</span></h4>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/4c11e79/src/AssetsTransferApi.ts#L314">AssetsTransferApi.ts:314</a></li></ul></aside></li></ul></section></section></div>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/b132bac/src/AssetsTransferApi.ts#L365">AssetsTransferApi.ts:365</a></li></ul></aside></li></ul></section></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand Down
18 changes: 9 additions & 9 deletions docs/enums/Direction.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h1>Enumeration Direction</h1></div>
</div>
<div class="tsd-comment tsd-typography"></div></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/4c11e79/src/types.ts#L29">types.ts:29</a></li></ul></aside>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/b132bac/src/types.ts#L32">types.ts:32</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand All @@ -46,63 +46,63 @@ <h3 class="tsd-anchor-link"><span>Para<wbr/>To<wbr/>Para</span><a href="#ParaToP
</div>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/4c11e79/src/types.ts#L45">types.ts:45</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/b132bac/src/types.ts#L48">types.ts:48</a></li></ul></aside></section>
<section class="tsd-panel tsd-member"><a id="ParaToRelay" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>Para<wbr/>To<wbr/>Relay</span><a href="#ParaToRelay" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-enum-member">Para<wbr/>To<wbr/>Relay</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;ParaToRelay&quot;</span></div>
<div class="tsd-comment tsd-typography"><p>Parachain to Relay chain.</p>
</div>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/4c11e79/src/types.ts#L49">types.ts:49</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/b132bac/src/types.ts#L52">types.ts:52</a></li></ul></aside></section>
<section class="tsd-panel tsd-member"><a id="ParaToSystem" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>Para<wbr/>To<wbr/>System</span><a href="#ParaToSystem" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-enum-member">Para<wbr/>To<wbr/>System</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;ParaToSystem&quot;</span></div>
<div class="tsd-comment tsd-typography"><p>Parachain to System parachain.</p>
</div>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/4c11e79/src/types.ts#L53">types.ts:53</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/b132bac/src/types.ts#L56">types.ts:56</a></li></ul></aside></section>
<section class="tsd-panel tsd-member"><a id="RelayToPara" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>Relay<wbr/>To<wbr/>Para</span><a href="#RelayToPara" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-enum-member">Relay<wbr/>To<wbr/>Para</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;RelayToPara&quot;</span></div>
<div class="tsd-comment tsd-typography"><p>Relay chain to Parachain.</p>
</div>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/4c11e79/src/types.ts#L61">types.ts:61</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/b132bac/src/types.ts#L64">types.ts:64</a></li></ul></aside></section>
<section class="tsd-panel tsd-member"><a id="RelayToSystem" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>Relay<wbr/>To<wbr/>System</span><a href="#RelayToSystem" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-enum-member">Relay<wbr/>To<wbr/>System</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;RelayToSystem&quot;</span></div>
<div class="tsd-comment tsd-typography"><p>Relay to System Parachain.</p>
</div>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/4c11e79/src/types.ts#L57">types.ts:57</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/b132bac/src/types.ts#L60">types.ts:60</a></li></ul></aside></section>
<section class="tsd-panel tsd-member"><a id="SystemToPara" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>System<wbr/>To<wbr/>Para</span><a href="#SystemToPara" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-enum-member">System<wbr/>To<wbr/>Para</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;SystemToPara&quot;</span></div>
<div class="tsd-comment tsd-typography"><p>System parachain to Parachain.</p>
</div>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/4c11e79/src/types.ts#L33">types.ts:33</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/b132bac/src/types.ts#L36">types.ts:36</a></li></ul></aside></section>
<section class="tsd-panel tsd-member"><a id="SystemToRelay" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>System<wbr/>To<wbr/>Relay</span><a href="#SystemToRelay" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-enum-member">System<wbr/>To<wbr/>Relay</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;SystemToRelay&quot;</span></div>
<div class="tsd-comment tsd-typography"><p>System parachain to Relay chain.</p>
</div>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/4c11e79/src/types.ts#L37">types.ts:37</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/b132bac/src/types.ts#L40">types.ts:40</a></li></ul></aside></section>
<section class="tsd-panel tsd-member"><a id="SystemToSystem" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>System<wbr/>To<wbr/>System</span><a href="#SystemToSystem" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-enum-member">System<wbr/>To<wbr/>System</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;SystemToSystem&quot;</span></div>
<div class="tsd-comment tsd-typography"><p>System parachain to System parachain chain.</p>
</div>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/4c11e79/src/types.ts#L41">types.ts:41</a></li></ul></aside></section></section></div>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/b132bac/src/types.ts#L44">types.ts:44</a></li></ul></aside></section></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand Down
2 changes: 1 addition & 1 deletion docs/functions/constructApiPromise.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h5><span class="tsd-kind-parameter">opts</span>: <span class="tsd-signature-typ
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/ApiInfo.html" class="tsd-signature-type tsd-kind-interface">ApiInfo</a><span class="tsd-signature-symbol">&gt;</span></h4>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/4c11e79/src/constructApiPromise.ts#L24">constructApiPromise.ts:24</a></li></ul></aside></li></ul></section></div>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/b132bac/src/constructApiPromise.ts#L24">constructApiPromise.ts:24</a></li></ul></aside></li></ul></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/ApiInfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">ApiInfo</span></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/4c11e79/src/constructApiPromise.ts#L12">constructApiPromise.ts:12</a></li></ul></aside></div>
<li>Defined in <a href="https://github.com/paritytech/asset-transfer-api/blob/b132bac/src/constructApiPromise.ts#L12">constructApiPromise.ts:12</a></li></ul></aside></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand Down
Loading