diff --git a/packages/contract-helpers/src/commons/types.ts b/packages/contract-helpers/src/commons/types.ts index 2801c443..ec8e3d0b 100644 --- a/packages/contract-helpers/src/commons/types.ts +++ b/packages/contract-helpers/src/commons/types.ts @@ -144,6 +144,7 @@ export enum ProtocolAction { setUsageAsCollateral = 'setUsageAsCollateral', withdrawAndSwitch = 'withdrawAndSwitch', batchMetaDelegate = 'batchMetaDelegate', + updateRepresentatives = 'updateRepresentatives', } export enum GovernanceVote { diff --git a/packages/contract-helpers/src/commons/utils.ts b/packages/contract-helpers/src/commons/utils.ts index 6982abb4..2b9db750 100644 --- a/packages/contract-helpers/src/commons/utils.ts +++ b/packages/contract-helpers/src/commons/utils.ts @@ -142,6 +142,10 @@ export const gasLimitRecommendations: GasRecommendationType = { limit: '200000', recommended: '200000', }, + [ProtocolAction.updateRepresentatives]: { + limit: '60000', + recommended: '60000', + }, }; export const mintAmountsPerToken: Record = { diff --git a/packages/contract-helpers/src/governance-v3/governance-core/index.ts b/packages/contract-helpers/src/governance-v3/governance-core/index.ts index 3e5a8aca..ff04cf02 100644 --- a/packages/contract-helpers/src/governance-v3/governance-core/index.ts +++ b/packages/contract-helpers/src/governance-v3/governance-core/index.ts @@ -1,4 +1,5 @@ -import { ChainId } from 'contract-helpers/src/commons/types'; +import { ChainId, ProtocolAction } from 'contract-helpers/src/commons/types'; +import { gasLimitRecommendations } from 'contract-helpers/src/commons/utils'; import { BigNumber, PopulatedTransaction, providers } from 'ethers'; import { GovernanceCore, @@ -44,7 +45,9 @@ export class GovernanceCoreService implements GovernanceCoreServiceInterface { ), to: this._contractInstance.address, from: user, - gasLimit: BigNumber.from('1000000'), + gasLimit: BigNumber.from( + gasLimitRecommendations[ProtocolAction.updateRepresentatives].limit, + ), }; return actionTx;