From 606d2cefb9bbdf002719b062134acb9490127fd9 Mon Sep 17 00:00:00 2001 From: Noah Saso Date: Fri, 17 Nov 2023 17:38:44 -0800 Subject: [PATCH] Added approver queries. --- .../contract/prePropose/daoPreProposeApprover.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/data/formulas/contract/prePropose/daoPreProposeApprover.ts b/src/data/formulas/contract/prePropose/daoPreProposeApprover.ts index ed5d0769..f5d0c198 100644 --- a/src/data/formulas/contract/prePropose/daoPreProposeApprover.ts +++ b/src/data/formulas/contract/prePropose/daoPreProposeApprover.ts @@ -6,3 +6,19 @@ export const preProposeApprovalContract: ContractFormula = { compute: async ({ contractAddress, get }) => await get(contractAddress, 'pre_propose_approval_contract'), } + +export const preProposeApprovalIdForApproverProposalId: ContractFormula< + number | undefined, + { id: string } +> = { + compute: async ({ contractAddress, get, args: { id } }) => + await get(contractAddress, 'proposal_to_pre_propose', Number(id)), +} + +export const approverProposalIdForPreProposeApprovalId: ContractFormula< + number | undefined, + { id: string } +> = { + compute: async ({ contractAddress, get, args: { id } }) => + await get(contractAddress, 'pre_propose_to_proposal', Number(id)), +}