Skip to content

Commit 76a654d

Browse files
author
Jason
committed
去除reth项目相关代码
1 parent 946c019 commit 76a654d

File tree

7 files changed

+10
-42
lines changed

7 files changed

+10
-42
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ evm生态铭文脚本
1111
![示例](/example.jpg)
1212

1313
# 功能
14-
1. 理论上目前支持所有evm生态相关公链的铭文mint,目前我只测试了`https://evm.ink/` 中的三条公链`ethereum、bnb、马蹄`,一次性mint千八百张没什么问题,只要你gas足够多
15-
2. 支持[reth](https://reth.cc/list) 的mint,貌似进度已经90%多,还剩不到1万张。这个需要cpu计算,然后才能mint,这整个过程我也整合了。
14+
1. 理论上目前支持所有evm生态相关公链的铭文mint,目前我测试了`https://evm.ink/` 中的三条公链`ethereum、bnb、马蹄`,包括AVAX也测试通过,一次性mint千八百张没什么问题,只要你gas足够多
1615

1716
# 编译
1817
需要有golang环境,`1.21.5`及以上的版本

app/app.go

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
package app
22

33
import (
4-
"encoding/hex"
54
"evm-inscriptions/utils/config"
6-
"evm-inscriptions/utils/log"
7-
"fmt"
85
"github.com/bitxx/ethutil"
9-
"github.com/ethereum/go-ethereum/common/hexutil"
10-
"github.com/ethereum/go-ethereum/crypto"
11-
"math/rand"
12-
"runtime"
13-
"strings"
14-
"time"
156
)
167

178
type App struct {
@@ -55,11 +46,11 @@ func (a *App) Mint(data string) (hash string, err error) {
5546

5647
// RethCalc
5748
//
58-
// @Description: reth计算难度结果
49+
// @Description: reth计算难度结果。这个是以前reth项目计算难度的方法,该项目已mint结束,注销此方法
5950
// @receiver a
6051
// @param difficulty
6152
// @return string
62-
func (a *App) RethCalc(difficulty string) string {
53+
/*func (a *App) RethCalc(difficulty string) string {
6354
6455
type Result struct {
6556
TotalTime int
@@ -101,4 +92,4 @@ func (a *App) RethCalc(difficulty string) string {
10192
return result
10293
}
10394
}
104-
}
95+
}*/

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ require (
66
github.com/bitxx/ethutil v1.1.2
77
github.com/bitxx/load-config v1.6.0
88
github.com/bitxx/logger v1.6.2
9-
github.com/ethereum/go-ethereum v1.10.22
109
github.com/shopspring/decimal v1.3.1
1110
)
1211

@@ -20,6 +19,7 @@ require (
2019
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce // indirect
2120
github.com/deckarep/golang-set v1.8.0 // indirect
2221
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
22+
github.com/ethereum/go-ethereum v1.10.22 // indirect
2323
github.com/fsnotify/fsnotify v1.7.0 // indirect
2424
github.com/go-ole/go-ole v1.2.1 // indirect
2525
github.com/go-stack/stack v1.8.0 // indirect

main.go

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,8 @@ import (
1010
)
1111

1212
const (
13-
//configPath = "settings.dev.yml" //测试专用
14-
configPath = "settings.yml" //正式专用
15-
)
16-
17-
const (
18-
EvmTypeReth = "reth"
13+
configPath = "settings.dev.yml" //测试专用
14+
//configPath = "settings.yml" //正式专用
1915
)
2016

2117
func init() {
@@ -73,12 +69,7 @@ func main() {
7369
}
7470
log.Infof("当前账户余额:%s", balance.DivRound(accuracyEth, 4))
7571

76-
data := config.MintConfig.Data
77-
if config.ChainConfig.ChainType == EvmTypeReth {
78-
data = evmApp.RethCalc(config.RethConfig.Difficulty)
79-
}
80-
81-
hash, er := evmApp.Mint(data)
72+
hash, er := evmApp.Mint(config.MintConfig.Data)
8273
err = er
8374
if err != nil {
8475
log.Errorf("第%d张mint异常,原因:%s", i, err)

settings.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
## *** 下方各项配置,确保输入配置格式正确,配置信息首尾注意不要留有空格等,当前版本暂不支持trimspace ***
22
application:
3+
# 项目名称,无需修改
34
name: evm-inscriptions
45
chain:
5-
# evm 通用evm的基本方式打mint,一般情况下,每个平台的mint都是支付手续费,data输入内容,即可mint
6-
# reth 算力计算,获取结果,然后再去mint,此时不需要配置下方mint中的data
6+
# evm:evm通用mint类型,当前只支持该类型,无需修改
77
chainType: "evm"
88
# 链结点地址
99
# 备注:可前往此处 https://publicnode.com/ 查找满足你需要的免费evm结点url,比如下方配置里使用了马蹄链
@@ -22,8 +22,4 @@ mint:
2222
# 配置gasLimit
2323
gasLimit: "根据实际情况设置"
2424
# 铭文16进制字符串,比如mint马蹄链的anteater,则使用下面铭文(仅限示例,该铭文很有可能已经被mint完了)
25-
# 如果上面chainType配置了reth,则该data参数无需配置(配置了也没任何用处),内部会自动算出提交
2625
data: "0x646174613a2c7b2261223a224e657874496e736372697074696f6e222c2270223a226f7072632d3230222c226f70223a226d696e74222c227469636b223a22616e746561746572222c22616d74223a22313030303030303030227d"
27-
reth:
28-
# 根据官方最新难度,自行进行调整,我目前这里默认给的是2023-12-14最新难度
29-
difficulty: "0x000077777777"

utils/config/config.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ type Config struct {
1212
Logger *Logger `yaml:"logger"`
1313
Chain *Chain `yaml:"chain"`
1414
Mint *Mint `yaml:"mint"`
15-
Reth *Reth `yaml:"reth"`
1615
callbacks []func()
1716
}
1817

@@ -45,7 +44,6 @@ func Setup(s source.Source,
4544
Chain: ChainConfig,
4645
Mint: MintConfig,
4746
Logger: LoggerConfig,
48-
Reth: RethConfig,
4947
callbacks: fs,
5048
}
5149
var err error

utils/config/reth.go

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)