【go-filecoin】V0.1.4 发布 / 命令更新

本文内容已过期,最新请移步 https://blog.csdn.net/weixin_43668031/article/details/106138180
go

1.查看钱包/余额

查看默认钱包 go-filecoin address default
查看钱包列表 go-filecoin address ls
在这里插入图片描述

查看余额 go-filecoin wallet balance t1tpd7mzujaumbuckibsqszx5kv44lh7gxscyiwaq
查看余额 go-filecoin wallet balance $(go-filecoin address default)
在这里插入图片描述

导出密钥 go-filecoin wallet export $(go-filecoin address default) --enc=json >> key
导入密钥 go-filecoin wallet import key

在这里插入图片描述
这里被你们知道密钥也没关系,反正是测试网络,哈哈,到了正式网络后,请一定要保存好这密钥,这可是支付密码。

2.矿工提供空间

创建抵押区 go-filecoin miner create 200 800 --gas-price=0 --gas-limit=1000 --peerid $(go-filecoin id | jq -r '.ID')
创建定价go-filecoin miner set-price --from=$(go-filecoin address default) --miner=t2a42kampeon6nxdg263hnu3oocvn4mvg5644bpkq --gas-price=0 --gas-limit=1000 0.0000000001 86400
开启挖矿 go-filecoin mining start

3.用户储存数据

上传文件 go-filecoin client import file.mp4
储存到filecoin go-filecoin client propose-storage-deal t2lhkobdsduq2garvytgdwko2tkzi5s3eujwhnvwy $cid 000 72000

提供一个把文件夹里的内容上传上去的脚本

#!/bin/bash
s=/media/vod/720P/
for pa in $(ls $s);do
	echo $pa |tee -a log
	cid=`go-filecoin client import $s$pa`
	echo $cid |tee -a log
	msg=`go-filecoin client propose-storage-deal t2lhkobdsduq2garvytgdwko2tkzi5s3eujwhnvwy $cid 000 72000`
	echo $msg|grep DealID |tee -a log 
done

4.初始化

初始化文件夹 go-filecoin init --devnet-user --genesisfile=https://genesis.user.kittyhawk.wtf/genesis.car
启动进程 nohup go-filecoin >>filecoin.log&
设置昵称 go-filecoin config heartbeat.nickname "BillImba"
设置心跳 go-filecoin config heartbeat.beatTarget "/dns4/stats-infra.kittyhawk.wtf/tcp/8080/ipfs/QmUWmZnpZb6xFryNDeNU7KcJ1Af5oHy7fB9npU67sseEjR"

5.测试脚本(刷单)

…待续

原创文章 29 获赞 21 访问量 1万+

猜你喜欢

转载自blog.csdn.net/weixin_43668031/article/details/88904940