Skip to content

Commit

Permalink
refactor: loadProposal in transactions.tx
Browse files Browse the repository at this point in the history
  • Loading branch information
GitGuru7 committed Oct 3, 2024
1 parent dbdfb3b commit 6c589d4
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/transactions.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
import { ethers } from "hardhat";

import { Proposal } from "./types";
import { getCalldatas } from "./utils";

const DEFAULT_GOVERNOR_PROXY = "0x2d56dC077072B53571b8252008C60e945108c75a";

export const loadProposal = async (path: string) => {
const proposalModule = await import(`../vips/${path}`);
const proposal = await proposalModule.default();

delete proposal.gasFeeMultiplicationFactor;
delete proposal.gasLimitMultiplicationFactor;
const proposalCreated = await proposalModule.default();
const proposal: Proposal = {
signatures: proposalCreated.signatures,
targets: proposalCreated.targets,
params: proposalCreated.params,
values: proposalCreated.values,
meta: proposalCreated.meta,
type: proposalCreated.type,
};

return proposal;
};
Expand Down

0 comments on commit 6c589d4

Please sign in to comment.