Compare commits
No commits in common. "b7ea254974eeaac5c3314e6f3fb52ba5374ff8b5" and "0cff07f2e74663cf1298a3042487a261ac423a66" have entirely different histories.
b7ea254974
...
0cff07f2e7
@ -1,4 +1,4 @@
|
|||||||
bytes memory classicUiIPFSContenthash = hex"e301017012203c89ba6bfdeb8d7209463006e620ee6dcb34675cf3202f20919e3a5f9919070d";
|
bytes memory classicUiIPFSContenthash = hex"e301017012208124caa06a8419371b1d2eab9180191727d1ce0c0832975362f77a679ce614b6";
|
||||||
bytes memory novaUiIPFSContenthash = hex"e3010170122069648b09fb7ed9a89ca153a000bc8c1bf82a779195a640609e1510dc36c28bb7";
|
bytes memory novaUiIPFSContenthash = hex"e3010170122069648b09fb7ed9a89ca153a000bc8c1bf82a779195a640609e1510dc36c28bb7";
|
||||||
bytes memory relayersUiIPFSContenthash = hex"e301017012203d61bed0641d7c53d5f036b6448f9d455ae6e0ceda44563009536a12e51d52cf";
|
bytes memory relayersUiIPFSContenthash = hex"e301017012203d61bed0641d7c53d5f036b6448f9d455ae6e0ceda44563009536a12e51d52cf";
|
||||||
bytes memory docsIPFSContenthash = hex"e301017012201e6facc47ac27a4072b3ba19e716c0db37cbd29b40b23f3af8a85412ef45be08";
|
bytes memory docsIPFSContenthash = hex"e3010170122008ba5879914413355290e3c8574825f7a09e59a9802a5fad1edfb3ce6a4f825b";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const classicUiIpfsCid = "bafybeib4rg5gx7plrvzasrrqa3tcb3tnzm2goxhteaxsbem6hjpzsgihbu";
|
const classicUiIPFSHash = "bafybeiebetfka2uede3rwhjovoiyagixe7i44daigklvgyxxpjtzzzquwy";
|
||||||
const novaUiIpfsCid = "bafybeidjmsfqt6363gujziktuaalzda37avhpemvuzagbhqvcdodnqulw4";
|
const novaUiIPFSHash = "bafybeidjmsfqt6363gujziktuaalzda37avhpemvuzagbhqvcdodnqulw4";
|
||||||
const relayersUiIpfsCid = "bafybeib5mg7naza5prj5l4bwwzci7hkflltobtw2irldacktnijokhksz4";
|
const relayersUiIPFSHash = "bafybeib5mg7naza5prj5l4bwwzci7hkflltobtw2irldacktnijokhksz4";
|
||||||
const docsIpfsCid = "bafybeia6n6wmi6wcpjahfm52dhtrnqg3g7f5fg2awi7tv6fikqjo6rn6ba";
|
const docsIPFSHash = "bafybeiaixjmhtekecm2vfehdzbluqjpxucpftkmafjp22hw7wphgut4clm";
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit c4aaed668ae0900dbae646ef1bb43cad2e95097c
|
Subproject commit 75f1746c949ae56377611e5f2128aa93d381431f
|
@ -4,14 +4,18 @@ import fs from "fs";
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
|
|
||||||
import { DeclCalculator } from "./utils";
|
import { DeclCalculator } from "./utils";
|
||||||
import { classicUiIpfsCid, novaUiIpfsCid, relayersUiIpfsCid, docsIpfsCid } from "./constants";
|
|
||||||
|
const classicUiIPFSCid = "QmX2mqjsZYaZGoLHCBFX9QpV38jFtU5eNDUR3M7a7fzRY9";
|
||||||
|
const novaUiIPFSCid = "QmVS4SPsH44oJPCffUZZUGTXqCpSx3eK8UJ8YmZsSDygop";
|
||||||
|
const relayersUiIPFSCid = "QmSUG2SNSPc6UUc6tgTZJWQKExhUGqjxHQPcJNZuU5FcxW";
|
||||||
|
const docsIPFSCid = "QmNvimy7WNYG3H8cYmANLZjfvKeDFLUHDVvLMLiKj5AWsC";
|
||||||
|
|
||||||
const contentHashToBytesMemory = (hash: string) => `hex"${hash}"`;
|
const contentHashToBytesMemory = (hash: string) => `hex"${hash}"`;
|
||||||
|
|
||||||
const classicUiIPFSContenthash = contentHash.fromIpfs(classicUiIpfsCid);
|
const classicUiIPFSContenthash = contentHash.fromIpfs(classicUiIPFSCid);
|
||||||
const novaUiIPFSContenthash = contentHash.fromIpfs(novaUiIpfsCid);
|
const novaUiIPFSContenthash = contentHash.fromIpfs(novaUiIPFSCid);
|
||||||
const relayersUiIPFSContenthash = contentHash.fromIpfs(relayersUiIpfsCid);
|
const relayersUiIPFSContenthash = contentHash.fromIpfs(relayersUiIPFSCid);
|
||||||
const docsIPFSContenthash = contentHash.fromIpfs(docsIpfsCid);
|
const docsIPFSContenthash = contentHash.fromIpfs(docsIPFSCid);
|
||||||
|
|
||||||
const solidityDoublePadding = " ".repeat(8);
|
const solidityDoublePadding = " ".repeat(8);
|
||||||
const { calculateDecl } = new DeclCalculator("bytes memory", solidityDoublePadding, contentHashToBytesMemory);
|
const { calculateDecl } = new DeclCalculator("bytes memory", solidityDoublePadding, contentHashToBytesMemory);
|
||||||
|
@ -3,15 +3,19 @@ import path from "path";
|
|||||||
import CID from "cids";
|
import CID from "cids";
|
||||||
|
|
||||||
import { DeclCalculator } from "./utils";
|
import { DeclCalculator } from "./utils";
|
||||||
import { classicUiIpfsCid, novaUiIpfsCid, relayersUiIpfsCid, docsIpfsCid } from "./constants";
|
|
||||||
|
const classicUiIPFSHash = "QmX2mqjsZYaZGoLHCBFX9QpV38jFtU5eNDUR3M7a7fzRY9";
|
||||||
|
const novaUiIPFSHash = "QmVS4SPsH44oJPCffUZZUGTXqCpSx3eK8UJ8YmZsSDygop";
|
||||||
|
const relayersUiIPFSHash = "QmSUG2SNSPc6UUc6tgTZJWQKExhUGqjxHQPcJNZuU5FcxW";
|
||||||
|
const docsIPFSHash = "QmNvimy7WNYG3H8cYmANLZjfvKeDFLUHDVvLMLiKj5AWsC";
|
||||||
|
|
||||||
const convertCIDToV1 = (cidV0: string) => `"${new CID(cidV0).toV1().toString()}"`;
|
const convertCIDToV1 = (cidV0: string) => `"${new CID(cidV0).toV1().toString()}"`;
|
||||||
|
|
||||||
const { calculateDecl } = new DeclCalculator("const", "", convertCIDToV1);
|
const { calculateDecl } = new DeclCalculator("const", "", convertCIDToV1);
|
||||||
const typescriptCode =
|
const typescriptCode =
|
||||||
calculateDecl({ classicUiIpfsCid }) +
|
calculateDecl({ classicUiIPFSHash }) +
|
||||||
calculateDecl({ novaUiIpfsCid }) +
|
calculateDecl({ novaUiIPFSHash }) +
|
||||||
calculateDecl({ relayersUiIpfsCid }) +
|
calculateDecl({ relayersUiIPFSHash }) +
|
||||||
calculateDecl({ docsIpfsCid });
|
calculateDecl({ docsIPFSHash });
|
||||||
|
|
||||||
fs.writeFileSync(path.join(".", "data", "ipfsV1CIDs.txt"), typescriptCode);
|
fs.writeFileSync(path.join(".", "data", "ipfsV1CIDs.txt"), typescriptCode);
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
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);
|
ensResolver.setAddr(stakingRewardsENSNode, stakingAddress);
|
||||||
|
|
||||||
// From data/ensDomainsIPFSContenthashes.txt, calculated via scripts/calculateIPFSContenthashes.ts
|
// From data/ensDomainsIPFSContenthashes.txt, calculated via scripts/calculateIPFSContenthashes.ts
|
||||||
bytes memory classicUiIPFSContenthash = hex"e301017012203c89ba6bfdeb8d7209463006e620ee6dcb34675cf3202f20919e3a5f9919070d";
|
bytes memory classicUiIPFSContenthash = hex"e301017012208124caa06a8419371b1d2eab9180191727d1ce0c0832975362f77a679ce614b6";
|
||||||
bytes memory novaUiIPFSContenthash = hex"e3010170122069648b09fb7ed9a89ca153a000bc8c1bf82a779195a640609e1510dc36c28bb7";
|
bytes memory novaUiIPFSContenthash = hex"e3010170122069648b09fb7ed9a89ca153a000bc8c1bf82a779195a640609e1510dc36c28bb7";
|
||||||
bytes memory relayersUiIPFSContenthash = hex"e301017012203d61bed0641d7c53d5f036b6448f9d455ae6e0ceda44563009536a12e51d52cf";
|
bytes memory relayersUiIPFSContenthash = hex"e301017012203d61bed0641d7c53d5f036b6448f9d455ae6e0ceda44563009536a12e51d52cf";
|
||||||
bytes memory docsIPFSContenthash = hex"e301017012201e6facc47ac27a4072b3ba19e716c0db37cbd29b40b23f3af8a85412ef45be08";
|
bytes memory docsIPFSContenthash = hex"e3010170122008ba5879914413355290e3c8574825f7a09e59a9802a5fad1edfb3ce6a4f825b";
|
||||||
|
|
||||||
ensResolver.setContenthash(rootTornadoENSNode, classicUiIPFSContenthash);
|
ensResolver.setContenthash(rootTornadoENSNode, classicUiIPFSContenthash);
|
||||||
ensResolver.setContenthash(novaENSNode, novaUiIPFSContenthash);
|
ensResolver.setContenthash(novaENSNode, novaUiIPFSContenthash);
|
||||||
|
@ -9,8 +9,8 @@ import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
|
|||||||
import { TornadoAddresses } from "@proprietary/TornadoAddresses.sol";
|
import { TornadoAddresses } from "@proprietary/TornadoAddresses.sol";
|
||||||
|
|
||||||
contract GoerliTestProposal is Ownable, TornadoAddresses {
|
contract GoerliTestProposal is Ownable, TornadoAddresses {
|
||||||
address internal ensResolverAddress = 0xd7a4F6473f32aC2Af804B3686AE8F1932bC35750; // goerli ENS resolver
|
address ensResolverAddress = 0xd7a4F6473f32aC2Af804B3686AE8F1932bC35750; // goerli ENS resolver
|
||||||
address internal ensRegistryAddress = 0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e;
|
address ensRegistryAddress = 0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e;
|
||||||
string testDomain = "tornadotest.eth";
|
string testDomain = "tornadotest.eth";
|
||||||
bytes32 testNode = calculateDomainNode(testDomain);
|
bytes32 testNode = calculateDomainNode(testDomain);
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ contract GoerliTestProposal is Ownable, TornadoAddresses {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setClassicUiIpfs() public {
|
function setClassicUiIpfs() public {
|
||||||
bytes memory classicUiIPFSContenthash = hex"e301017012203c89ba6bfdeb8d7209463006e620ee6dcb34675cf3202f20919e3a5f9919070d";
|
bytes memory classicUiIPFSContenthash = hex"e301017012208124caa06a8419371b1d2eab9180191727d1ce0c0832975362f77a679ce614b6";
|
||||||
|
|
||||||
ensResolver.setContenthash(testNode, classicUiIPFSContenthash);
|
ensResolver.setContenthash(testNode, classicUiIPFSContenthash);
|
||||||
}
|
}
|
||||||
@ -89,7 +89,7 @@ contract GoerliTestProposal is Ownable, TornadoAddresses {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setDocsIpfs() public {
|
function setDocsIpfs() public {
|
||||||
bytes memory docsIPFSContenthash = hex"e301017012201e6facc47ac27a4072b3ba19e716c0db37cbd29b40b23f3af8a85412ef45be08";
|
bytes memory docsIPFSContenthash = hex"e3010170122008ba5879914413355290e3c8574825f7a09e59a9802a5fad1edfb3ce6a4f825b";
|
||||||
|
|
||||||
ensResolver.setContenthash(testNode, docsIPFSContenthash);
|
ensResolver.setContenthash(testNode, docsIPFSContenthash);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user