Skip to content

Commit

Permalink
Merge branch '129-fix-evm-estimate-gas' into 'dev'
Browse files Browse the repository at this point in the history
fix evm gas estimation

Closes #129

See merge request ergo/rosen-bridge/rosen-chains!160
  • Loading branch information
zargarzadehm committed Dec 16, 2024
2 parents 1767994 + f409b2a commit 6b95cef
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 6b95cef

Please sign in to comment.