Skip to content

Commit 83b0a07

Browse files
authored
Merge branch 'main' into feature/bet-592-pre-migration-add-option-to-add-small-padding-to-expiries
2 parents 1bd2b5a + 70dc1af commit 83b0a07

4 files changed

Lines changed: 26 additions & 13 deletions

File tree

contracts/deploy/02_UnlockedMigrationController.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { artifacts, execute } from "@rocketh";
2-
import { ROLES } from "../script/deploy-constants.js";
2+
import { DEPLOYMENT_ROLES } from "../script/deploy-constants.js";
33

44
export default execute(
55
async ({ deploy, execute: write, get, namedAccounts: { deployer } }) => {
@@ -19,7 +19,10 @@ export default execute(
1919
await write(ethRegistry, {
2020
account: deployer,
2121
functionName: "grantRootRoles",
22-
args: [ROLES.REGISTRY.REGISTER_RESERVED, migrationController.address],
22+
args: [
23+
DEPLOYMENT_ROLES.MIGRATION_CONTROLLER_ROOT,
24+
migrationController.address,
25+
],
2326
});
2427
},
2528
{

contracts/deploy/04_LockedMigrationController.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { artifacts, execute } from "@rocketh";
2-
import { ROLES } from "../script/deploy-constants.js";
2+
import { DEPLOYMENT_ROLES } from "../script/deploy-constants.js";
33

44
export default execute(
55
async ({ deploy, execute: write, get, namedAccounts: { deployer } }) => {
@@ -31,7 +31,10 @@ export default execute(
3131
await write(ethRegistry, {
3232
account: deployer,
3333
functionName: "grantRootRoles",
34-
args: [ROLES.REGISTRY.REGISTER_RESERVED, migrationController.address],
34+
args: [
35+
DEPLOYMENT_ROLES.MIGRATION_CONTROLLER_ROOT,
36+
migrationController.address,
37+
],
3538
});
3639
},
3740
{

contracts/script/deploy-constants.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ export const ROLES = {
5656
ADMIN,
5757
} as const;
5858

59-
/** Role bitmaps for static deployment per README Static Deployment Permissions. */
59+
// Role bitmaps for static deployment per README Static Deployment Permissions.
6060
export const DEPLOYMENT_ROLES = {
61-
/** RootRegistry root: REGISTRAR✓✓, REGISTER_RESERVED✓✓, SET_PARENT✓✓, RENEW✓✓ */
61+
// RootRegistry root: REGISTRAR✓✓, REGISTER_RESERVED✓✓, SET_PARENT✓✓, RENEW✓✓
6262
ROOT_REGISTRY_ROOT:
6363
ROLES.REGISTRY.REGISTRAR |
6464
ROLES.ADMIN.REGISTRY.REGISTRAR |
@@ -68,24 +68,25 @@ export const DEPLOYMENT_ROLES = {
6868
ROLES.ADMIN.REGISTRY.SET_PARENT |
6969
ROLES.REGISTRY.RENEW |
7070
ROLES.ADMIN.REGISTRY.RENEW,
71-
/** .eth token: SET_SUBREGISTRY AR, SET_RESOLVER AR */
71+
// .eth token: SET_SUBREGISTRY AR, SET_RESOLVER AR
7272
ETH_TOKEN:
7373
ROLES.REGISTRY.SET_SUBREGISTRY |
7474
ROLES.ADMIN.REGISTRY.SET_SUBREGISTRY |
7575
ROLES.REGISTRY.SET_RESOLVER |
7676
ROLES.ADMIN.REGISTRY.SET_RESOLVER,
77-
/**
78-
* Full registry role bitmap for ReverseRegistry root, .reverse token, and .addr token.
79-
* Granting all roles is harmless; some (e.g. REGISTRAR) are root-only and don't apply to tokens.
80-
*/
77+
// Full registry role bitmap for ReverseRegistry root, .reverse token, and .addr token.
78+
// Granting all roles is harmless; some (e.g. REGISTRAR) are root-only and don't apply to tokens.
8179
REVERSE_AND_ADDR: FLAGS.ALL,
82-
/** ETHRegistry root deployer: REGISTRAR✓, REGISTER_RESERVED✓, SET_PARENT✓✓, RENEW✓ */
80+
// ETHRegistry root deployer: REGISTRAR✓, REGISTER_RESERVED✓, SET_PARENT✓✓, RENEW✓
8381
ETH_REGISTRY_ROOT:
8482
ROLES.ADMIN.REGISTRY.REGISTRAR |
8583
ROLES.ADMIN.REGISTRY.REGISTER_RESERVED |
8684
ROLES.REGISTRY.SET_PARENT |
8785
ROLES.ADMIN.REGISTRY.SET_PARENT |
8886
ROLES.ADMIN.REGISTRY.RENEW,
87+
// UnlockedMigrationController and LockedMigrationController
88+
// only need to register() pre-migrated reservations on ETHRegistry (see: "ENSv2 Migration Case Study")
89+
MIGRATION_CONTROLLER_ROOT: ROLES.REGISTRY.REGISTER_RESERVED,
8990
} as const;
9091

9192
// see: IPermissionedRegistry.sol

contracts/script/runDevnet.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,13 @@ process.once("uncaughtException", async (err) => {
4545

4646
console.log();
4747
console.log("Available Named Accounts:");
48-
console.table(env.accounts.map((x) => ({ Name: x.name, Address: x.address })));
48+
console.table(
49+
Object.values(env.namedAccounts).map((x) => ({
50+
Name: x.name,
51+
Address: x.address,
52+
Resolver: x.resolver.address,
53+
})),
54+
);
4955

5056
console.table(
5157
Object.entries(env.rocketh.deployments).map(([name, { address }]) => ({

0 commit comments

Comments
 (0)