proposal-30-decentralize-so.../test/UpdateENSDataProposal.t.sol

38 lines
1.1 KiB
Solidity
Raw Normal View History

2023-07-28 15:43:53 +03:00
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import { ProposalUtils } from "./utils/ProposalUtils.sol";
import { UpdateENSDataProposal } from "@root/UpdateENSDataProposal.sol";
import { console2 } from "@forge-std/console2.sol";
import { IENSResolver } from "@interfaces/IENSResolver.sol";
2023-08-31 00:34:22 +03:00
import { IENSRegistry } from "@interfaces/IENSRegistry.sol";
import { ENSNamehash } from "./ENSNamehash.sol";
2023-07-28 15:43:53 +03:00
contract TestExampleProposal is ProposalUtils {
2023-08-31 00:34:22 +03:00
using ENSNamehash for bytes;
IENSResolver internal ensResolver = IENSResolver(0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41);
IENSRegistry ensRegistry = IENSRegistry(ENSAddress);
2023-07-28 15:43:53 +03:00
modifier executeCurrentProposalBefore() {
createAndExecuteProposal();
_;
}
2023-08-31 00:34:22 +03:00
function calculateDomainNode(string memory domain) internal pure returns (bytes32) {
return ENSNamehash.namehash(bytes(domain));
}
2023-07-28 15:43:53 +03:00
function createAndExecuteProposal() public {
address proposalAddress = address(new UpdateENSDataProposal());
proposeAndExecute(proposalAddress);
}
function test() public {
createAndExecuteProposal();
2023-08-31 00:34:22 +03:00
}
2023-07-28 15:43:53 +03:00
}