Compare commits
No commits in common. "a468828000c52a7c45fe38886998dc2440405e2b" and "7be69e8f7fd65861c9634f6fcb821ad75540eee7" have entirely different histories.
a468828000
...
7be69e8f7f
@ -33,10 +33,6 @@ or
|
|||||||
npm run test:linux
|
npm run test:linux
|
||||||
```
|
```
|
||||||
|
|
||||||
### Contracts
|
|
||||||
|
|
||||||
Proposal deployed contract: [etherscan link](https://etherscan.io/address/0x86d5f637f7cc0e55334439d0495de3b7daa62baa#code)
|
|
||||||
|
|
||||||
### Verification
|
### Verification
|
||||||
|
|
||||||
Since the proposal code can be confusing because it relies on numerous specifications and EIPs, users can use scripts to verify the correctness of the data, see the output in the corresponding files, and insert the code directly into Solidity, comparing it with the existing code in the proposal (there should be no discrepancies be).
|
Since the proposal code can be confusing because it relies on numerous specifications and EIPs, users can use scripts to verify the correctness of the data, see the output in the corresponding files, and insert the code directly into Solidity, comparing it with the existing code in the proposal (there should be no discrepancies be).
|
||||||
|
@ -6,8 +6,4 @@ interface IENSRegistry {
|
|||||||
function setSubnodeOwner(bytes32 node, bytes32 label, address owner) external returns (bytes32);
|
function setSubnodeOwner(bytes32 node, bytes32 label, address owner) external returns (bytes32);
|
||||||
|
|
||||||
function setOwner(bytes32 node, address owner) external;
|
function setOwner(bytes32 node, address owner) external;
|
||||||
|
|
||||||
function owner(bytes32 node) external view returns (address);
|
|
||||||
|
|
||||||
function recordExists(bytes32 node) external view returns (bool);
|
|
||||||
}
|
}
|
||||||
|
@ -5,53 +5,23 @@ pragma solidity ^0.8.19;
|
|||||||
import { IENSResolver } from "@interfaces/IENSResolver.sol";
|
import { IENSResolver } from "@interfaces/IENSResolver.sol";
|
||||||
import { IENSRegistry } from "@interfaces/IENSRegistry.sol";
|
import { IENSRegistry } from "@interfaces/IENSRegistry.sol";
|
||||||
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
|
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
|
||||||
import { TornadoAddresses } from "@proprietary/TornadoAddresses.sol";
|
|
||||||
|
|
||||||
contract GoerliTestProposal is Ownable, TornadoAddresses {
|
contract GoerliTestProposal is Ownable {
|
||||||
address ensResolverAddress = 0xd7a4F6473f32aC2Af804B3686AE8F1932bC35750; // goerli ENS resolver
|
address ensResolverAddress = 0xd7a4F6473f32aC2Af804B3686AE8F1932bC35750; // goerli ENS resolver for testedy.eth
|
||||||
address ensRegistryAddress = 0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e;
|
address ensRegistryAddress = 0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e;
|
||||||
bytes32 testNode = 0xa8f2228d0331c20e8d36b0bf33b102b5b8d8d416db25502b04e5b854d7a5c556; // tornadotest.eth on Goerli
|
bytes32 testNode = 0x121818cfd40893900bebefa5ccf60544db43ba8fa1d2d56433984132883bee88; // test.testedy.eth
|
||||||
|
|
||||||
IENSResolver ensResolver = IENSResolver(ensResolverAddress);
|
function executeProposal() public onlyOwner {
|
||||||
IENSRegistry ensRegistry = IENSRegistry(ensRegistryAddress);
|
IENSResolver ensResolver = IENSResolver(ensResolverAddress);
|
||||||
|
|
||||||
function changeNode(bytes32 newNode) public onlyOwner {
|
|
||||||
require(ensRegistry.recordExists(newNode), "Node doesn't exist");
|
|
||||||
require(ensRegistry.owner(newNode) == address(this), "Contract is not an owner of new ENS name");
|
|
||||||
transferDomainOwnership(owner());
|
|
||||||
|
|
||||||
testNode = newNode;
|
|
||||||
}
|
|
||||||
|
|
||||||
function setClassicUiIpfs() public {
|
|
||||||
bytes memory classicUiIPFSContenthash = hex"e301017012208124caa06a8419371b1d2eab9180191727d1ce0c0832975362f77a679ce614b6";
|
bytes memory classicUiIPFSContenthash = hex"e301017012208124caa06a8419371b1d2eab9180191727d1ce0c0832975362f77a679ce614b6";
|
||||||
|
|
||||||
ensResolver.setContenthash(testNode, classicUiIPFSContenthash);
|
ensResolver.setContenthash(testNode, classicUiIPFSContenthash);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setNovaIpfs() public {
|
function returnDomainOwnership() public onlyOwner {
|
||||||
bytes memory novaUiIPFSContenthash = hex"e3010170122069648b09fb7ed9a89ca153a000bc8c1bf82a779195a640609e1510dc36c28bb7";
|
IENSRegistry ensRegistry = IENSRegistry(ensRegistryAddress);
|
||||||
|
|
||||||
ensResolver.setContenthash(testNode, novaUiIPFSContenthash);
|
ensRegistry.setOwner(testNode, owner());
|
||||||
}
|
|
||||||
|
|
||||||
function setRelayersNetworkIpfs() public {
|
|
||||||
bytes memory relayersUiIPFSContenthash = hex"e301017012203d61bed0641d7c53d5f036b6448f9d455ae6e0ceda44563009536a12e51d52cf";
|
|
||||||
|
|
||||||
ensResolver.setContenthash(testNode, relayersUiIPFSContenthash);
|
|
||||||
}
|
|
||||||
|
|
||||||
function setDocsIpfs() public {
|
|
||||||
bytes memory docsIPFSContenthash = hex"e3010170122008ba5879914413355290e3c8574825f7a09e59a9802a5fad1edfb3ce6a4f825b";
|
|
||||||
|
|
||||||
ensResolver.setContenthash(testNode, docsIPFSContenthash);
|
|
||||||
}
|
|
||||||
|
|
||||||
function setStakingAddress() public {
|
|
||||||
ensResolver.setAddr(testNode, stakingAddress);
|
|
||||||
}
|
|
||||||
|
|
||||||
function transferDomainOwnership(address to) public onlyOwner {
|
|
||||||
ensRegistry.setOwner(testNode, to);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user