Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
0xjojoex committed Jul 10, 2023
1 parent 109af31 commit 34e4bb4
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions apps/web/src/hooks/useCallWithGasPrice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,24 +73,24 @@ export function useCallWithGasPrice() {
methodArgs?: Args extends never ? undefined : Args,
overrides?: Omit<CallParameters, 'chain' | 'to' | 'data'>,
): Promise<SendTransactionResult> => {
const gas = await publicClient({ chainId }).estimateContractGas({
abi: contract.abi,
address: contract.address,
// account: walletClient.account,
functionName: methodName,
args: methodArgs,
gasPrice,
value: 0n,
...overrides,
} as unknown as EstimateContractGasParameters)
// const gas = await publicClient({ chainId }).estimateContractGas({
// abi: contract.abi,
// address: contract.address,
// // account: walletClient.account,
// functionName: methodName,
// args: methodArgs,
// gasPrice,
// value: 0n,
// ...overrides,
// } as unknown as EstimateContractGasParameters)
const res = await walletClient.writeContract({
abi: contract.abi,
address: contract.address,
account: walletClient.account,
functionName: methodName,
args: methodArgs,
gasPrice,
gas: calculateGasMargin(gas),
// gas: calculateGasMargin(gas),
value: 0n,
...overrides,
} as unknown as WriteContractParameters)
Expand Down

0 comments on commit 34e4bb4

Please sign in to comment.