前置环节
首先解决ubuntu科学上网问题,这里用的clash,随便搜一下都有
sudo apt install curl snap的不行
sh -c "$(curl -sSfL https://release.solana.com/stable/install)"安装solana CLI
成功时显示
Close and reopen your terminal to apply the PATH changes or run the following in your existing shell:重启终端并导入到PATH
~ % solana --version
设置网络环境
这里我们使用开发网,开发网可以申请空投测试币。
solana config set --url https://api.devnet.solana.com
生成钱包
solana-keygen new --force生成钱包,并输入密码
生成密钥对,及私钥存放位置对应公钥为:ARvTctv247Jc4EkR9XVi3fLz8pfjg2Ar2B8H9sthJWgE