Skip to content

Commit

Permalink
Merge pull request #233 from Consensys/feat/add-missing-ownership-tra…
Browse files Browse the repository at this point in the history
…nsfer-script

feat: added missing script to transfer ETH node ownership to Linea Safe
  • Loading branch information
Julink-eth authored Aug 26, 2024
2 parents 3d38c2b + 70bcb8e commit bfaf8fe
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/linea-ens-contracts/scripts/transferOwnershipToSafe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ const contractsToTransfer = [
'PohVerifier',
]

const ETH_NODE =
'0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae'

async function main(hre: HardhatRuntimeEnvironment) {
const network = hre.network.name
const { deployer, owner } = await hre.getNamedAccounts()
Expand All @@ -41,6 +44,21 @@ async function main(hre: HardhatRuntimeEnvironment) {
throw 'Network not supported'
}

// Transfer eth node ownernship to safe
console.log('Transferring ETH node ownership to Linea Safe')
const ensRegistryDeployed = deployments['ENSRegistry']
const ensRegistry = new Contract(
ensRegistryDeployed.address,
ensRegistryDeployed.abi,
signer,
)

const tx = await ensRegistry.setOwner(ETH_NODE, lineaSafeAddr)
await tx.wait(1)

console.log(`ETH node ownership transferred to ${lineaSafeAddr}`)

console.log(`Transferring contracts's ownership to Linea Safe`)
for (const contractToTransfer of contractsToTransfer) {
const currentContract = deployments[contractToTransfer]
console.log(contractToTransfer)
Expand Down

0 comments on commit bfaf8fe

Please sign in to comment.