Skip to content

Commit c4dae79

Browse files
author
Jason
committed
手动配置mint间隔时间
1 parent 530e7b8 commit c4dae79

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func main() {
5959

6060
//开始mint
6161
for i := 1; i <= config.MintConfig.Times; i++ {
62-
time.Sleep(5 * time.Second) //防止多次异常,导致连续mint同一个nonce
62+
time.Sleep(time.Duration(config.MintConfig.Delay) * time.Second) //防止多次异常,导致连续mint同一个nonce
6363

6464
balanceStr, er := evmApp.TokenBalanceOf()
6565
err = er

settings.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ chain:
1313
mint:
1414
# mint 铸造次数,通俗说,批量铸造多少个,就配置多少
1515
times: 10
16+
# 每次mint间隔时间,单位秒
17+
delay: 5
1618
# 私钥
1719
privateKey: ""
1820
# 配置gasPrice,单位是wei ; 备注:1Gwei = 1000000000 wei

utils/config/mint.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package config
22

33
type Mint struct {
44
Times int //次数
5+
Delay int //间隔时间
56
PrivateKey string //私钥
67
GasPrice string
78
GasLimit string

0 commit comments

Comments
 (0)