Skip to content

Commit

Permalink
add gas estimate buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
dhvanipa committed May 8, 2024
1 parent c587719 commit 5e7a812
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/common/src/writeContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ export async function writeContract<
to: address,
} as never);

// add buffer to the gas estimate
if (preparedTransaction.gas) {
preparedTransaction.gas = preparedTransaction.gas + 50000n;
}

return preparedTransaction as never;
}

Expand Down

0 comments on commit 5e7a812

Please sign in to comment.