Skip to content

Commit

Permalink
Added approver queries.
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Nov 18, 2023
1 parent cf2e082 commit 606d2ce
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/data/formulas/contract/prePropose/daoPreProposeApprover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,19 @@ export const preProposeApprovalContract: ContractFormula<string | undefined> = {
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)),
}

0 comments on commit 606d2ce

Please sign in to comment.