diff --git a/deploy/00_deploy_bulk_renewal.ts b/deploy/00_deploy_bulk_renewal.ts index 7474f987d..a45cc116d 100644 --- a/deploy/00_deploy_bulk_renewal.ts +++ b/deploy/00_deploy_bulk_renewal.ts @@ -56,34 +56,31 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { await root.write.setSubnodeOwner([labelhash('eth')], owner) console.log('Set default resolver for eth tld to public resolver') - const tx111 = await registry.write.setResolver([namehash('eth'), resolver.address]) + await registry.write.setResolver([namehash('eth'), resolver.address]) console.log('Set interface implementor of eth tld for bulk renewal') - const tx2 = await resolver.write.setInterface([ + await resolver.write.setInterface([ namehash('eth'), createInterfaceId(bulkRenewal.abi), bulkRenewal.address, ]) console.log('Set interface implementor of eth tld for registrar controller') - const tx3 = await resolver.setInterface( + await resolver.write.setInterface([ namehash('eth'), createInterfaceId(controllerArtifact.abi), controller.address, - ) - await tx3.wait() + ]) console.log('Set interface implementor of eth tld for name wrapper') - const tx4 = await resolver.setInterface( + await resolver.write.setInterface([ namehash('eth'), createInterfaceId(wrapper.interface), wrapper.address, - ) - await tx4.wait() + ]) console.log('Set owner of eth tld back to registrar') - const tx11 = await root.setSubnodeOwner(labelhash('eth'), registrar.address) - await tx11.wait() + await root.write.setSubnodeOwner([labelhash('eth')], registrar.address) return true } diff --git a/deploy/00_get_registration_gas_values.ts b/deploy/00_get_registration_gas_values.ts index b8e98e60f..8906cb44c 100644 --- a/deploy/00_get_registration_gas_values.ts +++ b/deploy/00_get_registration_gas_values.ts @@ -3,11 +3,12 @@ /* eslint-disable no-await-in-loop */ import fs from 'fs/promises' -import { ethers } from 'hardhat' import { DeployFunction } from 'hardhat-deploy/types' import { HardhatRuntimeEnvironment } from 'hardhat/types' import { namehash } from 'viem' +import { getContract } from './utils/viem-hardhat' + const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { if (!hre.network.tags.generate) { return true @@ -15,8 +16,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { getUnnamedAccounts, network } = hre const allUnnamedAccts = await getUnnamedAccounts() - const controller = await ethers.getContract('ETHRegistrarController') - const publicResolver = await ethers.getContract('PublicResolver') + const controller = (await getContract(hre)('ETHRegistrarController'))! + const publicResolver = (await getContract(hre)('PublicResolver'))! let i = 0 let errored = false @@ -80,7 +81,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }: ReturnType>, index: number, ) => { - const commitment = await controller.makeCommitment( + const commitment = await controller.write.makeCommitment([ label, owner, duration, @@ -90,7 +91,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { reverseRecord, fuses, wrapperExpiry, - ) + ]) const _controller = controller.connect(await ethers.getSigner(owner)) const commitTx = await _controller.commit(commitment, { nonce: nonce + index }) @@ -115,7 +116,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { index: number, ) => { try { - const [price] = await controller.rentPrice(label, duration) + const [price] = await controller.read.rentPrice([label, duration]) const _controller = controller.connect(await ethers.getSigner(owner)) const estimatedTx = await _controller.estimateGas.register( diff --git a/deploy/00_register_legacy.ts b/deploy/00_register_legacy.ts index cc5b41d67..89b970b7f 100644 --- a/deploy/00_register_legacy.ts +++ b/deploy/00_register_legacy.ts @@ -430,7 +430,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { { label, registrant, secret, resolver, addr, duration }: ReturnType, index: number, ) => { - const price = await controller.read.rentPrice(label, duration) + const price = await controller.read.rentPrice([label, duration]) const _controller = controller.connect(await ethers.getSigner(registrant))