Skip to content

Commit

Permalink
手动配置mint间隔时间
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason committed Dec 10, 2023
1 parent 530e7b8 commit c4dae79
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func main() {

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

balanceStr, er := evmApp.TokenBalanceOf()
err = er
Expand Down
2 changes: 2 additions & 0 deletions settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ chain:
mint:
# mint 铸造次数,通俗说,批量铸造多少个,就配置多少
times: 10
# 每次mint间隔时间,单位秒
delay: 5
# 私钥
privateKey: ""
# 配置gasPrice,单位是wei ; 备注:1Gwei = 1000000000 wei
Expand Down
1 change: 1 addition & 0 deletions utils/config/mint.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package config

type Mint struct {
Times int //次数
Delay int //间隔时间
PrivateKey string //私钥
GasPrice string
GasLimit string
Expand Down

0 comments on commit c4dae79

Please sign in to comment.