Skip to content

Commit

Permalink
Merge pull request #423 from HausDAO/feat/increae-default-gas-buffer
Browse files Browse the repository at this point in the history
increase gas buffer multiplier and add constant
  • Loading branch information
skuhlmann authored Sep 18, 2023
2 parents 1fc1c73 + d5df123 commit f762802
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions libs/tx-builder/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { LOCAL_ABI } from '@daohaus/abis';
export const EXPIRY = '.proposalExpiry';
export const FORM = '.formValues';
export const CURRENT_DAO = '.daoId';
export const gasBufferMultiplier = 3;
export const BaalContractBase = {
type: 'local',
contractName: 'Baal',
Expand Down
3 changes: 2 additions & 1 deletion libs/tx-builder/src/utils/multicall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
CURRENT_DAO,
EXPIRY,
FORM,
gasBufferMultiplier,
} from './constants';
import { processContractLego } from './contractHelpers';
import { createViemClient } from '@daohaus/utils';
Expand Down Expand Up @@ -391,7 +392,7 @@ export const handleGasEstimate = async ({
});

if (gasEstimate) {
const buffer = arg.bufferPercentage || 2;
const buffer = arg.bufferPercentage || gasBufferMultiplier;
return Math.round(Number(gasEstimate) * Number(buffer));
} else {
// This happens when the safe vault takes longer to be indexed by the Gnosis API
Expand Down

0 comments on commit f762802

Please sign in to comment.