diff --git a/tools/faucet/faucet/faucet.go b/tools/faucet/faucet/faucet.go index 2da6f4205a..981fd4dd66 100644 --- a/tools/faucet/faucet/faucet.go +++ b/tools/faucet/faucet/faucet.go @@ -117,18 +117,16 @@ func (f *Faucet) fundNativeToken(address *common.Address, amount *big.Int) (*typ // this isn't great as the tx count might be incremented in between calls // but only after removing the pk from other apps can we use a proper counter - // todo remove hardcoded gas values - gas := uint64(21000) - tx := &types.LegacyTx{ Nonce: nonce, GasPrice: big.NewInt(225), - Gas: gas, To: address, Value: amount, } - signedTx, err := f.wallet.SignTransaction(tx) + estimatedTx := f.client.EstimateGasAndGasPrice(tx) + + signedTx, err := f.wallet.SignTransaction(estimatedTx) if err != nil { return nil, err }