Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
themacexpert committed May 2, 2024
1 parent e2bf0e3 commit 152c6dd
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<div id="termynal" data-termynal>
<span data-ty="input"><span class="file-path"></span>yarn calculate-multilocation-derivative-account \</span>
<span data-ty>--ws-provider wss://wss.api.moonbase.moonbeam.network \</span>
<span data-ty>--address 5GQtq2cSDLeN77T2Bs4jxV7yUQh841tWy6wtJoSUrFZAm5qS \</span>
<br>
<span data-ty>yarn run v1.22.10</span>
<span data-ty>warning ../../../package.json: No license field</span>
<span data-ty>$ ts-node 'scripts/calculate-multilocation-derivative-account.ts' --ws-provider wss://wss.api.moonbase.moonbeam.network --address 5GQtq2cSDLeN77T2Bs4jxV7yUQh841tWy6wtJoSUrFZAm5qS --parents 1</span>
<!-- You can continue here with the output of the script, which might look something like this: -->
<span data-ty>--parents 1</span>
<br>
<span data-ty>Remote Origin calculated as ParentChain</span>
<span data-ty>Parents 1</span>
<span data-ty>AccountId32: 5CPE8WuahbikCSobyxeEMYzdjz7QhXxEGeeQ2LpS2RB9ZEXJ</span>
<span data-ty>32 byte address is 0x3630dd0d236be6105c9f54d9d89183f9066e4a03ddc5eea1db922ef94cae2414</span>
<span data-ty>20 byte address is 0x3630dd0d236be6105c9f54d9d89183f9066e4a03</span>
<span data-ty>✨ Done in 1.02s.</span>
<span data-ty="input"><span class="file-path"></span></span>
</div>
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions tutorials/interoperability/remote-staking-xcm.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ For development purposes this tutorial is written for Moonbase Alpha and Moonbas

Here, we have specified a parents value of `1` because the relay chain is the origin of the request (and the relay chain is considered a parent to the Moonbase alpha parachain). The relay chain does not have a parachain id so that field is omitted.

![Calculate Multi-Location Derivative Account](/images/tutorials/interoperability/remote-staking-via-xcm/xcm-stake-1.webp)
--8<-- 'code/tutorials/interoperability/remote-staking/terminal/calculate.md'

The script will return 32-byte and 20-byte addresses. We’re interested in the Ethereum-style account - the 20-byte one. Feel free to look up your Computed Origin account on [Moonscan](https://moonbase.moonscan.io/){target=\_blank}. You’ll note that this account is empty. You’ll now need to fund this account with at least 1.1 DEV which you can get from [the faucet](https://faucet.moonbeam.network/){target=\_blank}. And if you need more, you can always reach out to us on [Discord](https://discord.com/invite/amTRXQ9ZpW){target=\_blank} for additional DEV tokens.

## Preparing to Stake on Moonbase Alpha {: #preparing-to-stake-on-moonbase-alpha }

First and foremost, you’ll need the address of the collator you want to delegate to. To locate it, head to the [Moonbase Alpha Staking dApp](https://apps.moonbeam.network/moonbase-alpha/staking){target=\_blank} in a second window. Ensure you’re on the correct network, then press **Select a Collator**. Press the icon next to your desired collator to copy its address. You’ll also need to make a note of the number of delegations your collator has. The [Moonbeam Foundation 01 collator](https://moonbase.subscan.io/account/{{networks.moonbase.precompiles.staking}}){target=\_blank} shown below has `7` delegations at the time of writing.

![Moonbeam Network Apps Dashboard](/images/tutorials/interoperability/remote-staking-via-xcm/xcm-stake-2.webp)
![Moonbeam Network Apps Dashboard](/images/tutorials/interoperability/remote-staking-via-xcm/xcm-stake-1.webp)

## Remote Staking via XCM with the Polkadot.js API {: #remote-staking-via-xcm-with-the-polkadot-api }

Expand Down

0 comments on commit 152c6dd

Please sign in to comment.