Simple Shifts Between Two ERC20 Assets on Substrate via Moonbeam
As we announced today, Offshift is expanding our ecosystem onto Substrate via Moonbeam.
Moonbeam is an Ethereum-compatible smart contract platform on the Polkadot network that allows developers to deploy existing Solidity smart contracts and DApp frontends to Substrate with minimal changes.
To perform a shift on Moonbeam’s TestNet, Moonbase Alpha, we’ll be using MetaMask, so once you have the MetaMask browser extension installed, you’re ready to begin.
1 If you’re already a MetaMask user, we highly recommend creating a new wallet to use on testnet before you proceed, to avoid any potential confusion or unintended transfers.
2 First you’ll need to configure MetaMask to connect to Moonbase Alpha TestNet. Click on your wallet’s identicon in the top right, then click “Settings.”
Navigate to the “Networks” tab, then click “Add Network.”
Configure MetaMask for the following network:
- Network Name:
- New RPC URL:
- Symbol (Optional):
Click save, then proceed to step three.
3 To interact with Moonbase Alpha you’ll need Moonbeam’s native test asset, DEV. You can request DEV in the Moonbeam Discord in the #alphanet-bot channel by posting your MetaMask address in the format you’ll see there [!faucet send 0x…].
4 We’ll be interacting with Offshift’s two test assets, xftTM and zkA, which are ERC-20 tokens deployed on Substrate via Moonbeam. You’ll need to add these to MetaMask by selecting “Add Token,” circled in the image below.
Then click “Custom Token.”
And copy/paste the xftTM address below into the “Token Contract Address” field.
The “Token Symbol” and “Decimals of Precision” fields will auto-fill once you paste the contract address, then you’ll click “Next,” and “Add Token.”
Repeat and also add zkA with the contract address below —
xftTEST-Asset-Moonbeam (xftTM): 0x80e3c6De3027A421847df5333a82381aB99EE644
zkTEST-AssetB (zkB): 0xdF8876bb6C187992Fbc1d5B0A99e8382F62571aE
5 Request some xftTM tokens from our Moonbeam TestNet Token Faucet by clicking the “XFTTM (TESTNET-MOONBEAM) FAUCET” button.
Then “Confirm” in MetaMask.
6 When you’ve finished the steps above, you should have DEV and xftTM balances in your wallet, and you should have zkA listed with a balance of zero, like in the image below.
If you do, you’re ready to shift on Moonbeam!
7 Navigate to our Moonbeam Shifting Dashboard.
8Enter the number of tokens you want to shift, then click “Approve.”
9 MetaMask will pop up and ask if you want to “Allow https://offshift.io to spend your xftTM?”
10 Once the transaction to approve the xftTM spend has been confirmed (you can check the transaction status by clicking on the “Activity” tab in MetaMask), you’re ready to shift.
Click “Shift” on the dashboard.
11 MetaMask will pop up again and ask you to approve the transaction. Click “Confirm.”
12 You’ve shifted! Your xftTM will be burned and an equivalent value in zkA will be minted.
In the example above we shifted 5 xftTM to zkA.
Our wallet now shows 5 fewer xftTM, and a balance of 5 zkA.
Thanks for taking the time to try shifting on Moonbase Alpha! If you have any questions about Offshift, feel free to come by the Offshift Telegram and ask. If you have questions about Moonbeam or want to follow their progress join the Moonbeam Discord as well!
Offshift is a cryptographically private offshore storage & DeFi protocol on Ethereum and Polkadot. It’s the first dual-sided public/private protocol to be built entirely on a permissionless chain. It gives users the ability to convert a native ERC-20 token (XFT) into private zkAssets that are pegged to a variety of digital and real-world assets.
zkAssets provide stable-value private storage, can be staked to earn zkAsset rewards, used as a peer-to-peer private currency, and used in eCommerce and point-of-sale. Learn more by visiting the links below.