Skip to content

Commit 1a01e69

Browse files
committed
misc cleanup
1 parent 27bdae5 commit 1a01e69

4 files changed

Lines changed: 9 additions & 19 deletions

File tree

contracts/src/common/IDedicatedResolver.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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;

contracts/test/fixtures/deployV1Fixture.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
import type {
2-
DefaultChainType,
3-
NetworkConnection,
4-
} from "hardhat/types/network";
1+
import type { NetworkConnection } from "hardhat/types/network";
52
import { labelhash, namehash } from "viem";
63
import { splitName } from "../utils/utils.js";
74
import { baseRegistrarImplementationArtifact } from "./ens-contracts/BaseRegistrarImplementation.js";
85
import { ensRegistryArtifact } from "./ens-contracts/ENSRegistry.js";
96
import { ownedResolverArtifact } from "./ens-contracts/OwnedResolver.js";
107
import { 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({

contracts/test/fixtures/deployV2Fixture.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import type {
2-
DefaultChainType,
3-
NetworkConnection,
4-
} from "hardhat/types/network";
1+
import type { NetworkConnection } from "hardhat/types/network";
52
import {
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([

contracts/test/resolver/DedicatedResolver.t.sol

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)