---
# System prepended metadata

title: How to use DotSwap without a UI

---

# How to use DotSwap without a UI

The hex you can dump into https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9910#/extrinsics/decode and then click 'Submission' to edit if your running westmint up locally using zombinet.

1. Creat asset with id 1
Going old fashioned with polkadot.js and westmint running locally.

0x32000400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d01000000000000000000000000000000

![](https://i.imgur.com/WPPOtju.png)


2. Mint asset id 1:

0x32060400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d070010a5d4e8

amount is 1000000000000

![](https://i.imgur.com/vxIK920.png)

3. Create pool DOT-1 (native to a local asset):

50 is statemine/t's Local Assets instance pallet index.
General Index is where we put the asset id.

0x37000000000204320504

![](https://i.imgur.com/ND3IFNv.png)


https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9910#/chainstate

We can see the pool state by selecting `assetConversion` in storage and then click off the `include option` to return all pools.

Should see this:
```json
assetConversion.pools: Option<PalletAssetConversionPoolInfo>

[
  [
    [
      [
        {
          parents: 0
          interior: Here
        }
        {
          parents: 0
          interior: {
            X2: [
              {
                PalletInstance: 50
              }
              {
                GeneralIndex: 1
              }
            ]
          }
        }
      ]
    ]
    {
      lpToken: 0
    }
  ]
]
```

4. Add the liquidity into the pool:

0x37010000000204320504e8030000000000000000000000000000e80300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d

![](https://i.imgur.com/1vbJiYt.png)

We ought to be able to see the reserves if we look at the runtime calls or here we do an RPC `state` `call` with `AssetConversionApi_get_reserves`:

0x0000 000204320504 should be the encoded dot and asset 1 multilocations

![](https://i.imgur.com/551vDhw.png)


5. Swap tokens

0x37030800000002043205040a00000000000000000000000000000001000000000000000000000000000000d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d01

![](https://i.imgur.com/mje58X6.png)

Done