Skip to main content

Example: ERC20-Compatible Lyquid

Prerequisites

Make sure you have started the local devnet.

Deployment

shaker deploy ~/.shakenup/ldk/lyquid-examples/erc20/Cargo.toml

This command will give you something like

created Lyquid-Adm8r3j64FbzRjwcBK4ZZRFcgLQjTqtt => 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512

The latter address (e.g., 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512) is the token address that you need to use in Metamask.

Metamask Setup

  1. Setup your Metamask wallet with the following mnenomics:
test test test test test test test test test test test junk
  1. Add Lyquor network to Metamask: http://localhost:10087/api. The chain ID is 31337, the devnet info is identical to Anvil/Hardhat's local devnet. You can use any name for the native token as it's a devnet.

  2. Add the token to your Metamask using the address from the previous step.

Now you should be able to send/receive LYQ token that is entirely implemented by ~/.shakenup/ldk/lyquid-examples/erc20/src/lib.rs and run by our Lyquor VM.