aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zoo/monkey/monkey.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/zoo/monkey/monkey.go')
-rw-r--r--cmd/zoo/monkey/monkey.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/zoo/monkey/monkey.go b/cmd/zoo/monkey/monkey.go
index 2afffa87c..a511c42fa 100644
--- a/cmd/zoo/monkey/monkey.go
+++ b/cmd/zoo/monkey/monkey.go
@@ -124,16 +124,21 @@ func (m *Monkey) prepareTx(ctx *transferContext) *types.Transaction {
}
}
+ gasPrice, err := m.client.SuggestGasPrice(context.Background())
+ if err != nil {
+ panic(err)
+ }
+
tx := types.NewTransaction(
ctx.Nonce,
ctx.ToAddress,
ctx.Amount,
ctx.Gas,
- big.NewInt(1e9),
+ gasPrice,
ctx.Data)
signer := types.NewEIP155Signer(m.networkID)
- tx, err := types.SignTx(tx, signer, ctx.Key)
+ tx, err = types.SignTx(tx, signer, ctx.Key)
if err != nil {
panic(err)
}