shardeum交互教程

作者twitter账号: https://twitter.com/web3zk 关注我,获取更多空投信息

shardeum是一个支持EVM的L1公链,融资金额为1820万美金。币的总量是5.08亿,其中5%用于回馈社区和空投。

一、 在小狐狸钱包中添加测试网

打开https://chainlist.org/?testnets=true&search=Shardeum ,会有三个测试网

post image
  1. Shardeum Liberty 1.X

  2. Shardeum Liberty 2.X

  3. Shardeum Sphinx 1.X

将这三个测试网添加到metamask(小狐狸钱包)中。这三个测试网都可以用来做交互。

二、 领取测试币

分别点击以下链接进入对应频道,输入 /faucet 地址 来领取测试币

https://discord.com/channels/933959587462254612/1070780355931541514

https://discord.com/channels/933959587462254612/1031497272191627284

领水到账比较慢,测试币到账可能需要几个小时。

三、跑测试网节点

购买vps,这里推荐vultrDigitalOcean, 通过本文的链接点击注册,vultr充值35美金可以获得100美金的赠送金额;Digital Ocean充值25美金可以获得200美金的赠送金额。

然后开通服务器,推荐配置是8核16G,磁盘用250GB以上的ssd。系统选择ubuntu22

官方跑节点的教程,https://docs.shardeum.org/node/run/validator

sudo apt-get install curl
sudo apt update
#安装docker和docker compose
sudo apt install docker.io -y
docker --version
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
# 安装shardeum
curl -O https://gitlab.com/shardeum/validator/dashboard/-/raw/main/installer.sh && chmod +x installer.sh && ./installer.sh

安装shardeum的过程中,有几个选项

#选择y即可,输入y后直接回车
By running this installer, you agree to allow the Shardeum team to collect this data. (y/n)?: y
#是否运行gui界面,这里选择y然后回车
Do you want to run the web based Dashboard? (y/n): y
# webgui密码,设置一个复杂的密码
Set the password to access the Dashboard:
#由于vultr和digital ocean 的端口默认都是开放的,因此下面的端口提示可以直接回车(选择默认选项
Enter the port (1025-65536) to access the web based Dashboard (default 8080):

This allows p2p communication between nodes. Enter the first port (1025-65536) for p2p communication (default 9001):

Enter the second port (1025-65536) for p2p communication (default 10001):

质押测试币,正式运行节点

cd ~/.shardeum
./shell.sh
#重启节点
operator-cli stop
operator-cli start
#查看节点状态
operator-cli status
#在环境变量中添加私钥
export PRIV_KEY=<private_key>
#质押10个币,这一步非常容易失败,如果失败了,就多尝试几次
operator-cli stake 10
#通过私钥对应的地址来查看质押是否成功,如果质押成功,会看到控制台输出:stake: '10.0'
operator-cli stake_info 地址

四、交互任务,这时候要把小狐狸的测试网切换到 Shardeum Liberty 2.X

  1. https://app.swapped.finance/en/swap ,执行swap和添加流动性

post image

首先是点击右上角的 Connect to a wallet

然后在swap中执行交易,可以选择 SHM→USDC , SHM→SWPD

点击pool,在下拉菜单中选择达到,然后添加流动性,如SHM→USDC , SHM→SWPD两个交易对添加流动性