Skip to content

Commit 6c241a6

Browse files
update viem and remove nonce overrides
1 parent dbe9a24 commit 6c241a6

4 files changed

Lines changed: 134 additions & 112 deletions

File tree

deploy/00_register_legacy.ts

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
419419

420420
const commitTxHash = await controller.write.commit([commitment], {
421421
account: registrant,
422-
nonce: nonce + index,
422+
// nonce: nonce + index,
423423
})
424424
console.log(`Commiting commitment for ${label}.eth (tx: ${commitTxHash})...`)
425425

@@ -439,7 +439,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
439439
{
440440
account: registrant,
441441
value: price,
442-
nonce: nonce + index,
442+
// nonce: nonce + index,
443443
},
444444
)
445445
console.log(`Registering name ${label}.eth (tx: ${registerTxHash})...`)
@@ -463,7 +463,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
463463
for (const { key, value } of records.text) {
464464
const setTextHash = await publicResolver.write.setText([hash, key, value], {
465465
account: registrant,
466-
nonce: nonceRef,
466+
// nonce: nonceRef,
467467
})
468468
console.log(` - ${key} ${value} (tx: ${setTextHash})...`)
469469
nonceRef += 1
@@ -474,7 +474,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
474474
for (const { key, value } of records.addr) {
475475
const setAddrHash = await publicResolver.write.setAddr([hash, key, value], {
476476
account: registrant,
477-
nonce: nonceRef,
477+
// nonce: nonceRef,
478478
})
479479
console.log(` - ${key} ${value} (tx: ${setAddrHash})...`)
480480
nonceRef += 1
@@ -484,7 +484,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
484484
console.log('CONTENTHASH')
485485
const setContenthashHash = await publicResolver.write.setContenthash(
486486
[hash, records.contenthash],
487-
{ account: registrant, nonce: nonceRef },
487+
{
488+
account: registrant,
489+
// nonce: nonceRef
490+
},
488491
)
489492
console.log(` - ${records.contenthash} (tx: ${setContenthashHash})...`)
490493
nonceRef += 1
@@ -501,7 +504,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
501504
else data_ = stringToBytes(data)
502505
const setAbiHash = await publicResolver.write.setABI(
503506
[hash, contentType, bytesToHex(data_)],
504-
{ account: registrant, nonce: nonceRef },
507+
{
508+
account: registrant,
509+
// nonce: nonceRef
510+
},
505511
)
506512
console.log(` - ${records.abi} (tx: ${setAbiHash})...`)
507513
nonceRef += 1
@@ -524,7 +530,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
524530
[namehash(`${label}.eth`), labelhash(subnameLabel), subOwner.address, resolver, 0n],
525531
{
526532
account: registrant,
527-
nonce: nonce + index + i,
533+
// nonce: nonce + index + i,
528534
},
529535
)
530536
console.log(`Creating subname ${subnameLabel}.${label}.eth (tx: ${subnameTxHash})...`)
@@ -539,7 +545,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
539545
[namehash(`${label}.eth`), owner!.address],
540546
{
541547
account: registrant,
542-
nonce: nonce + index,
548+
// nonce: nonce + index,
543549
},
544550
)
545551
console.log(`Setting controller for ${label}.eth to ${owner} (tx: ${setControllerTxHash})...`)
@@ -557,8 +563,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
557563
) => {
558564
const newNonceMap = nonceMap || {}
559565
for (const client of Object.values(allNamedClients)) {
560-
const account = client.account
561-
const address = account.address
566+
const { account } = client
567+
const { address } = account
562568
const namesWithAccount = allNameData.filter((data) => {
563569
const propertyValue = data[property]
564570
if (typeof propertyValue === 'string') {

deploy/00_register_wrapped.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
193193
async ({ owner, name, ...rest }: ProcessedNameData, index: number) => {
194194
const commitment = generateCommitment({ owner: owner.address, name, ...rest })
195195
const commitTxHash = await controller.write.commit([commitment], {
196-
nonce: nonce + index,
196+
// nonce: nonce + index,
197197
account: owner,
198198
})
199199
console.log(`Commiting commitment for ${name} (tx: ${commitTxHash})...`)
@@ -209,7 +209,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
209209
{
210210
account: owner,
211211
value: price,
212-
nonce: nonce + index,
212+
// nonce: nonce + index,
213213
},
214214
)
215215
console.log(`Registering name ${name} (tx: ${registerTxHash})...`)
@@ -225,7 +225,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
225225
[namehash(name), label, subOwner.address, fuses, BigInt(expiry)],
226226
{
227227
account: owner,
228-
nonce: nonce + index + i,
228+
// nonce: nonce + index + i,
229229
},
230230
)
231231
console.log(`Creating subname ${label}.${name} (tx: ${subnameTxHash})...`)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"tinyglobby": "^0.2.6",
100100
"ts-pattern": "^4.3.0",
101101
"use-immer": "^0.7.0",
102-
"viem": "2.19.4",
102+
"viem": "2.29.1",
103103
"wagmi": "2.12.4"
104104
},
105105
"peerDependencies": {

0 commit comments

Comments
 (0)