Compare commits

...

2 Commits

Author SHA1 Message Date
b7ea254974 Update IPFS CIDs for proposal 29 2023-08-30 12:05:46 -07:00
79c5bbbbc7 Update test Goerli contract 2023-08-30 12:05:26 -07:00
8 changed files with 27 additions and 31 deletions

@ -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";

@ -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";

@ -1 +1 @@
Subproject commit 75f1746c949ae56377611e5f2128aa93d381431f
Subproject commit c4aaed668ae0900dbae646ef1bb43cad2e95097c

@ -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);

@ -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);

4
scripts/constants.ts Normal file

@ -0,0 +1,4 @@
export const classicUiIpfsCid = "QmSQxyjNpGAMXYBNjkuZAjuAg5JCg1RYoe663XovNQicua";
export const novaUiIpfsCid = "QmVS4SPsH44oJPCffUZZUGTXqCpSx3eK8UJ8YmZsSDygop";
export const relayersUiIpfsCid = "QmSUG2SNSPc6UUc6tgTZJWQKExhUGqjxHQPcJNZuU5FcxW";
export const docsIpfsCid = "QmQPThvEBTCBFLPp16TeHxWGk7oYKth3AGdvYdiw6TyfKV";

@ -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);

@ -9,8 +9,8 @@ import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { TornadoAddresses } from "@proprietary/TornadoAddresses.sol";
contract GoerliTestProposal is Ownable, TornadoAddresses {
address ensResolverAddress = 0xd7a4F6473f32aC2Af804B3686AE8F1932bC35750; // goerli ENS resolver
address ensRegistryAddress = 0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e;
address internal ensResolverAddress = 0xd7a4F6473f32aC2Af804B3686AE8F1932bC35750; // goerli ENS resolver
address internal ensRegistryAddress = 0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e;
string testDomain = "tornadotest.eth";
bytes32 testNode = calculateDomainNode(testDomain);
@ -71,7 +71,7 @@ contract GoerliTestProposal is Ownable, TornadoAddresses {
}
function setClassicUiIpfs() public {
bytes memory classicUiIPFSContenthash = hex"e301017012208124caa06a8419371b1d2eab9180191727d1ce0c0832975362f77a679ce614b6";
bytes memory classicUiIPFSContenthash = hex"e301017012203c89ba6bfdeb8d7209463006e620ee6dcb34675cf3202f20919e3a5f9919070d";
ensResolver.setContenthash(testNode, classicUiIPFSContenthash);
}
@ -89,7 +89,7 @@ contract GoerliTestProposal is Ownable, TornadoAddresses {
}
function setDocsIpfs() public {
bytes memory docsIPFSContenthash = hex"e3010170122008ba5879914413355290e3c8574825f7a09e59a9802a5fad1edfb3ce6a4f825b";
bytes memory docsIPFSContenthash = hex"e301017012201e6facc47ac27a4072b3ba19e716c0db37cbd29b40b23f3af8a85412ef45be08";
ensResolver.setContenthash(testNode, docsIPFSContenthash);
}