Asset Hub Asset Transfers on EWX (Polkadot.JS)
This section provides step-by-step instructions for transferring assets from Polkadot Asset Hub (PAH) to Energy Web X (EWX), transferring assets and viewing balances within EWX, and transferring assets back to PAH.
The steps are demonstrated using Polkadot Asset Hub native USDC, although any other supported asset could be used. Ensure the asset is supported on EWX before transferring.
Prerequisites
Ensure you have sufficient $DOT on your Polkadot Asset Hub account and $EWT on your EWX account to cover transfers and transaction fees.
Ensure you have installed Polkadot.js browser extension, or are using SubWallet / Nova Wallet / Ledger connected to Polkadot.js explorer.
Find Supported Assets on EWX
The first step is to ensure the asset you wish to transfer is supported on EWX.
Open Polkadot.js Apps connected to EWX
Open Polkadot JS App and navigate to EWX, or click here to open the URL with the public EWX endpoint.
Go to Network → Assets
Take note of the supported assets.
In this example, USDC is displayed as a supported non-native asset.
Take note of the assets' MultiLocation metadata:
{"parents":1,"interior":{"x3":[{"parachain":1000},{"palletInstance":50},{"generalIndex":1337}]}}

Transfer Asset from PAH to EWX
Users can transfer assets from Polkadot Asset Hub to EWX via an XCM transfer.
You can find details about the assets you wish to transfer on Polkadot Asset Hub.
Asset Metadata Lookup:
Open Polkadot.js Apps connected to Polkadot Asset Hub
Go to Developer → Chainstate
state query: assets → metadata(u32)
u32: → 1337
(USDC is 1337)
Click the "+" Icon
Take note of the metadata such as name, symbol and decimals.
Before setting up the transfer extrinsic, find the Hex Public Key of the recipient account's Substrate address on the destination network, in this case EWX.
You can achieve this by copying the substrate account address, and then following the steps below.
Hex Public Key Address Conversion:
Go to Developer → Utilities → Convert Address
Paste the address in address to convert field
Copy the Hex Public Key (starts with 0x)

Now you can set up the extrinsic to transfer the asset via XCM to EWX.
Transfer asset to EWX via XCM:
Open Polkadot.js Apps connected to Polkadot Asset Hub
Go to Developer → Extrinsics
Select the desired account from which to transfer the asset.
Select extrinsic →
polkadotXcm→reserveTransferAssets(dest,beneficiary,assets,feeAssetitem)Input the MultiLocation metadata for USDC:
dest: XcmVersionedLocation→V3parents:1Interior: X1Parachain3345(EWX parachain Id)
beneficiary: XcmVersionLocated→V3parents:0Interior: X1AccountId32id:Enter the Hex public key
assets: XcmVersionedAssets→V3id: XcmV3MultiassetAssetId→Concreteparents:0Interior: X2PalletInstance50
GeneralIndex1337
fun:FunglibleEnter amount to transfer, recall the decimal places of the asset, for USDC it is 6
To transfer 20 USDC, input 20,000,000
Sign and Submit the extrinsic.

You can find confirmation of the asset arriving to EWX in recent events.
Verify XCM on EWX:
Open Polkadot.js Apps connected to EWX
Go to Network → Explorer
In recent events, you should see assets.Issued event.
Expand the event to see metadata of the asset issuance, note the amount received will be the amount sent minus the transaction fee.
For USDC XCM transactions this is 0.01 USDC, hence the account received 19.99 USDC (19,900,000) of the initial 20.00 USDC transferred.

Transfer Asset within EWX
Open Polkadot.js Apps connected to Polkadot Asset Hub
Go to Developer → Extrinsics
Select the account you wish to transfer from
Submit the following extrinsic: assets → transfer(id, target, amount)
Input the MultiLocation metadata of the asset.
In the case of USDC, this would be:
parents:1Interior: X3Parachain1000
PalletInstance50
GeneralIndex1337
Target: MultiAddress IdAccountId:enter the Substrate address of the recipient
Amount:enter the amount you wish to send, recall the decimals of USDC is 6.
Sign and Submit.

You can confirm the transaction by searching Network → Explorer, recent events, assets.Transferred.
Viewing Asset Balances on EWX
Open Polkadot.js Apps connected to Polkadot Asset Hub
Go to Developer → Chainstate
select state query: assets → account(XcmV3MultiLocation, AccountId32)
Input the MultiLocation metadata of the asset.
In the case of USDC, this would be:
parents:1Interior: X3Parachain1000
PalletInstance50
GeneralIndex1337
Toggle "include option" off to query all accounts with a non-zero balance of this asset, or toggle on to input a specific address.
Click "+" Icon.

In this example it returned the following:
Where 19,990,000 is the 19.99 USDC is the recipient account of the original 20.00 USDC XCM transfer from Polkadot Asset Hub. The account with 10,000 is the collator who received the 0.01 USDC transaction fee. The account with 990,000 is Bob whom was transferred 1.00 USDC, minus the fee, now has 0.99 USDC.
Transfer Assets from EWX to PAH
Users can transfer assets from EWX to Polkadot Asset Hub via an XCM transfer.
Before setting up the transfer extrinsic, find the Hex Public Key of the recipient account's Substrate address.
You can achieve this by copying the substrate account address, and then following the steps below.
Hex Public Key Address Conversion:
Go to Developer → Utilities → Convert Address
Paste the address in address to convert field
Copy the Hex Public Key (starts with 0x)
Transfer asset to PAH via XCM:
Open Polkadot.js Apps connected to EWX
Go to Developer → Extrinsics
Note: there is a shortcut where you can paste the following calldata into Developer → Extrinsics → Decode:
0x1f0203010100a10f0300010100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d030400010300a10f043205e51400821a060000000000Then back to Submission tab to edit the fields, this will populate the metadata and allow you to change the sender, recipient and amount.
Select the desired account from which to transfer the asset.
Select extrinsic →
polkadotXcm→reserveTransferAssets(dest,beneficiary,assets,feeAssetitem)Input the MultiLocation metadata for USDC:
dest: XcmVersionedLocation→V3parents:1Interior: X1Parachain1000(Polkadot Asset Hub's parachain Id)
beneficiary: XcmVersionLocated→V3parents:0Interior: X1AccountId32id:Enter the Hex public key
assets: XcmVersionedAssets→V3id: XcmV3MultiassetAssetId→Concreteparents:1Interior: X3Parachain1000
PalletInstance50
GeneralIndex1337
fun:FunglibleEnter amount to transfer, recall the decimal places of the asset, for USDC it is 6
To transfer 20 USDC, input 20,000,000
Sign and Submit the extrinsic.
Last updated