From 9a716c0940bef53eff00eb1d5300fce07dfc3ccb Mon Sep 17 00:00:00 2001 From: wuyachi Date: Tue, 8 Nov 2022 18:25:42 +0800 Subject: [PATCH] Hardcode Astar's gas price --- wallet/wallet.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wallet/wallet.go b/wallet/wallet.go index e847d46..13d3b21 100644 --- a/wallet/wallet.go +++ b/wallet/wallet.go @@ -247,6 +247,10 @@ func (w *Wallet) Account() (accounts.Account, Provider, NonceProvider) { } func (w *Wallet) GasPrice() (price *big.Int, err error) { + if w.sdk.ChainID == base.ASTAR { + // astar average price is 60 Gwei while node returns 1 Gwei + return big.NewInt(1000000000 * 60), nil + } return w.sdk.Node().SuggestGasPrice(context.Background()) }