From 2dc0dc259b4e2517b741fc069bbded1f05da74d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marin=20Petruni=C4=87?= Date: Thu, 7 Dec 2023 12:31:46 +0100 Subject: [PATCH 1/2] chore: add attribution for faster bytesToHex implementation --- packages/web3-validator/src/utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/web3-validator/src/utils.ts b/packages/web3-validator/src/utils.ts index 6be75256ce3..8f191866871 100644 --- a/packages/web3-validator/src/utils.ts +++ b/packages/web3-validator/src/utils.ts @@ -450,6 +450,7 @@ export function uint8ArrayToHexString(uint8Array: Uint8Array): string { } // for optimized technique for hex to bytes conversion +// many thanks to @noble/hashes and viem from where this implementation is taken <3 const charCodeMap = { zero: 48, nine: 57, From 0d9bd8b7d5ca96464af926a17554773970b7fbfb Mon Sep 17 00:00:00 2001 From: Junaid <86780488+jdevcs@users.noreply.github.com> Date: Tue, 12 Dec 2023 17:40:44 +0500 Subject: [PATCH 2/2] Update packages/web3-validator/src/utils.ts Co-authored-by: Muhammad Altabba <24407834+Muhammad-Altabba@users.noreply.github.com> --- packages/web3-validator/src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web3-validator/src/utils.ts b/packages/web3-validator/src/utils.ts index 8f191866871..32c7db0b16c 100644 --- a/packages/web3-validator/src/utils.ts +++ b/packages/web3-validator/src/utils.ts @@ -450,7 +450,7 @@ export function uint8ArrayToHexString(uint8Array: Uint8Array): string { } // for optimized technique for hex to bytes conversion -// many thanks to @noble/hashes and viem from where this implementation is taken <3 +// many thanks to @noble/hashes and viem from where this implementation is taken <3 and then enhanced a bit const charCodeMap = { zero: 48, nine: 57,