Skip to content

Commit

Permalink
fix evm gas estimation
Browse files Browse the repository at this point in the history
  • Loading branch information
RaaCT0R committed Dec 16, 2024
1 parent 2b763a1 commit f409b2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/soft-ads-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rosen-chains/evm-rpc': patch
---

Fix EVM gas estimation so that only required fields are sent to the RPC
3 changes: 2 additions & 1 deletion packages/networks/evm-rpc/lib/EvmRpcNetwork.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,9 @@ class EvmRpcNetwork extends AbstractEvmNetwork {
getGasRequired = async (transaction: Transaction): Promise<bigint> => {
try {
const gas = await this.provider.estimateGas({
...transaction.toJSON(),
from: this.lockAddress,
to: transaction.to,
data: transaction.data,
});
this.logger.debug(
`requested 'estimateGas' of ${
Expand Down

0 comments on commit f409b2a

Please sign in to comment.