Skip to content

Commit

Permalink
Make mode unwrap more often
Browse files Browse the repository at this point in the history
  • Loading branch information
prevostc committed Jun 23, 2024
1 parent 1fc3eb5 commit 41644f1
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/lib/rpc-actions/aggressivelyWriteContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,6 @@ export async function aggressivelyWriteContract<
resolvedAccount
>
> {
if (!args.gas) {
// setting a gas limit is mandatory since the viem default is too low for larger protocols
// and simulation will fail if we don't set it because the default gas parameter is very high
// for simulations so rpcs will check the total price of the transaction and fail if it's too high
// (which is the case if we don't set a gas limit)
throw new Error('Gas parameter is mandatory');
}

const { publicClient, walletClient, walletAccount, rpcConfig } = getRpcActionParams({ chain });
const nonce = await publicClient.getTransactionCount({
address: walletAccount.address,
Expand Down

0 comments on commit 41644f1

Please sign in to comment.