File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ interface IDedicatedResolver {
99 error InvalidEVMAddress (bytes addressBytes );
1010
1111 /// @notice Set address for the coin type.
12- /// If coin type is EVM, require exactly 0 or 20 bytes.
12+ /// Reverts `InvalidEVMAddress` if coin type is EVM and address is not 0 or 20 bytes.
1313 /// @param coinType The coin type.
1414 /// @param addressBytes The address to set.
1515 function setAddr (uint256 coinType , bytes calldata addressBytes ) external ;
Original file line number Diff line number Diff line change 1- import type {
2- DefaultChainType ,
3- NetworkConnection ,
4- } from "hardhat/types/network" ;
1+ import type { NetworkConnection } from "hardhat/types/network" ;
52import { labelhash , namehash } from "viem" ;
63import { splitName } from "../utils/utils.js" ;
74import { baseRegistrarImplementationArtifact } from "./ens-contracts/BaseRegistrarImplementation.js" ;
85import { ensRegistryArtifact } from "./ens-contracts/ENSRegistry.js" ;
96import { ownedResolverArtifact } from "./ens-contracts/OwnedResolver.js" ;
107import { universalResolverArtifact } from "./ens-contracts/UniversalResolver.js" ;
118
12- export async function deployV1Fixture (
13- networkConnection : NetworkConnection < DefaultChainType > ,
9+ export async function deployV1Fixture < C extends NetworkConnection > (
10+ networkConnection : C ,
1411 enableCcipRead = false ,
1512) {
1613 const publicClient = await networkConnection . viem . getPublicClient ( {
Original file line number Diff line number Diff line change 1- import type {
2- DefaultChainType ,
3- NetworkConnection ,
4- } from "hardhat/types/network" ;
1+ import type { NetworkConnection } from "hardhat/types/network" ;
52import {
63 type Address ,
74 encodeFunctionData ,
@@ -48,10 +45,10 @@ export const ROLES = {
4845 OWNER : FLAGS ,
4946 ADMIN : mapFlags ( FLAGS , ( x ) => x << 128n ) ,
5047 ALL : ( 1n << 256n ) - 1n , // see: EnhancedAccessControl.sol
51- } as const ;
48+ } as const satisfies Flags ;
5249
53- export async function deployV2Fixture (
54- networkConnection : NetworkConnection < DefaultChainType > ,
50+ export async function deployV2Fixture < C extends NetworkConnection > (
51+ networkConnection : C ,
5552 enableCcipRead = false ,
5653) {
5754 const publicClient = await networkConnection . viem . getPublicClient ( {
@@ -107,8 +104,6 @@ export async function deployV2Fixture(
107104 } : {
108105 owner : Address ;
109106 salt ?: bigint ;
110- wildcard ?: boolean ;
111- findResolverAddress ?: Address ;
112107 } ) {
113108 const wallet = await networkConnection . viem . getWalletClient ( owner ) ;
114109 const hash = await verifiableFactory . write . deployProxy ( [
Original file line number Diff line number Diff line change @@ -60,18 +60,16 @@ contract DedicatedResolverTest is Test {
6060 DedicatedResolver.initialize,
6161 (owner)
6262 );
63- vm.startPrank (owner);
6463 resolver = DedicatedResolver (
6564 factory.deployProxy (
6665 address (resolverImpl),
6766 uint256 (keccak256 (initData)),
6867 initData
6968 )
7069 );
71- vm.stopPrank ();
7270 }
7371
74- function test_owner () external {
72+ function test_owner () external view {
7573 assertEq (resolver.owner (), owner);
7674 }
7775
You can’t perform that action at this time.
0 commit comments