Dusty Lockdrop: How-to claim

Aleksandr Krupenkin
Astar Network
Published in
3 min readApr 19, 2020

The Dusty genesis token distribution is same as the Plasm Mainnet

Photo by Felix Hanspach on Unsplash

Before continuing with this article, please read Dusty Network announcement the first for context.

Great, now let’s get back to the fun part!

In this article, I will explain the step-by-step guide on how to transfer genesis PLDs to your UI account using Ethereum private key and the subkey utility.

Install subkey

Private key manipulation utility is supplied in Plasm repository. It could be installed from binaries or with the following command:

$ cargo install --force --git https://github.com/staketechnologies/Plasm --tag v0.8.0 subkey

Once you have finished installing the subkey utility, let’s try using it. For this article, we’re mainly interested in the transfer command, which has the following options.

$ subkey transfer --help
subkey-transfer
Author and sign a Node pallet_balances::Transfer transaction with a given (secret) key
USAGE:
subkey transfer <from> <to> <amount> <index> --genesis [genesis]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-g, --genesis [genesis] The genesis hash or a recognised chain identifier (dusty).
ARGS:
<from> The signing secret key URI.
<to> The destination account public key URI.
<amount> The number of units to transfer.
<index> The signing account's transaction index.

Create extrinsic

By using the transfer command, it is possible to create RAW Extrinsics from a valid Ethereum account, which can be used for node RPC or the UI. The main benefit of this is that we can create extrinsics offline without having to provide our private key to the Plasm UI or any other nodes.

You can do this with the following command.

$ subkey -k transfer 0x2F9C34E12950FC8EC9F73EBC9337CBC6EA29556EB462E8AD30B981784B9F907E WTMJByGbm2pspg3WdsgihyafozjZjriaCYTZuAmhzTnGvax 42000000000000000 0

Before we go to the results, please allow me to dissect this long string of command.

The first hex that looks like this: 0x2F9...907E which is the lockdrop Ethereum private key.

The next line that looks like WTM...axis the destination Plasm Network account (chain prefix is 5).

42000000000000000 is the value of tokens (1 PLD = 10¹⁵, it’s mean this is 42 PLD), this value should be followed by a 0 to show that this is the first transaction.

If you copy and paste the long command, you should get the following results printed in your terminal.

Using a genesis hash of 5bde5ea1f236802c5711abd3b0ca9fc748d654b2c1055290fdf7bf2b4f282428
0x310284ffe28153d70c05ebce1758dfd58356b05ff6bcb90fae903e27b00baa9bdfb9fd2f0210c5ecce7198b3adf13dece166a277890c189c05e5e061240cfacd8b9e2e9b497be46283d20ae801c784e1ec962a64644508b5e492c4bdb1932f202bbdbb63db010000000300ff16eb796bee0c857db3d646ee7070252707aec0c7d82b2eda856632f6a2306a58a10f

You’ll notice that the first line of hash is familiar from what we have seen before. It’s the genesis hash! But the important part is the second line, which is the hex-encoded raw extrinsic. We’ll be needing this in a short while so please copy this.

Send extrinsic

To make things easy, please use the official UI Toolbox provided by Stake Technologies.

The link above should redirect you directly to the toolbox page shown in the following image.

Sending raw extrinsic from UI.

Now we just copy the hex string to the extrinsic field and push the Submit RPC call button. The transfer transaction will be sent immediately. You can check the results from the account balances page.

Conclusion

Being able to support multiple cryptographic primitives is one of the most powerful aspects of the Substrate framework and we are happy to use it in Plasm Network.

With this, we have finished the guide on how to use an Ethereum account in Substrate-based chains without a need for a trusted third-party or any additional modules.

Good luck and never forget to have fun!

If you have any questions, please feel free to ask us in Discord!

--

--