Skip to content

Commit

Permalink
Fix for faucet.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanIliev545 committed Jan 15, 2024
1 parent b9cb6e6 commit d4dcd1c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tools/faucet/faucet/faucet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit d4dcd1c

Please sign in to comment.