Skip to content

Commit

Permalink
Merge pull request #317 from ensdomains/deploy-holesky
Browse files Browse the repository at this point in the history
Deploy ENS to holesky
  • Loading branch information
jefflau authored Jan 30, 2024
2 parents 02c9e6b + a056492 commit 8d1c5fd
Show file tree
Hide file tree
Showing 36 changed files with 14,334 additions and 8 deletions.
22 changes: 15 additions & 7 deletions deploy/dnsregistrar/05_deploy_public_suffix_list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,20 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

await deploy('SimplePublicSuffixList', {
from: deployer,
gasLimit: 10000000,
args: [],
log: true,
})
const publicSuffixList = await ethers.getContract('SimplePublicSuffixList')
const psl = await ethers.getContract('SimplePublicSuffixList')
const listOwner = await psl.owner()

if (owner !== undefined && owner !== deployer && listOwner !== owner) {
console.log('Transferring ownership to owner account')
const tx = await psl.transferOwnership(owner)
console.log(`Transfer ownership (tx: ${tx.hash})...`)
await tx.wait()
}
const publicSuffixList = psl.connect(await ethers.getSigner(owner))

const suffixList = await (
await fetch('https://publicsuffix.org/list/public_suffix_list.dat')
Expand All @@ -28,19 +38,17 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
// Right now we're only going to support top-level, non-idna suffixes
suffixes = suffixes.filter((suffix) => suffix.match(/^[a-z0-9]+$/))
const txes = []
console.log('Starting suffix transactions')
for (let i = 0; i < suffixes.length; i += 100) {
const batch = suffixes.slice(i, i + 100).map((suffix) => encodeName(suffix))
txes.push(await publicSuffixList.addPublicSuffixes(batch))
const tx = await publicSuffixList.addPublicSuffixes(batch)
console.log(`Setting suffixes (tx: ${tx.hash})...`)
txes.push(tx)
}
console.log(
`Waiting on ${txes.length} suffix-setting transactions to complete...`,
)
await Promise.all(txes.map((tx) => tx.wait()))

if (owner !== undefined && owner !== deployer) {
console.log('Transferring ownership to owner account')
await publicSuffixList.transferOwnership(owner)
}
}

func.tags = ['SimplePublicSuffixList']
Expand Down
1 change: 1 addition & 0 deletions deploy/dnssec-oracle/00_deploy_algorithms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
}

func.tags = ['dnssec-algorithms']
func.dependencies = ['BaseRegistrarImplementation'] // not necessary but allows registrar to be deployed first

export default func
7 changes: 6 additions & 1 deletion deploy/utils/00_deploy_universal_resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { HardhatRuntimeEnvironment } from 'hardhat/types'
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { getNamedAccounts, deployments } = hre
const { deploy } = deployments
const { deployer } = await getNamedAccounts()
const { deployer, owner } = await getNamedAccounts()

const registry = await ethers.getContract('ENSRegistry')
const batchGatewayURLs = JSON.parse(process.env.BATCH_GATEWAY_URLS || '[]')
Expand All @@ -19,6 +19,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
args: [registry.address, batchGatewayURLs],
log: true,
})

const UR = await ethers.getContract('UniversalResolver')
const tx = await UR.transferOwnership(owner)
console.log(`Transfer ownership to ${owner} (tx: ${tx.hash})...`)
await tx.wait()
}

func.id = 'universal-resolver'
Expand Down
1 change: 1 addition & 0 deletions deployments/holesky/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
17000
8 changes: 8 additions & 0 deletions deployments/holesky/.migrations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"ens": 1706105273,
"root": 1706105283,
"setupRoot": 1706126500,
"legacy-resolver": 1706280881,
"legacy-controller": 1706280916,
"bulk-renewal": 1706281169
}
Loading

0 comments on commit 8d1c5fd

Please sign in to comment.