Skip to content

Commit

Permalink
use treasury instead of governor
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfsayo committed Jan 2, 2025
1 parent 352924e commit 76449e7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apps/web/src/data/contract/requests/getDAOAddresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const getDAOAddresses = async (chainId: CHAIN_ID, tokenAddress: AddressType) =>

const [metadata, auction, treasury, governor] = unpackOptionalArray(addresses, 4)

const multiSig = await getDaoMultiSig(governor as AddressType, chainId)
const multiSig = await getDaoMultiSig(treasury as AddressType, chainId)

const hasMissingAddresses = Object.values(addresses).includes(NULL_ADDRESS)
if (hasMissingAddresses) return null
Expand Down
12 changes: 6 additions & 6 deletions apps/web/src/data/contract/requests/getDAOMultisig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface DecodedData {

const ATTESTATION_SCHEMA_UID = `0x1289c5f988998891af7416d83820c40ba1c6f5ba31467f2e611172334dc53a0e`
const SMART_INVOICE_MULTISIG = `0x503a5161D1c5D9d82BF35a4c80DA0C3Ad72d9244` // TODO: replace with actual multisig address
const BUILDER_DAO_GOVERNOR= `0x6623d2a90429475ed9c8a4b613c4b5b4f8428cee`
const BUILDER_DAO_TREASURY= `0xcf325a4c78912216249b818521b0798a0f904c10`
const BUILDER_DAO_OPS_MULTISIG = `0x58eAEfBEd9EEFbC564E302D0AfAE0B113E42eAb3`

const ATTESTATION_URL: Record<CHAIN_ID, string> = {
Expand All @@ -40,11 +40,11 @@ const ATTESTATION_URL: Record<CHAIN_ID, string> = {
}

export async function getDaoMultiSig(
daoAddress: string,
daoTreasuryAddress: string,
chainId: CHAIN_ID
): Promise<string | null> {
// Input validation
if (!daoAddress || !isAddress(daoAddress)) {
if (!daoTreasuryAddress || !isAddress(daoTreasuryAddress)) {
return null
}

Expand All @@ -54,8 +54,8 @@ export async function getDaoMultiSig(
}

const multiSigIssuerPriorityOrder = [
checksumAddress(daoAddress),
checksumAddress(BUILDER_DAO_GOVERNOR),
checksumAddress(daoTreasuryAddress),
checksumAddress(BUILDER_DAO_TREASURY),
checksumAddress(BUILDER_DAO_OPS_MULTISIG),
checksumAddress(SMART_INVOICE_MULTISIG)
];
Expand All @@ -67,7 +67,7 @@ export async function getDaoMultiSig(
where: {
schemaId: { equals: "${ATTESTATION_SCHEMA_UID}" }
attester: { in: ["${multiSigIssuerPriorityOrder.join('","')}"] }
recipient: { equals: "${checksumAddress(daoAddress)}" }
recipient: { equals: "${checksumAddress(daoTreasuryAddress)}" }
}
) {
attester
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/pages/dao/[network]/[token]/[tokenId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export const getServerSideProps: GetServerSideProps = async ({
} = token.dao

const multiSigAddress = (await getDaoMultiSig(
governorAddress,
treasuryAddress,
chain.id
)) as AddressType

Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/pages/dao/[network]/[token]/vote/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export const getServerSideProps: GetServerSideProps = async ({ params, req, res
auctionAddress,
} = data.dao

const multiSigAddress = (await getDaoMultiSig(governorAddress, chain.id)) as AddressType
const multiSigAddress = (await getDaoMultiSig(treasuryAddress, chain.id)) as AddressType

const ogMetadata: ProposalOgMetadata = {
proposal: {
Expand Down

0 comments on commit 76449e7

Please sign in to comment.