Skip to content

Commit

Permalink
Add transfer of ownership of UR to owner on deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
jefflau committed Jan 30, 2024
1 parent 29984e3 commit a056492
Showing 1 changed file with 6 additions and 1 deletion.
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

0 comments on commit a056492

Please sign in to comment.