From b7ea254974eeaac5c3314e6f3fb52ba5374ff8b5 Mon Sep 17 00:00:00 2001 From: Theo Date: Wed, 30 Aug 2023 12:05:46 -0700 Subject: [PATCH] Update IPFS CIDs for proposal 29 --- data/ensDomainsIPFSContenthashes.txt | 4 ++-- data/ipfsV1CIDs.txt | 8 ++++---- lib/forge-std | 2 +- scripts/calculateIPFSContenthashes.ts | 14 +++++--------- scripts/calculateIpfsV1Cids.ts | 14 +++++--------- scripts/constants.ts | 4 ++++ src/UpdateENSDataProposal.sol | 4 ++-- 7 files changed, 23 insertions(+), 27 deletions(-) create mode 100644 scripts/constants.ts diff --git a/data/ensDomainsIPFSContenthashes.txt b/data/ensDomainsIPFSContenthashes.txt index ea27cc0..3b863ab 100644 --- a/data/ensDomainsIPFSContenthashes.txt +++ b/data/ensDomainsIPFSContenthashes.txt @@ -1,4 +1,4 @@ - bytes memory classicUiIPFSContenthash = hex"e301017012208124caa06a8419371b1d2eab9180191727d1ce0c0832975362f77a679ce614b6"; + bytes memory classicUiIPFSContenthash = hex"e301017012203c89ba6bfdeb8d7209463006e620ee6dcb34675cf3202f20919e3a5f9919070d"; bytes memory novaUiIPFSContenthash = hex"e3010170122069648b09fb7ed9a89ca153a000bc8c1bf82a779195a640609e1510dc36c28bb7"; bytes memory relayersUiIPFSContenthash = hex"e301017012203d61bed0641d7c53d5f036b6448f9d455ae6e0ceda44563009536a12e51d52cf"; - bytes memory docsIPFSContenthash = hex"e3010170122008ba5879914413355290e3c8574825f7a09e59a9802a5fad1edfb3ce6a4f825b"; + bytes memory docsIPFSContenthash = hex"e301017012201e6facc47ac27a4072b3ba19e716c0db37cbd29b40b23f3af8a85412ef45be08"; diff --git a/data/ipfsV1CIDs.txt b/data/ipfsV1CIDs.txt index e1dfe67..d66a4eb 100644 --- a/data/ipfsV1CIDs.txt +++ b/data/ipfsV1CIDs.txt @@ -1,4 +1,4 @@ -const classicUiIPFSHash = "bafybeiebetfka2uede3rwhjovoiyagixe7i44daigklvgyxxpjtzzzquwy"; -const novaUiIPFSHash = "bafybeidjmsfqt6363gujziktuaalzda37avhpemvuzagbhqvcdodnqulw4"; -const relayersUiIPFSHash = "bafybeib5mg7naza5prj5l4bwwzci7hkflltobtw2irldacktnijokhksz4"; -const docsIPFSHash = "bafybeiaixjmhtekecm2vfehdzbluqjpxucpftkmafjp22hw7wphgut4clm"; +const classicUiIpfsCid = "bafybeib4rg5gx7plrvzasrrqa3tcb3tnzm2goxhteaxsbem6hjpzsgihbu"; +const novaUiIpfsCid = "bafybeidjmsfqt6363gujziktuaalzda37avhpemvuzagbhqvcdodnqulw4"; +const relayersUiIpfsCid = "bafybeib5mg7naza5prj5l4bwwzci7hkflltobtw2irldacktnijokhksz4"; +const docsIpfsCid = "bafybeia6n6wmi6wcpjahfm52dhtrnqg3g7f5fg2awi7tv6fikqjo6rn6ba"; diff --git a/lib/forge-std b/lib/forge-std index 75f1746..c4aaed6 160000 --- a/lib/forge-std +++ b/lib/forge-std @@ -1 +1 @@ -Subproject commit 75f1746c949ae56377611e5f2128aa93d381431f +Subproject commit c4aaed668ae0900dbae646ef1bb43cad2e95097c diff --git a/scripts/calculateIPFSContenthashes.ts b/scripts/calculateIPFSContenthashes.ts index 2be8248..f0f74dd 100644 --- a/scripts/calculateIPFSContenthashes.ts +++ b/scripts/calculateIPFSContenthashes.ts @@ -4,18 +4,14 @@ import fs from "fs"; import path from "path"; import { DeclCalculator } from "./utils"; - -const classicUiIPFSCid = "QmX2mqjsZYaZGoLHCBFX9QpV38jFtU5eNDUR3M7a7fzRY9"; -const novaUiIPFSCid = "QmVS4SPsH44oJPCffUZZUGTXqCpSx3eK8UJ8YmZsSDygop"; -const relayersUiIPFSCid = "QmSUG2SNSPc6UUc6tgTZJWQKExhUGqjxHQPcJNZuU5FcxW"; -const docsIPFSCid = "QmNvimy7WNYG3H8cYmANLZjfvKeDFLUHDVvLMLiKj5AWsC"; +import { classicUiIpfsCid, novaUiIpfsCid, relayersUiIpfsCid, docsIpfsCid } from "./constants"; const contentHashToBytesMemory = (hash: string) => `hex"${hash}"`; -const classicUiIPFSContenthash = contentHash.fromIpfs(classicUiIPFSCid); -const novaUiIPFSContenthash = contentHash.fromIpfs(novaUiIPFSCid); -const relayersUiIPFSContenthash = contentHash.fromIpfs(relayersUiIPFSCid); -const docsIPFSContenthash = contentHash.fromIpfs(docsIPFSCid); +const classicUiIPFSContenthash = contentHash.fromIpfs(classicUiIpfsCid); +const novaUiIPFSContenthash = contentHash.fromIpfs(novaUiIpfsCid); +const relayersUiIPFSContenthash = contentHash.fromIpfs(relayersUiIpfsCid); +const docsIPFSContenthash = contentHash.fromIpfs(docsIpfsCid); const solidityDoublePadding = " ".repeat(8); const { calculateDecl } = new DeclCalculator("bytes memory", solidityDoublePadding, contentHashToBytesMemory); diff --git a/scripts/calculateIpfsV1Cids.ts b/scripts/calculateIpfsV1Cids.ts index 685529a..a3b8e06 100644 --- a/scripts/calculateIpfsV1Cids.ts +++ b/scripts/calculateIpfsV1Cids.ts @@ -3,19 +3,15 @@ import path from "path"; import CID from "cids"; import { DeclCalculator } from "./utils"; - -const classicUiIPFSHash = "QmX2mqjsZYaZGoLHCBFX9QpV38jFtU5eNDUR3M7a7fzRY9"; -const novaUiIPFSHash = "QmVS4SPsH44oJPCffUZZUGTXqCpSx3eK8UJ8YmZsSDygop"; -const relayersUiIPFSHash = "QmSUG2SNSPc6UUc6tgTZJWQKExhUGqjxHQPcJNZuU5FcxW"; -const docsIPFSHash = "QmNvimy7WNYG3H8cYmANLZjfvKeDFLUHDVvLMLiKj5AWsC"; +import { classicUiIpfsCid, novaUiIpfsCid, relayersUiIpfsCid, docsIpfsCid } from "./constants"; const convertCIDToV1 = (cidV0: string) => `"${new CID(cidV0).toV1().toString()}"`; const { calculateDecl } = new DeclCalculator("const", "", convertCIDToV1); const typescriptCode = - calculateDecl({ classicUiIPFSHash }) + - calculateDecl({ novaUiIPFSHash }) + - calculateDecl({ relayersUiIPFSHash }) + - calculateDecl({ docsIPFSHash }); + calculateDecl({ classicUiIpfsCid }) + + calculateDecl({ novaUiIpfsCid }) + + calculateDecl({ relayersUiIpfsCid }) + + calculateDecl({ docsIpfsCid }); fs.writeFileSync(path.join(".", "data", "ipfsV1CIDs.txt"), typescriptCode); diff --git a/scripts/constants.ts b/scripts/constants.ts new file mode 100644 index 0000000..b262899 --- /dev/null +++ b/scripts/constants.ts @@ -0,0 +1,4 @@ +export const classicUiIpfsCid = "QmSQxyjNpGAMXYBNjkuZAjuAg5JCg1RYoe663XovNQicua"; +export const novaUiIpfsCid = "QmVS4SPsH44oJPCffUZZUGTXqCpSx3eK8UJ8YmZsSDygop"; +export const relayersUiIpfsCid = "QmSUG2SNSPc6UUc6tgTZJWQKExhUGqjxHQPcJNZuU5FcxW"; +export const docsIpfsCid = "QmQPThvEBTCBFLPp16TeHxWGk7oYKth3AGdvYdiw6TyfKV"; diff --git a/src/UpdateENSDataProposal.sol b/src/UpdateENSDataProposal.sol index 937770c..190c2f1 100644 --- a/src/UpdateENSDataProposal.sol +++ b/src/UpdateENSDataProposal.sol @@ -35,10 +35,10 @@ contract UpdateENSDataProposal is TornadoAddresses { ensResolver.setAddr(stakingRewardsENSNode, stakingAddress); // From data/ensDomainsIPFSContenthashes.txt, calculated via scripts/calculateIPFSContenthashes.ts - bytes memory classicUiIPFSContenthash = hex"e301017012208124caa06a8419371b1d2eab9180191727d1ce0c0832975362f77a679ce614b6"; + bytes memory classicUiIPFSContenthash = hex"e301017012203c89ba6bfdeb8d7209463006e620ee6dcb34675cf3202f20919e3a5f9919070d"; bytes memory novaUiIPFSContenthash = hex"e3010170122069648b09fb7ed9a89ca153a000bc8c1bf82a779195a640609e1510dc36c28bb7"; bytes memory relayersUiIPFSContenthash = hex"e301017012203d61bed0641d7c53d5f036b6448f9d455ae6e0ceda44563009536a12e51d52cf"; - bytes memory docsIPFSContenthash = hex"e3010170122008ba5879914413355290e3c8574825f7a09e59a9802a5fad1edfb3ce6a4f825b"; + bytes memory docsIPFSContenthash = hex"e301017012201e6facc47ac27a4072b3ba19e716c0db37cbd29b40b23f3af8a85412ef45be08"; ensResolver.setContenthash(rootTornadoENSNode, classicUiIPFSContenthash); ensResolver.setContenthash(novaENSNode, novaUiIPFSContenthash);