Skip to content

Commit

Permalink
🍞 Pass safeTxGas in useContractFunction hook (#1065)
Browse files Browse the repository at this point in the history
  • Loading branch information
yivlad committed Jan 16, 2023
1 parent 0b53b92 commit 5c476d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/spicy-mice-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@usedapp/core': patch
---

Pass safeTxGas in useContractFunction
1 change: 1 addition & 0 deletions packages/core/src/hooks/useContractFunction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export function useContractFunction<T extends TypedContract, FN extends Contract
to: contract.address,
value: opts?.value,
data: contract.interface.encodeFunctionData(functionName, modifiedArgs),
safeTxGas: gasLimit ?? undefined,
},
})
if (receipt?.logs) {
Expand Down

2 comments on commit 5c476d6

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.