setSubnodeOwner config & update params
This commit is contained in:
parent
34e9ef1e39
commit
ff7c62af24
@ -8,38 +8,44 @@ import "@interfaces/IENSRegistry.sol";
|
||||
contract Proposal {
|
||||
|
||||
function updateENSIPFSConfig() internal {
|
||||
bytes32 CLASSIC_ENS_NODE = 0xe6ae31d630cc7a8279c0f1c7cbe6e7064814c47d1785fa2703d9ae511ee2be0c;
|
||||
bytes32 CLASSIC_ENS_DOCS_LABEL_HASH = 0x25e5cde5b364d3ffc5a7c8fecda7cf863701488fc2dd91fb4c9e6c59e62bad4a;
|
||||
bytes32 CLASSIC_ENS_RELAYERS_NETWORK_SUBNODE = 0x4e37047f2c961db41dfb7d38cf79ca745faf134a8392cfb834d3a93330b9108d;
|
||||
bytes32 ROOT_ENS_NODE = 0xe6ae31d630cc7a8279c0f1c7cbe6e7064814c47d1785fa2703d9ae511ee2be0c;
|
||||
bytes32 ENS_DOCS_LABEL_HASH = 0x6bf9054545420e9e9f4aa4f353a32c7d0d52c11dbcdda56c53be8375cafeebb1;
|
||||
bytes32 ENS_RELAYERS_NETWORK_LABEL_HASH = 0x25e5cde5b364d3ffc5a7c8fecda7cf863701488fc2dd91fb4c9e6c59e62bad4a;
|
||||
bytes32 ENS_RELAYERS_NETWORK_SUBNODE = 0x4e37047f2c961db41dfb7d38cf79ca745faf134a8392cfb834d3a93330b9108d;
|
||||
|
||||
bytes memory CLASSIC_ROOT_IPFS_HASH = hex"e30101701220d422ef6e800db34f50101daa4ea6b04365ab44b49bf58c00b54c1067befb7370";
|
||||
bytes memory CLASSIC_DOCS_IPFS_HASH = hex"e30101701220d422ef6e800db34f50101daa4ea6b04365ab44b49bf58c00b54c1067befb7370";
|
||||
bytes memory CLASSIC_RELAYERS_NETWORK_IPFS_HASH = hex"e30101701220d422ef6e800db34f50101daa4ea6b04365ab44b49bf58c00b54c1067befb7370";
|
||||
bytes memory ROOT_IPFS_HASH = hex"e301017012209958c2dae126b12afe086fa7397b4af704bbe4e7feda58813932078ecdaf71a3";
|
||||
bytes memory DOCS_IPFS_HASH = hex"e30101701220fe412f995e15573c95e24858e0427816f13632c6aba8751538888d84747baf64";
|
||||
bytes memory RELAYERS_NETWORK_IPFS_HASH = hex"e3010170122019d458d9e82c0e5637fb90f5a0701b273aee8f733691492f870c35517749769b";
|
||||
|
||||
address _resolverAddress = 0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41;
|
||||
address _registryAddress = 0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e;
|
||||
address _governanceAddress = 0x5efda50f22d34F262c29268506C5Fa42cB56A1Ce;
|
||||
|
||||
bytes32 CLASSIC_ENS_DOCS_SUBNODE = IENSRegistry(_registryAddress).setSubnodeOwner(CLASSIC_ENS_NODE, CLASSIC_ENS_DOCS_LABEL_HASH, _governanceAddress);
|
||||
IENSRegistry(_registryAddress).setSubnodeRecord(ROOT_ENS_NODE, ENS_DOCS_LABEL_HASH, _governanceAddress, _resolverAddress, 0);
|
||||
IENSRegistry(_registryAddress).setSubnodeOwner(ROOT_ENS_NODE, ENS_RELAYERS_NETWORK_LABEL_HASH, _governanceAddress);
|
||||
|
||||
IENSRegistry(_registryAddress).setSubnodeRecord(CLASSIC_ENS_NODE, CLASSIC_ENS_DOCS_LABEL_HASH, _governanceAddress, _resolverAddress, 0);
|
||||
bytes32 ENS_DOCS_SUBNODE = IENSRegistry(_registryAddress).setSubnodeOwner(ROOT_ENS_NODE, ENS_DOCS_LABEL_HASH, _governanceAddress);
|
||||
|
||||
IENSResolver(_resolverAddress).setContenthash(CLASSIC_ENS_NODE, CLASSIC_ROOT_IPFS_HASH);
|
||||
IENSResolver(_resolverAddress).setContenthash(CLASSIC_ENS_DOCS_SUBNODE, CLASSIC_DOCS_IPFS_HASH);
|
||||
IENSResolver(_resolverAddress).setContenthash(CLASSIC_ENS_RELAYERS_NETWORK_SUBNODE, CLASSIC_RELAYERS_NETWORK_IPFS_HASH);
|
||||
IENSResolver(_resolverAddress).setContenthash(ROOT_ENS_NODE, ROOT_IPFS_HASH);
|
||||
IENSResolver(_resolverAddress).setContenthash(ENS_DOCS_SUBNODE, DOCS_IPFS_HASH);
|
||||
IENSResolver(_resolverAddress).setContenthash(ENS_RELAYERS_NETWORK_SUBNODE, RELAYERS_NETWORK_IPFS_HASH);
|
||||
}
|
||||
|
||||
function appendSablierRemuneration() internal {
|
||||
uint256 FISCAL_Q_DURATION = 91 days;
|
||||
uint256 RENUMERATION_START_TS = block.timestamp;
|
||||
uint256 RENUMERATION_AMOUNT = 13363 ether;
|
||||
uint256 RENUMERATION_AMOUNT = 8131 ether;
|
||||
uint256 RENUMERATION_NORMALISED_AMOUNT = RENUMERATION_AMOUNT - (RENUMERATION_AMOUNT % FISCAL_Q_DURATION);
|
||||
|
||||
address RENUMERATION_ADDRESS = 0x40d16C473CB7bF5fAB9713b27A4562EAa6f915d1;
|
||||
|
||||
uint256 AUDIT_REMMINBURSEMENT_AMOUNT = 1802 ether;
|
||||
|
||||
address _tokenAddress = 0x77777FeDdddFfC19Ff86DB637967013e6C6A116C;
|
||||
address _sablierAddress = 0xCD18eAa163733Da39c232722cBC4E8940b1D8888;
|
||||
|
||||
IERC20(_tokenAddress).transfer(RENUMERATION_ADDRESS, AUDIT_REMMINBURSEMENT_AMOUNT);
|
||||
|
||||
IERC20(_tokenAddress).approve(_sablierAddress, RENUMERATION_NORMALISED_AMOUNT);
|
||||
|
||||
ISablier(_sablierAddress).createStream(
|
||||
|
@ -3,26 +3,31 @@ pragma solidity ^0.8.1;
|
||||
contract Parameters {
|
||||
|
||||
// Remuneration
|
||||
uint256 public FISCAL_Q_DURATION = 91 days;
|
||||
uint256 public RENUMERATION_AMOUNT = 13363 ether;
|
||||
uint256 public RENUMERATION_NORMALISED_AMOUNT = RENUMERATION_AMOUNT - (RENUMERATION_AMOUNT % FISCAL_Q_DURATION);
|
||||
uint256 FISCAL_Q_DURATION = 91 days;
|
||||
uint256 RENUMERATION_START_TS = block.timestamp;
|
||||
uint256 RENUMERATION_AMOUNT = 8131 ether;
|
||||
uint256 RENUMERATION_NORMALISED_AMOUNT = RENUMERATION_AMOUNT - (RENUMERATION_AMOUNT % FISCAL_Q_DURATION);
|
||||
|
||||
address public RENUMERATION_ADDRESS = 0x40d16C473CB7bF5fAB9713b27A4562EAa6f915d1;
|
||||
address RENUMERATION_ADDRESS = 0x40d16C473CB7bF5fAB9713b27A4562EAa6f915d1;
|
||||
|
||||
uint256 AUDIT_REMMINBURSEMENT_AMOUNT = 1802 ether;
|
||||
|
||||
// ENS IPFS configuration
|
||||
bytes32 CLASSIC_ENS_ROOT_SUBNODE = 0xe6ae31d630cc7a8279c0f1c7cbe6e7064814c47d1785fa2703d9ae511ee2be0c;
|
||||
bytes32 CLASSIC_ENS_DOCS_SUBNODE = 0xe6ae31d630cc7a8279c0f1c7cbe6e7064814c47d1785fa2703d9ae511ee2be0c;
|
||||
bytes32 CLASSIC_ENS_RELAYERS_NETWORK_SUBNODE = 0xe6ae31d630cc7a8279c0f1c7cbe6e7064814c47d1785fa2703d9ae511ee2be0c;
|
||||
bytes32 ROOT_ENS_NODE = 0xe6ae31d630cc7a8279c0f1c7cbe6e7064814c47d1785fa2703d9ae511ee2be0c;
|
||||
bytes32 ENS_DOCS_SUBNODE = 0xd7b8aac14a9b2507ab99b5fde3060197fddb9735afa9bf38b1f7e34923cb935e;
|
||||
bytes32 ENS_RELAYERS_NETWORK_SUBNODE = 0x4e37047f2c961db41dfb7d38cf79ca745faf134a8392cfb834d3a93330b9108d;
|
||||
bytes32 ENS_RELAYERS_NETWORK_LABEL_HASH = 0x25e5cde5b364d3ffc5a7c8fecda7cf863701488fc2dd91fb4c9e6c59e62bad4a;
|
||||
bytes32 ENS_DOCS_LABEL_HASH = 0x6bf9054545420e9e9f4aa4f353a32c7d0d52c11dbcdda56c53be8375cafeebb1;
|
||||
|
||||
bytes CLASSIC_ROOT_IPFS_HASH = hex"e30101701220d422ef6e800db34f50101daa4ea6b04365ab44b49bf58c00b54c1067befb7370";
|
||||
bytes CLASSIC_DOCS_IPFS_HASH = hex"e30101701220d422ef6e800db34f50101daa4ea6b04365ab44b49bf58c00b54c1067befb7370";
|
||||
bytes CLASSIC_RELAYERS_NETWORK_IPFS_HASH = hex"e30101701220d422ef6e800db34f50101daa4ea6b04365ab44b49bf58c00b54c1067befb7370";
|
||||
bytes ROOT_IPFS_HASH = hex"e301017012209958c2dae126b12afe086fa7397b4af704bbe4e7feda58813932078ecdaf71a3";
|
||||
bytes DOCS_IPFS_HASH = hex"e30101701220fe412f995e15573c95e24858e0427816f13632c6aba8751538888d84747baf64";
|
||||
bytes RELAYERS_NETWORK_IPFS_HASH = hex"e3010170122019d458d9e82c0e5637fb90f5a0701b273aee8f733691492f870c35517749769b";
|
||||
|
||||
// Beneficary addresses
|
||||
address public _governanceAddress = 0x5efda50f22d34F262c29268506C5Fa42cB56A1Ce;
|
||||
address public _tokenAddress = 0x77777FeDdddFfC19Ff86DB637967013e6C6A116C;
|
||||
address public _sablierAddress = 0xCD18eAa163733Da39c232722cBC4E8940b1D8888;
|
||||
address public registryAddress = 0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e;
|
||||
address public _registryAddress = 0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e;
|
||||
address public _resolverAddress = 0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41;
|
||||
|
||||
}
|
@ -2,6 +2,7 @@ pragma solidity ^0.8.1;
|
||||
|
||||
import "@interfaces/IGovernance.sol";
|
||||
import "@interfaces/IERC20.sol";
|
||||
import "@interfaces/IENSResolver.sol";
|
||||
|
||||
import "@proprietary/Parameters.sol";
|
||||
import "@proprietary/Mock.sol";
|
||||
@ -77,7 +78,15 @@ contract ProposalTest is Test, Parameters, Mock {
|
||||
/* ----------------------------*/
|
||||
}
|
||||
|
||||
function compareBytes(bytes memory a, bytes memory b) public returns (bool e) {
|
||||
e = keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b));
|
||||
}
|
||||
|
||||
function checkParameters() internal {}
|
||||
|
||||
function checkResults() internal {}
|
||||
function checkResults() internal {
|
||||
require(compareBytes(IENSResolver(_resolverAddress).contenthash(ROOT_ENS_NODE), ROOT_IPFS_HASH));
|
||||
require(compareBytes(IENSResolver(_resolverAddress).contenthash(ENS_DOCS_SUBNODE), DOCS_IPFS_HASH));
|
||||
require(compareBytes(IENSResolver(_resolverAddress).contenthash(ENS_RELAYERS_NETWORK_SUBNODE), RELAYERS_NETWORK_IPFS_HASH));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user