Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump viem from 2.0.3 to 2.7.19 #1244

Merged
merged 2 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"reflect-metadata": "^0.2.1",
"rxjs": "^7.8.1",
"semver": "^7.6.0",
"viem": "^2.0.3",
"viem": "^2.7.19",
"winston": "^3.11.0",
"zod": "^3.22.4"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { IEncoder } from '@/__tests__/encoder-builder';
import { faker } from '@faker-js/faker';
import {
decodeAbiParameters,
encodeAbiParameters,
encodeEventTopics,
getAddress,
Expand Down Expand Up @@ -62,9 +63,13 @@ class TransactionAddedEventBuilder<T extends TransactionAddedEventArgs>
}

export function transactionAddedEventBuilder(): TransactionAddedEventBuilder<TransactionAddedEventArgs> {
const [checksummedTxHash] = decodeAbiParameters(
parseAbiParameters('bytes32 txHash'),
faker.string.hexadecimal({ length: 64 }) as Hex,
);
Comment on lines +66 to +69
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

viem now decodes hash topics "checksummed", e.g.

-     "txHash": "0x7Ee70E94FcaFC5CCBB57708C28ddFE8d2F4bfB501714E751Fb90Fdf4b68ef323",
+     "txHash": "0x7ee70e94fcafc5ccbb57708c28ddfe8d2f4bfb501714e751fb90fdf4b68ef323",

return new TransactionAddedEventBuilder()
.with('queueNonce', faker.number.bigInt())
.with('txHash', faker.string.hexadecimal({ length: 64 }) as Hex)
.with('txHash', checksummedTxHash)
.with('to', getAddress(faker.finance.ethereumAddress()))
.with('value', BigInt(0))
.with('data', '0x')
Expand Down
20 changes: 10 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2321,9 +2321,9 @@ __metadata:
languageName: node
linkType: hard

"abitype@npm:0.10.0":
version: 0.10.0
resolution: "abitype@npm:0.10.0"
"abitype@npm:1.0.0":
version: 1.0.0
resolution: "abitype@npm:1.0.0"
peerDependencies:
typescript: ">=5.0.4"
zod: ^3 >=3.22.0
Expand All @@ -2332,7 +2332,7 @@ __metadata:
optional: true
zod:
optional: true
checksum: e9faa33067f787e1cd41d9d2b3e058d4bc94bf97cf4e72a63a2cda4c3b248b8feb231524c9b78b3dd6da945bad9135eceb01217bba8d891da2a487d48016e1ed
checksum: 38c8d965c75c031854385f1c14da0410e271f1a8255332869a77a1ee836c4607420522c1f0077716c7ad7c4091f53c1b2681ed1d30b5161d1424fdb5a480f104
languageName: node
linkType: hard

Expand Down Expand Up @@ -7153,7 +7153,7 @@ __metadata:
ts-node: "npm:^10.9.2"
tsconfig-paths: "npm:4.2.0"
typescript: "npm:^5.3.3"
viem: "npm:^2.0.3"
viem: "npm:^2.7.19"
winston: "npm:^3.11.0"
zod: "npm:^3.22.4"
languageName: unknown
Expand Down Expand Up @@ -8157,24 +8157,24 @@ __metadata:
languageName: node
linkType: hard

"viem@npm:^2.0.3":
version: 2.0.3
resolution: "viem@npm:2.0.3"
"viem@npm:^2.7.19":
version: 2.7.19
resolution: "viem@npm:2.7.19"
dependencies:
"@adraffy/ens-normalize": "npm:1.10.0"
"@noble/curves": "npm:1.2.0"
"@noble/hashes": "npm:1.3.2"
"@scure/bip32": "npm:1.3.2"
"@scure/bip39": "npm:1.2.1"
abitype: "npm:0.10.0"
abitype: "npm:1.0.0"
isows: "npm:1.0.3"
ws: "npm:8.13.0"
peerDependencies:
typescript: ">=5.0.4"
peerDependenciesMeta:
typescript:
optional: true
checksum: 644aed2545695870c734fe8c786fea49335f858c98ea41d213149a6287e10b5fb5a4d3ffd978ba7f60c261c56536bcb86aca628d34d02ffc05c5c7c20853e78d
checksum: c3c95e5d67a57138980a3fa381fb019696cd71bcf183b1148ee37f9bed8b465907bd1701db0ee8856b6686095272f8cfb6f5654ed806f2c89d39dc75ddbd9f20
languageName: node
linkType: hard

Expand Down