Compare commits
5 Commits
0cff07f2e7
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| eaeb72357d | |||
| 45dcb16c89 | |||
| 322b463917 | |||
| b7ea254974 | |||
| 79c5bbbbc7 |
14
README.md
14
README.md
@@ -2,21 +2,21 @@
|
||||
|
||||
### Changes / effect description
|
||||
|
||||
- Change owner of ENS domains [staking-rewards.contract.tornadocash.eth](https://app.ens.domains/staking-rewards.contract.tornadocash.eth) and [contract.tornadocash.eth](https://app.ens.domains/contract.tornadocash.eth) to Tornado Cash Governance
|
||||
- Change address on staking-rewards.contract.tornadocash.eth to new staking address (has been changed in [proposal 22](https://tornado.ws/governance/22))
|
||||
- Change owner of ENS domains [staking-rewards.contract.tornadocash.eth](https://app.ens.domains/staking-rewards.contract.tornadocash.eth), [governance-impl.contract.tornadocash.eth](https://app.ens.domains/governance-impl.contract.tornadocash.eth) and [contract.tornadocash.eth](https://app.ens.domains/contract.tornadocash.eth) to Tornado Cash Governance
|
||||
- Change address on staking-rewards.contract.tornadocash.eth and governance-impl.contract.tornadocash.eth to new addresses (has been changed in [proposal 22](https://tornado.ws/governance/22))
|
||||
- Update IPFS content hashes on ENS domains for docs (docs.tornadocash.eth), Classic UI (tornadocash.eth), Nova UI (nova.tornadocash.eth) and relayers UI (relayers-network.tornadocash.eth)
|
||||
|
||||
### Requirements
|
||||
|
||||
- Rust ([Need only for Windows](https://doc.rust-lang.org/cargo/getting-started/installation.html))
|
||||
- Foundryup ([Windows](https://github.com/altugbakan/foundryup-windows), [Linux](https://book.getfoundry.sh/getting-started/installation))
|
||||
- Node 20 or higher ([Windows](https://github.com/coreybutler/nvm-windows), [Linux](https://github.com/nvm-sh/nvm))
|
||||
- Node 14 or higher ([Windows](https://github.com/coreybutler/nvm-windows), [Linux](https://github.com/nvm-sh/nvm))
|
||||
|
||||
### Installation
|
||||
|
||||
```text
|
||||
git clone --recurse-submodules https://git.tornado.ws/Theo/proposal-27-update-ipfs.git
|
||||
cd proposal-27-update-ipfs
|
||||
git clone --recurse-submodules https://git.tornado.ws/Theo/proposal-29-update-ipfs.git
|
||||
cd proposal-29-update-ipfs
|
||||
npm install
|
||||
npm run init
|
||||
```
|
||||
@@ -35,7 +35,9 @@ npm run test:linux
|
||||
|
||||
### Contracts
|
||||
|
||||
Proposal deployed contract: [etherscan link](https://etherscan.io/address/0x86d5f637f7cc0e55334439d0495de3b7daa62baa#code)
|
||||
Proposal deployed contract: [0xaF0AbcF236D495AEfDA9f9e1DF5bECE0D132da66](https://etherscan.io/address/0xaf0abcf236d495aefda9f9e1df5bece0d132da66#code)
|
||||
|
||||
Goerli test contract: [0x0b70c06d7a4D52cbE9CC4C9FCb4Df2B024F4fFd8](https://goerli.etherscan.io/address/0x0b70c06d7a4d52cbe9cc4c9fcb4df2b024f4ffd8#code)
|
||||
|
||||
### Verification
|
||||
|
||||
|
||||
@@ -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,9 +1,11 @@
|
||||
bytes32 rootTornadoENSNode = 0xe6ae31d630cc7a8279c0f1c7cbe6e7064814c47d1785fa2703d9ae511ee2be0c;
|
||||
bytes32 tornadoContractENSNode = 0xe7e1d618367ebadd8e172150a43cfc839fd19022c2be81a6e8d45e06aa1011cd;
|
||||
bytes32 stakingRewardsENSNode = 0x3da4b79cd8c20d2fafb1c7cb37a62be8668f543393f6636d421fba0be735e68f;
|
||||
bytes32 governanceImplENSNode = 0x092359a5505072470ce8b86eebed5b4b6f001fe6bd08dbcf723c97073a360cfc;
|
||||
bytes32 novaENSNode = 0xc3964c598b56aeaee4c253283fb1ebb12510b95db00960589cdc62807a2537a0;
|
||||
bytes32 docsENSNode = 0xd7b8aac14a9b2507ab99b5fde3060197fddb9735afa9bf38b1f7e34923cb935e;
|
||||
bytes32 relayersUIENSNode = 0x4e37047f2c961db41dfb7d38cf79ca745faf134a8392cfb834d3a93330b9108d;
|
||||
|
||||
bytes32 tornadoContractENSLabelhash = 0x7f6dd79f0020bee2024a097aaa5d32ab7ca31126fa375538de047e7475fa8572;
|
||||
bytes32 stakingRewardsENSLabelhash = 0x15826fcf9999635849b273bcd226f436dc42a8fabf43049b60971ab51d8d6b8f;
|
||||
bytes32 governanceImplENSLabelhash = 0x6583a22765d3d6a6ca97b21440f79fecaf21bb8bcaa4fb694483e63d821ba50d;
|
||||
|
||||
@@ -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";
|
||||
|
||||
Submodule lib/forge-std updated: 75f1746c94...c4aaed668a
@@ -8,6 +8,7 @@ import { DeclCalculator } from "./utils";
|
||||
|
||||
const rootTornadoDomain = "tornadocash.eth";
|
||||
const stakingDomain = "staking-rewards.contract.tornadocash.eth";
|
||||
const governanceImplDomain = "governance-impl.contract.tornadocash.eth";
|
||||
const novaUIDomain = "nova.tornadocash.eth";
|
||||
const docsDomain = "docs.tornadocash.eth";
|
||||
const relayersUIDomain = "relayers-network.tornadocash.eth";
|
||||
@@ -16,6 +17,7 @@ const tornadoContractDomain = "contract.tornadocash.eth";
|
||||
const rootTornadoENSNode = hash(rootTornadoDomain);
|
||||
const tornadoContractENSNode = hash(tornadoContractDomain);
|
||||
const stakingRewardsENSNode = hash(stakingDomain);
|
||||
const governanceImplENSNode = hash(governanceImplDomain);
|
||||
const novaENSNode = hash(novaUIDomain);
|
||||
const docsENSNode = hash(docsDomain);
|
||||
const relayersUIENSNode = hash(relayersUIDomain);
|
||||
@@ -23,17 +25,20 @@ const relayersUIENSNode = hash(relayersUIDomain);
|
||||
const getLabelhashFromDomain = (ensDomain: string) => "0x" + keccak_256(ensDomain.split(".")[0]);
|
||||
const tornadoContractENSLabelhash = getLabelhashFromDomain(tornadoContractDomain);
|
||||
const stakingRewardsENSLabelhash = getLabelhashFromDomain(stakingDomain);
|
||||
const governanceImplENSLabelhash = getLabelhashFromDomain(governanceImplDomain);
|
||||
|
||||
const { calculateDecl } = new DeclCalculator("bytes32");
|
||||
const solidityCode =
|
||||
calculateDecl({ rootTornadoENSNode }) +
|
||||
calculateDecl({ tornadoContractENSNode }) +
|
||||
calculateDecl({ stakingRewardsENSNode }) +
|
||||
calculateDecl({ governanceImplENSNode }) +
|
||||
calculateDecl({ novaENSNode }) +
|
||||
calculateDecl({ docsENSNode }) +
|
||||
calculateDecl({ relayersUIENSNode }) +
|
||||
"\n" +
|
||||
calculateDecl({ tornadoContractENSLabelhash }) +
|
||||
calculateDecl({ stakingRewardsENSLabelhash });
|
||||
calculateDecl({ stakingRewardsENSLabelhash }) +
|
||||
calculateDecl({ governanceImplENSLabelhash });
|
||||
|
||||
fs.writeFileSync(path.join("data", "ensNodesDeclarations.txt"), solidityCode);
|
||||
|
||||
@@ -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
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";
|
||||
@@ -12,6 +12,7 @@ contract UpdateENSDataProposal is TornadoAddresses {
|
||||
function executeProposal() public {
|
||||
address ensResolverAddress = 0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41;
|
||||
address ensRegistryAddress = 0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e;
|
||||
address governanceImplementationAddress = 0xBa178126C28F50Ee60322a82f5EbCd6b3711e101;
|
||||
|
||||
IENSRegistry ensRegistry = IENSRegistry(ensRegistryAddress);
|
||||
IENSResolver ensResolver = IENSResolver(ensResolverAddress);
|
||||
@@ -20,25 +21,31 @@ contract UpdateENSDataProposal is TornadoAddresses {
|
||||
bytes32 rootTornadoENSNode = 0xe6ae31d630cc7a8279c0f1c7cbe6e7064814c47d1785fa2703d9ae511ee2be0c;
|
||||
bytes32 tornadoContractENSNode = 0xe7e1d618367ebadd8e172150a43cfc839fd19022c2be81a6e8d45e06aa1011cd;
|
||||
bytes32 stakingRewardsENSNode = 0x3da4b79cd8c20d2fafb1c7cb37a62be8668f543393f6636d421fba0be735e68f;
|
||||
bytes32 governanceImplENSNode = 0x092359a5505072470ce8b86eebed5b4b6f001fe6bd08dbcf723c97073a360cfc;
|
||||
bytes32 novaENSNode = 0xc3964c598b56aeaee4c253283fb1ebb12510b95db00960589cdc62807a2537a0;
|
||||
bytes32 docsENSNode = 0xd7b8aac14a9b2507ab99b5fde3060197fddb9735afa9bf38b1f7e34923cb935e;
|
||||
bytes32 relayersUIENSNode = 0x4e37047f2c961db41dfb7d38cf79ca745faf134a8392cfb834d3a93330b9108d;
|
||||
|
||||
bytes32 tornadoContractENSLabelhash = 0x7f6dd79f0020bee2024a097aaa5d32ab7ca31126fa375538de047e7475fa8572;
|
||||
bytes32 stakingRewardsENSLabelhash = 0x15826fcf9999635849b273bcd226f436dc42a8fabf43049b60971ab51d8d6b8f;
|
||||
bytes32 governanceImplENSLabelhash = 0x6583a22765d3d6a6ca97b21440f79fecaf21bb8bcaa4fb694483e63d821ba50d;
|
||||
|
||||
// At first change owner of subdomain contract.tornadocash.eth and then staking-rewards.contract.tornadocash.eth to Governance
|
||||
// At first change owner of subdomain contract.tornadocash.eth and then staking-rewards.contract.tornadocash.eth
|
||||
// and governance-impl.contract.tornadocash.eth to Governance
|
||||
ensRegistry.setSubnodeOwner(rootTornadoENSNode, tornadoContractENSLabelhash, governanceAddress);
|
||||
ensRegistry.setSubnodeOwner(tornadoContractENSNode, stakingRewardsENSLabelhash, governanceAddress);
|
||||
ensRegistry.setSubnodeOwner(tornadoContractENSNode, governanceImplENSLabelhash, governanceAddress);
|
||||
|
||||
// Update staking address, that has been changed in proposal 22: https://tornado.ws/governance/22
|
||||
ensResolver.setAddr(stakingRewardsENSNode, stakingAddress);
|
||||
// Update Governance implementation (logic) address on ENS, that has been changed in proposal 22: https://tornado.ws/governance/22
|
||||
ensResolver.setAddr(governanceImplENSNode, governanceImplementationAddress);
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
@@ -6,15 +6,32 @@ import { UpdateENSDataProposal } from "@root/UpdateENSDataProposal.sol";
|
||||
|
||||
import { console2 } from "@forge-std/console2.sol";
|
||||
import { IENSResolver } from "@interfaces/IENSResolver.sol";
|
||||
import { IENSRegistry } from "@interfaces/IENSRegistry.sol";
|
||||
|
||||
import { ENSNamehash } from "./ENSNamehash.sol";
|
||||
|
||||
contract TestExampleProposal is ProposalUtils {
|
||||
IENSResolver ensResolver = IENSResolver(0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41);
|
||||
using ENSNamehash for bytes;
|
||||
|
||||
IENSResolver internal ensResolver = IENSResolver(0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41);
|
||||
IENSRegistry ensRegistry = IENSRegistry(ENSAddress);
|
||||
string internal tornadoContractENSDomain = "contract.tornadocash.eth";
|
||||
string internal governanceImplementationENSDomain = "governance-impl.contract.tornadocash.eth";
|
||||
string internal stakingRewardsENSDomain = "staking-rewards.contract.tornadocash.eth";
|
||||
|
||||
bytes32 internal tornadoContractsENSNode = calculateDomainNode(tornadoContractENSDomain);
|
||||
bytes32 internal stakingRewardsENSNode = calculateDomainNode(stakingRewardsENSDomain);
|
||||
bytes32 internal governanceImplENSNode = calculateDomainNode(governanceImplementationENSDomain);
|
||||
|
||||
modifier executeCurrentProposalBefore() {
|
||||
createAndExecuteProposal();
|
||||
_;
|
||||
}
|
||||
|
||||
function calculateDomainNode(string memory domain) internal pure returns (bytes32) {
|
||||
return ENSNamehash.namehash(bytes(domain));
|
||||
}
|
||||
|
||||
function createAndExecuteProposal() public {
|
||||
address proposalAddress = address(new UpdateENSDataProposal());
|
||||
|
||||
@@ -22,10 +39,33 @@ contract TestExampleProposal is ProposalUtils {
|
||||
}
|
||||
|
||||
function testStakingAddressChanged() public executeCurrentProposalBefore {
|
||||
bytes32 stakingRewardsENSNode = 0x3da4b79cd8c20d2fafb1c7cb37a62be8668f543393f6636d421fba0be735e68f;
|
||||
address stakingAddressAfterProposal = ensResolver.addr(stakingRewardsENSNode);
|
||||
|
||||
console2.log("Address on staking ENS Tornado subdomain (staking-rewards.contract.tornadocash.eth): %s", stakingAddressAfterProposal);
|
||||
require(stakingAddressAfterProposal == stakingAddress);
|
||||
}
|
||||
|
||||
function testGovernanceImplAddressChanged() public executeCurrentProposalBefore {
|
||||
address expectedGovernanceImplAddress = 0xBa178126C28F50Ee60322a82f5EbCd6b3711e101;
|
||||
address governanceImplAddressAfterProposal = ensResolver.addr(governanceImplENSNode);
|
||||
|
||||
console2.log(
|
||||
"Address on governance implementation ENS Tornado subdomain (governance-impl.contract.tornadocash.eth): %s",
|
||||
governanceImplAddressAfterProposal
|
||||
);
|
||||
require(expectedGovernanceImplAddress == governanceImplAddressAfterProposal);
|
||||
}
|
||||
|
||||
function testENSSubdomainOwnerChanged() public executeCurrentProposalBefore {
|
||||
address tornadoContractsENSDomainOwner = ensRegistry.owner(tornadoContractsENSNode);
|
||||
address governanceImplENSNodeOwner = ensRegistry.owner(governanceImplENSNode);
|
||||
address stakingRewardsENSNodeOwner = ensRegistry.owner(stakingRewardsENSNode);
|
||||
|
||||
console2.log("Tornado contracts ENS domain owner after proposal execution: %s", tornadoContractsENSDomainOwner);
|
||||
console2.log("Staking rewards ENS domain owner after proposal execution: %s", stakingRewardsENSNodeOwner);
|
||||
console2.log("Governance implementation ENS domain owner after proposal execution: %s", governanceImplENSNodeOwner);
|
||||
require(stakingRewardsENSNodeOwner == governanceAddress, "Staking rewards ENS domain owner is not governance");
|
||||
require(tornadoContractsENSDomainOwner == governanceAddress, "Tornado contracts ENS domain owner is not governance");
|
||||
require(governanceImplENSNodeOwner == governanceAddress, "Governance implementation ENS domain owner is not governance");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user