-
安装 go – https://go.dev
-
使用 miner 克隆存储库
git clone https://github.com/8finity-xyz/miner-cpu.git
- 安装依赖项并构建程序
go build
- 创建 .env 文件并填充值(您可以使用示例
cp .env.example .env
)
使用公有节点或设置私有节点
# example of .env
INFINITY_RPC=https://rpc.soniclabs.com
INFINITY_WS=wss://rpc.soniclabs.com
# Private key without 0x (64 symbols). It should have some $S for transactions
INFINITY_PRIVATE_KEY=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
- 运行矿工
./miner