62 lines
4.8 KiB
Solidity
62 lines
4.8 KiB
Solidity
|
// SPDX-License-Identifier: MIT
|
||
|
|
||
|
pragma solidity ^0.8.19;
|
||
|
|
||
|
import { IGovernance } from "@interfaces/IGovernance.sol";
|
||
|
import { IENSRegistry } from "@interfaces/IENSRegistry.sol";
|
||
|
import { IENSResolver } from "@interfaces/IENSResolver.sol";
|
||
|
|
||
|
contract GoerliTestProposal {
|
||
|
address constant governanceAddress = 0x810d00cb74aD4811265Ca3D2E5CE45031f872054;
|
||
|
|
||
|
address constant ensResolverAddress = 0xd7a4F6473f32aC2Af804B3686AE8F1932bC35750;
|
||
|
address constant ensRegistryAddress = 0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e;
|
||
|
|
||
|
IENSRegistry internal constant ensRegistry = IENSRegistry(ensRegistryAddress);
|
||
|
IENSResolver internal constant ensResolver = IENSResolver(ensResolverAddress);
|
||
|
|
||
|
bytes32 internal constant rootTornadoDomainNode = 0xa8f2228d0331c20e8d36b0bf33b102b5b8d8d416db25502b04e5b854d7a5c556;
|
||
|
bytes32 internal constant sourcesDomainNode = 0x857d0c409cbb3112c1b9a6a2c1fb1ac516630d9c263cb04bf3d5a32407b936d5;
|
||
|
bytes32 internal constant docsDomainNode = 0x06e536502f65df80c0a9013069725d2b0e90c8bd0191f526734b520d495d0659;
|
||
|
bytes32 internal constant relayersUiSiteDomainNode = 0x4df656d467b9ec37b486def2c97d7175ee02a0a48b475f847fb8203d0df526b3;
|
||
|
bytes32 internal constant relayersUiSiteOldDomainNode = 0x63faf07f77e39e4343415ee019ba0502f3a9ec0374e8aa201ec72fddd8603eeb;
|
||
|
bytes32 internal constant downloadScriptSourceDomainNode = 0x3ca990173243a16600a2c480447f5506291f48aaccc152c6ceb05ab13b26dd1a;
|
||
|
bytes32 internal constant ipfsHostHelpScriptSourceDomainNode = 0x1faa2f3d84c92ca774b5b6ac77b83f0789a7f3ff652bedac0806ef08cf335a22;
|
||
|
bytes32 internal constant docsSourceDomainNode = 0x2c6d4d7c3f94987894b9893d813e5f15447b2e63534f423cbdf97490ceccd57c;
|
||
|
bytes32 internal constant relayersUISourceDomainNode = 0x1e0e78434fb4ccd771715e5ef7cb66253591943a3d863d3d75f2be3418904dea;
|
||
|
bytes32 internal constant relayerSoftwareSourceNode = 0x9ecada456dfbf930ac79577caae66a43d989d1c2960cf6cac116699707808bec;
|
||
|
|
||
|
bytes32 internal constant relayersUiSiteDomainLabelhash = 0xea7c97223b0629f1c3bea11a57dd6179a12e9cc4bbdf8f69fb999c4051c682cf;
|
||
|
bytes32 internal constant ipfsHostHelpScriptSourceDomainLabelhash = 0x0825203969ee8c01895e26a522db220e9541acc7b27e3cb4a1a9317cb0c30bfb;
|
||
|
bytes32 internal constant relayerSoftwareSourceLabelhash = 0x802cf867c2da464d4ff0ebc4dfcccdfbd65d75a8bc1c273fb02e80bf3446b516;
|
||
|
|
||
|
function executeProposal() public {
|
||
|
// Register missing subnodes, set Governance as an owner
|
||
|
ensRegistry.setSubnodeRecord(rootTornadoDomainNode, relayersUiSiteDomainLabelhash, governanceAddress, ensResolverAddress, 0);
|
||
|
ensRegistry.setSubnodeRecord(sourcesDomainNode, relayerSoftwareSourceLabelhash, governanceAddress, ensResolverAddress, 0);
|
||
|
ensRegistry.setSubnodeRecord(sourcesDomainNode, ipfsHostHelpScriptSourceDomainLabelhash, governanceAddress, ensResolverAddress, 0);
|
||
|
|
||
|
// From data/ensDomainsIPFSContenthashes.txt, calculated via scripts/calculateIPFSContenthashes.ts
|
||
|
bytes memory relayersUiSourceContenthash = hex"e3010170122072dd7fe08bc98404c3a2e402dac817562b2533aa549c475e8e85b9a266bc507c";
|
||
|
bytes memory relayersUiSiteContenthash = hex"e3010170122052a5331f2ff57ce75b2fb48870e2f1f0752d0da2a0d612104028ce5930976adb";
|
||
|
bytes memory downloadScriptSourceContenthash = hex"e301017012208f759bcffb194cb59161916ee7f1f1d225016f03514b5430d3fb4c5fb254a3bb";
|
||
|
bytes memory ipfsHostHelpScriptSourceContenthash = hex"e301017012200c8e358709e32756da156639a8aedbf6950090d4e73c2dc6e1c012fe5b78e4e9";
|
||
|
bytes memory downloadInstructionsHtmlContenthash = hex"e301017012201a9748cd5f0f64c682d309f6af6354944e0d2e572e81c301ea8ce76c11dee1f5";
|
||
|
bytes memory tornadoRelayerSoftwareSourceContenthash =
|
||
|
hex"e3010170122067e3626e5999eccfbe9ad14db95a40bd1c32305f580f37eb3f2c9535026aa7d9";
|
||
|
bytes memory docsSourceContenthash = hex"e30101701220a02b6c5846715cae70d0f7a7df09cbc929b5af97d38dd130ffd44aa0adf21daa";
|
||
|
bytes memory docsSiteContenthash = hex"e30101701220615111f92c8087a46a397f77046d8c0eed57b27fbb9221e4d270307f0fb317a4";
|
||
|
|
||
|
// Set IPFS Cids in ENS subdomain contenthashes
|
||
|
ensResolver.setContenthash(sourcesDomainNode, downloadInstructionsHtmlContenthash);
|
||
|
ensResolver.setContenthash(downloadScriptSourceDomainNode, downloadScriptSourceContenthash);
|
||
|
ensResolver.setContenthash(relayerSoftwareSourceNode, tornadoRelayerSoftwareSourceContenthash);
|
||
|
ensResolver.setContenthash(docsSourceDomainNode, docsSourceContenthash);
|
||
|
ensResolver.setContenthash(relayersUISourceDomainNode, relayersUiSourceContenthash);
|
||
|
ensResolver.setContenthash(relayersUiSiteDomainNode, relayersUiSiteContenthash);
|
||
|
ensResolver.setContenthash(relayersUiSiteOldDomainNode, relayersUiSiteContenthash);
|
||
|
ensResolver.setContenthash(ipfsHostHelpScriptSourceDomainNode, ipfsHostHelpScriptSourceContenthash);
|
||
|
ensResolver.setContenthash(docsDomainNode, docsSiteContenthash);
|
||
|
}
|
||
|
}
|