diff --git a/package.json b/package.json index 7f13f75055..8433ac2ba0 100644 --- a/package.json +++ b/package.json @@ -127,13 +127,13 @@ { "name": "import * from 'viem/account-abstraction'", "path": "./src/_esm/account-abstraction/index.js", - "limit": "45.5 kB", + "limit": "46 kB", "import": "*" }, { "name": "import { toCoinbaseSmartAccount } from 'viem/account-abstraction'", "path": "./src/_esm/account-abstraction/index.js", - "limit": "35 kB", + "limit": "36 kB", "import": "{ toCoinbaseSmartAccount }" }, { @@ -145,7 +145,7 @@ { "name": "import { privateKeyToAccount } from 'viem/accounts'", "path": "./src/_esm/accounts/index.js", - "limit": "20 kB", + "limit": "21 kB", "import": "{ privateKeyToAccount }" }, { @@ -169,7 +169,7 @@ { "name": "import * from 'viem/chains'", "path": "./src/_esm/chains/index.js", - "limit": "40 kB", + "limit": "41 kB", "import": "*" }, { @@ -187,7 +187,7 @@ { "name": "import * from 'viem/ens'", "path": "./src/_esm/ens/index.js", - "limit": "47 kB", + "limit": "47.5 kB", "import": "*" }, { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2f07479de9..a0c8ec7790 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -156,7 +156,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.16(typescript@5.4.2)(zod@3.22.4) + version: 2.21.19(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -169,7 +169,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.16(typescript@5.5.4)(zod@3.22.4) + version: 2.21.19(typescript@5.5.4)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -182,7 +182,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.16(typescript@5.4.2)(zod@3.22.4) + version: 2.21.19(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -195,7 +195,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.16(typescript@5.4.2)(zod@3.22.4) + version: 2.21.19(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -208,7 +208,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.16(typescript@5.4.2)(zod@3.22.4) + version: 2.21.19(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -227,7 +227,7 @@ importers: version: 18.2.0(react@18.2.0) viem: specifier: latest - version: 2.21.16(typescript@5.4.2)(zod@3.22.4) + version: 2.21.19(typescript@5.4.2)(zod@3.22.4) devDependencies: '@types/react': specifier: ^18.0.27 @@ -255,7 +255,7 @@ importers: version: 18.2.0(react@18.2.0) viem: specifier: latest - version: 2.21.16(typescript@5.4.2)(zod@3.22.4) + version: 2.21.19(typescript@5.4.2)(zod@3.22.4) devDependencies: '@types/react': specifier: ^18.0.27 @@ -277,7 +277,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.16(typescript@5.4.2)(zod@3.22.4) + version: 2.21.19(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -290,7 +290,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.16(typescript@5.4.2)(zod@3.22.4) + version: 2.21.19(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -309,7 +309,7 @@ importers: version: 18.2.0(react@18.2.0) viem: specifier: latest - version: 2.21.16(typescript@5.4.2)(zod@3.22.4) + version: 2.21.19(typescript@5.4.2)(zod@3.22.4) devDependencies: '@types/react': specifier: ^18.0.27 @@ -331,7 +331,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.16(typescript@5.4.2)(zod@3.22.4) + version: 2.21.19(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -344,7 +344,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.16(typescript@5.4.2)(zod@3.22.4) + version: 2.21.19(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -357,7 +357,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.16(typescript@5.4.2)(zod@3.22.4) + version: 2.21.19(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -370,7 +370,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.16(typescript@5.4.2)(zod@3.22.4) + version: 2.21.19(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -417,7 +417,7 @@ importers: version: 18.2.0(react@18.2.0) viem: specifier: latest - version: 2.21.16(typescript@5.4.2)(zod@3.22.4) + version: 2.21.19(typescript@5.4.2)(zod@3.22.4) devDependencies: '@types/react': specifier: ^18.0.27 @@ -445,7 +445,7 @@ importers: version: 18.2.0(react@18.2.0) viem: specifier: latest - version: 2.21.16(typescript@5.5.4)(zod@3.22.4) + version: 2.21.19(typescript@5.5.4)(zod@3.22.4) devDependencies: '@types/react': specifier: ^18.0.27 @@ -467,7 +467,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.16(typescript@5.4.2)(zod@3.22.4) + version: 2.21.19(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -486,7 +486,7 @@ importers: version: 18.2.0(react@18.2.0) viem: specifier: latest - version: 2.21.16(typescript@5.4.2)(zod@3.22.4) + version: 2.21.19(typescript@5.4.2)(zod@3.22.4) devDependencies: '@types/react': specifier: ^18.0.27 @@ -520,7 +520,7 @@ importers: version: 18.2.0(react@18.2.0) viem: specifier: latest - version: 2.21.16(typescript@5.4.2)(zod@3.22.4) + version: 2.21.19(typescript@5.4.2)(zod@3.22.4) devDependencies: '@types/react': specifier: ^18.0.27 @@ -556,39 +556,39 @@ importers: src: dependencies: '@adraffy/ens-normalize': - specifier: 1.10.0 - version: 1.10.0 + specifier: 1.11.0 + version: 1.11.0 '@noble/curves': - specifier: 1.4.0 - version: 1.4.0 + specifier: 1.6.0 + version: 1.6.0 '@noble/hashes': - specifier: 1.4.0 - version: 1.4.0 + specifier: 1.5.0 + version: 1.5.0 '@scure/bip32': - specifier: 1.4.0 - version: 1.4.0 + specifier: 1.5.0 + version: 1.5.0 '@scure/bip39': specifier: 1.4.0 version: 1.4.0 abitype: - specifier: 1.0.5 - version: 1.0.5(typescript@5.6.2)(zod@3.22.4) + specifier: 1.0.6 + version: 1.0.6(typescript@5.6.2)(zod@3.22.4) isows: - specifier: 1.0.4 - version: 1.0.4(ws@8.17.1) + specifier: 1.0.6 + version: 1.0.6(ws@8.18.0) webauthn-p256: - specifier: 0.0.5 - version: 0.0.5 + specifier: 0.0.10 + version: 0.0.10 ws: - specifier: 8.17.1 - version: 8.17.1 + specifier: 8.18.0 + version: 8.18.0 test: {} packages: - '@adraffy/ens-normalize@1.10.0': - resolution: {integrity: sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==} + '@adraffy/ens-normalize@1.11.0': + resolution: {integrity: sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg==} '@adraffy/ens-normalize@1.8.9': resolution: {integrity: sha512-93OmGCV0vO8+JQ3FHG+gZk/MPHzzMPDRiCiFcCQNTCnHaaxsacO3ScTPGlu2wX2dOtgfalbchPcw1cOYYjHCYQ==} @@ -1490,8 +1490,9 @@ packages: cpu: [x64] os: [win32] - '@noble/curves@1.4.0': - resolution: {integrity: sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg==} + '@noble/curves@1.6.0': + resolution: {integrity: sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==} + engines: {node: ^14.21.3 || >=16} '@noble/hashes@1.1.2': resolution: {integrity: sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA==} @@ -2336,14 +2337,11 @@ packages: cpu: [x64] os: [win32] - '@scure/base@1.1.6': - resolution: {integrity: sha512-ok9AWwhcgYuGG3Zfhyqg+zwl+Wn5uE+dwC0NV/2qQkx4dABbb/bx96vWu8NSj+BNjjSjno+JRYRjle1jV08k3g==} - '@scure/base@1.1.8': resolution: {integrity: sha512-6CyAclxj3Nb0XT7GHK6K4zK6k2xJm6E4Ft0Ohjt4WgegiFUHEtFb2CGzmPmGBwoIhrLsqNLYfLr04Y1GePrzZg==} - '@scure/bip32@1.4.0': - resolution: {integrity: sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==} + '@scure/bip32@1.5.0': + resolution: {integrity: sha512-8EnFYkqEQdnkuGBVpCzKxyIwDCBLDVj3oiX0EKUFre/tOjL/Hqba1D6n/8RcmaQy4f95qQFrO2A8Sr6ybh4NRw==} '@scure/bip39@1.4.0': resolution: {integrity: sha512-BEEm6p8IueV/ZTfQLp/0vhw4NPnT9oWf5+28nvmeUICjP99f4vr2d+qc7AVGDDtwRep6ifR43Yed9ERVmiITzw==} @@ -2829,8 +2827,8 @@ packages: zod: optional: true - abitype@1.0.5: - resolution: {integrity: sha512-YzDhti7cjlfaBhHutMaboYB21Ha3rXR9QTkNJFzYC4kC8YclaiwPBBBJY8ejFdu2wnJeZCVZSMlQJ7fi8S6hsw==} + abitype@1.0.6: + resolution: {integrity: sha512-MMSqYh4+C/aVqI2RQaWqbvI4Kxo5cQV40WQ4QFtDnNzCkqChm8MuENhElmynZlO0qUy/ObkEUaXtKqYnx1Kp3A==} peerDependencies: typescript: '>=5.0.4' zod: ^3 >=3.22.0 @@ -4424,8 +4422,8 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - isows@1.0.4: - resolution: {integrity: sha512-hEzjY+x9u9hPmBom9IIAqdJCwNLax+xrPb51vEPpERoFlIxgmZcHzsT5jKG06nvInKOBGvReAVz80Umed5CczQ==} + isows@1.0.6: + resolution: {integrity: sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw==} peerDependencies: ws: '*' @@ -6635,8 +6633,8 @@ packages: vfile@6.0.1: resolution: {integrity: sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==} - viem@2.21.16: - resolution: {integrity: sha512-SvhaPzTj3a+zR/5OmtJ0acjA6oGDrgPg4vtO8KboXtvbjksXEkz+oFaNjZDgxpkqbps2SLi8oPCjdpRm6WgDmw==} + viem@2.21.19: + resolution: {integrity: sha512-FdlkN+UI1IU5sYOmzvygkxsUNjDRD5YHht3gZFu2X9xFv6Z3h9pXq9ycrYQ3F17lNfb41O2Ot4/aqbUkwOv9dA==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -6763,8 +6761,8 @@ packages: wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} - webauthn-p256@0.0.5: - resolution: {integrity: sha512-drMGNWKdaixZNobeORVIqq7k5DsRC9FnG201K2QjeOoQLmtSDaSsVZdkg6n5jUALJKcAG++zBPJXmv6hy0nWFg==} + webauthn-p256@0.0.10: + resolution: {integrity: sha512-EeYD+gmIT80YkSIDb2iWq0lq2zbHo1CxHlQTeJ+KkCILWpVy3zASH3ByD4bopzfk0uCwXxLqKGLqp2W4O28VFA==} webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} @@ -6853,8 +6851,8 @@ packages: utf-8-validate: optional: true - ws@8.17.1: - resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} + ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -6961,7 +6959,7 @@ packages: snapshots: - '@adraffy/ens-normalize@1.10.0': {} + '@adraffy/ens-normalize@1.11.0': {} '@adraffy/ens-normalize@1.8.9': {} @@ -7637,7 +7635,7 @@ snapshots: dependencies: duplexify: 4.1.3 fastify-plugin: 4.5.1 - ws: 8.17.1 + ws: 8.18.0 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -7864,9 +7862,9 @@ snapshots: '@next/swc-win32-x64-msvc@13.5.4': optional: true - '@noble/curves@1.4.0': + '@noble/curves@1.6.0': dependencies: - '@noble/hashes': 1.4.0 + '@noble/hashes': 1.5.0 '@noble/hashes@1.1.2': {} @@ -8230,7 +8228,7 @@ snapshots: pino-http: 8.6.1 pino-pretty: 10.3.1 prom-client: 14.2.0 - viem: 2.21.16(typescript@5.6.2)(zod@3.22.4) + viem: 2.21.19(typescript@5.6.2)(zod@3.22.4) yargs: 17.7.2 zod: 3.22.4 zod-validation-error: 1.5.0(zod@3.22.4) @@ -8731,15 +8729,13 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.18.0': optional: true - '@scure/base@1.1.6': {} - '@scure/base@1.1.8': {} - '@scure/bip32@1.4.0': + '@scure/bip32@1.5.0': dependencies: - '@noble/curves': 1.4.0 - '@noble/hashes': 1.4.0 - '@scure/base': 1.1.6 + '@noble/curves': 1.6.0 + '@noble/hashes': 1.5.0 + '@scure/base': 1.1.8 '@scure/bip39@1.4.0': dependencies: @@ -9664,22 +9660,22 @@ snapshots: optionalDependencies: zod: 3.22.4 - abitype@1.0.5(typescript@5.4.2)(zod@3.22.4): + abitype@1.0.6(typescript@5.4.2)(zod@3.22.4): optionalDependencies: typescript: 5.4.2 zod: 3.22.4 - abitype@1.0.5(typescript@5.4.5)(zod@3.22.4): + abitype@1.0.6(typescript@5.4.5)(zod@3.22.4): optionalDependencies: typescript: 5.4.5 zod: 3.22.4 - abitype@1.0.5(typescript@5.5.4)(zod@3.22.4): + abitype@1.0.6(typescript@5.5.4)(zod@3.22.4): optionalDependencies: typescript: 5.5.4 zod: 3.22.4 - abitype@1.0.5(typescript@5.6.2)(zod@3.22.4): + abitype@1.0.6(typescript@5.6.2)(zod@3.22.4): optionalDependencies: typescript: 5.6.2 zod: 3.22.4 @@ -11432,9 +11428,9 @@ snapshots: isexe@2.0.0: {} - isows@1.0.4(ws@8.17.1): + isows@1.0.6(ws@8.18.0): dependencies: - ws: 8.17.1 + ws: 8.18.0 istanbul-lib-coverage@3.2.2: {} @@ -14098,17 +14094,17 @@ snapshots: unist-util-stringify-position: 4.0.0 vfile-message: 4.0.2 - viem@2.21.16(typescript@5.4.2)(zod@3.22.4): + viem@2.21.19(typescript@5.4.2)(zod@3.22.4): dependencies: - '@adraffy/ens-normalize': 1.10.0 - '@noble/curves': 1.4.0 - '@noble/hashes': 1.4.0 - '@scure/bip32': 1.4.0 + '@adraffy/ens-normalize': 1.11.0 + '@noble/curves': 1.6.0 + '@noble/hashes': 1.5.0 + '@scure/bip32': 1.5.0 '@scure/bip39': 1.4.0 - abitype: 1.0.5(typescript@5.4.2)(zod@3.22.4) - isows: 1.0.4(ws@8.17.1) - webauthn-p256: 0.0.5 - ws: 8.17.1 + abitype: 1.0.6(typescript@5.4.2)(zod@3.22.4) + isows: 1.0.6(ws@8.18.0) + webauthn-p256: 0.0.10 + ws: 8.18.0 optionalDependencies: typescript: 5.4.2 transitivePeerDependencies: @@ -14116,17 +14112,17 @@ snapshots: - utf-8-validate - zod - viem@2.21.16(typescript@5.5.4)(zod@3.22.4): + viem@2.21.19(typescript@5.5.4)(zod@3.22.4): dependencies: - '@adraffy/ens-normalize': 1.10.0 - '@noble/curves': 1.4.0 - '@noble/hashes': 1.4.0 - '@scure/bip32': 1.4.0 + '@adraffy/ens-normalize': 1.11.0 + '@noble/curves': 1.6.0 + '@noble/hashes': 1.5.0 + '@scure/bip32': 1.5.0 '@scure/bip39': 1.4.0 - abitype: 1.0.5(typescript@5.5.4)(zod@3.22.4) - isows: 1.0.4(ws@8.17.1) - webauthn-p256: 0.0.5 - ws: 8.17.1 + abitype: 1.0.6(typescript@5.5.4)(zod@3.22.4) + isows: 1.0.6(ws@8.18.0) + webauthn-p256: 0.0.10 + ws: 8.18.0 optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: @@ -14134,17 +14130,17 @@ snapshots: - utf-8-validate - zod - viem@2.21.16(typescript@5.6.2)(zod@3.22.4): + viem@2.21.19(typescript@5.6.2)(zod@3.22.4): dependencies: - '@adraffy/ens-normalize': 1.10.0 - '@noble/curves': 1.4.0 - '@noble/hashes': 1.4.0 - '@scure/bip32': 1.4.0 + '@adraffy/ens-normalize': 1.11.0 + '@noble/curves': 1.6.0 + '@noble/hashes': 1.5.0 + '@scure/bip32': 1.5.0 '@scure/bip39': 1.4.0 - abitype: 1.0.5(typescript@5.6.2)(zod@3.22.4) - isows: 1.0.4(ws@8.17.1) - webauthn-p256: 0.0.5 - ws: 8.17.1 + abitype: 1.0.6(typescript@5.6.2)(zod@3.22.4) + isows: 1.0.6(ws@8.18.0) + webauthn-p256: 0.0.10 + ws: 8.18.0 optionalDependencies: typescript: 5.6.2 transitivePeerDependencies: @@ -14154,15 +14150,15 @@ snapshots: viem@file:src(typescript@5.4.5)(zod@3.22.4): dependencies: - '@adraffy/ens-normalize': 1.10.0 - '@noble/curves': 1.4.0 - '@noble/hashes': 1.4.0 - '@scure/bip32': 1.4.0 + '@adraffy/ens-normalize': 1.11.0 + '@noble/curves': 1.6.0 + '@noble/hashes': 1.5.0 + '@scure/bip32': 1.5.0 '@scure/bip39': 1.4.0 - abitype: 1.0.5(typescript@5.4.5)(zod@3.22.4) - isows: 1.0.4(ws@8.17.1) - webauthn-p256: 0.0.5 - ws: 8.17.1 + abitype: 1.0.6(typescript@5.4.5)(zod@3.22.4) + isows: 1.0.6(ws@8.18.0) + webauthn-p256: 0.0.10 + ws: 8.18.0 optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: @@ -14366,10 +14362,10 @@ snapshots: dependencies: defaults: 1.0.4 - webauthn-p256@0.0.5: + webauthn-p256@0.0.10: dependencies: - '@noble/curves': 1.4.0 - '@noble/hashes': 1.4.0 + '@noble/curves': 1.6.0 + '@noble/hashes': 1.5.0 webidl-conversions@3.0.1: {} @@ -14471,7 +14467,7 @@ snapshots: ws@8.16.0: {} - ws@8.17.1: {} + ws@8.18.0: {} ws@8.5.0: {} diff --git a/site/pages/docs/utilities/recoverMessageAddress.md b/site/pages/docs/utilities/recoverMessageAddress.md index 4728b2bca8..18f59b8d71 100644 --- a/site/pages/docs/utilities/recoverMessageAddress.md +++ b/site/pages/docs/utilities/recoverMessageAddress.md @@ -13,6 +13,7 @@ Useful for obtaining the address of a message that was signed with [`signMessage :::code-group ```ts [example.ts] +import { recoverMessageAddress } from 'viem'; import { account, walletClient } from './config' const signature = await walletClient.signMessage({ @@ -85,4 +86,4 @@ const address = await recoverMessageAddress({ message: 'hello world', signature: '0x66edc32e2ab001213321ab7d959a2207fcef5190cc9abb6da5b0d2a8a9af2d4d2b0700e2c317c4106f337fd934fbbb0bf62efc8811a78603b33a8265d3b8f8cb1c' // [!code focus] }) -``` \ No newline at end of file +``` diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md index bf0860da48..af94aa97f8 100644 --- a/src/CHANGELOG.md +++ b/src/CHANGELOG.md @@ -1,5 +1,47 @@ # viem +## 2.21.20 + +### Patch Changes + +- [#2828](https://github.com/wevm/viem/pull/2828) [`fa546476`](https://github.com/wevm/viem/commit/fa5464766509a1806b0726ddea11e3ea2af34500) Thanks [@ezynda3](https://github.com/ezynda3)! - Updated opBNB Explorer URLs. + +- [#2832](https://github.com/wevm/viem/pull/2832) [`4c928cba`](https://github.com/wevm/viem/commit/4c928cbaa01f89ba78989efa390579cb60a6759c) Thanks [@Zhangnong](https://github.com/Zhangnong)! - Added MAP Protocol chain. + +- [#2830](https://github.com/wevm/viem/pull/2830) [`690f6f50`](https://github.com/wevm/viem/commit/690f6f507c86657336c102dec29d6740b3653691) Thanks [@Zhangnong](https://github.com/Zhangnong)! - Added Go Chain. + +## 2.21.19 + +### Patch Changes + +- [#2825](https://github.com/wevm/viem/pull/2825) [`66d7a1c9`](https://github.com/wevm/viem/commit/66d7a1c9685faa5c14b8ab7a6d02d5cbf5911319) Thanks [@fengbaolong](https://github.com/fengbaolong)! - Added Matchain. + +- [`44ae1a55`](https://github.com/wevm/viem/commit/44ae1a5549e704486f2643c67f222ab3ce87cd47) Thanks [@jxom](https://github.com/jxom)! - **Account Abstraction:** Tweaked address caching in `toCoinbaseSmartAccount`. + +- [#2827](https://github.com/wevm/viem/pull/2827) [`3fd43329`](https://github.com/wevm/viem/commit/3fd4332902b1181ae5332c2311bb3ba8725ad37b) Thanks [@posquit0](https://github.com/posquit0)! - Added bsquared chains + +- [#2826](https://github.com/wevm/viem/pull/2826) [`4b1c3f1a`](https://github.com/wevm/viem/commit/4b1c3f1a0ab5972451f509a30616cd0826e418da) Thanks [@posquit0](https://github.com/posquit0)! - Added bitlayer chains + +- [`04850399`](https://github.com/wevm/viem/commit/04850399fcc41a06c0aab7500f654665ead0c828) Thanks [@jxom](https://github.com/jxom)! - Updated dependencies. + +- [`a965c5aa`](https://github.com/wevm/viem/commit/a965c5aa2f30a62b321d5cc5c908229b7c3a34aa) Thanks [@jxom](https://github.com/jxom)! - **Account Abstraction:** Fixed User Operation fee estimation when a Bundler Client contains custom `estimateFeesPerGas` hook. + +- [#2822](https://github.com/wevm/viem/pull/2822) [`2bc5ff14`](https://github.com/wevm/viem/commit/2bc5ff146b52405c62f9d6996f66e0b39840b6ea) Thanks [@swetshaw](https://github.com/swetshaw)! - Added Kakarot Starknet Sepolia chain. + +## 2.21.18 + +### Patch Changes + +- [#2811](https://github.com/wevm/viem/pull/2811) [`03df7fbe`](https://github.com/wevm/viem/commit/03df7fbe0da3332a3ceee645d7ec6ede2a832010) Thanks [@shazarre](https://github.com/shazarre)! - Fixed Celo maxFeePerGas calculation for fee currency transactions. + +- [#2817](https://github.com/wevm/viem/pull/2817) [`7c3653b2`](https://github.com/wevm/viem/commit/7c3653b2a1dda1876be396c587bf39da630dca72) Thanks [@0xArdy](https://github.com/0xArdy)! - Fixed Mode and Lisk chain definitions + +- [#2813](https://github.com/wevm/viem/pull/2813) [`3e971248`](https://github.com/wevm/viem/commit/3e97124837095b53bfbbd7d9f5614c0afff276e6) Thanks [@qi-0826](https://github.com/qi-0826)! - Added Hemi Sepolia chain. + +- [`da5a7b6f`](https://github.com/wevm/viem/commit/da5a7b6f54ecd813379259f6d5ceab56a4e7aac3) Thanks [@jxom](https://github.com/jxom)! - Added `mode` property to `TestClient.extends`. + +- [#2818](https://github.com/wevm/viem/pull/2818) [`ce989d81`](https://github.com/wevm/viem/commit/ce989d81abefb825278d0748aef9e0ee6be79c91) Thanks [@GuillermoEscobero](https://github.com/GuillermoEscobero)! - Fixed Zircuit Testnet explorer and RPC URLs. + ## 2.21.17 ### Patch Changes diff --git a/src/account-abstraction/accounts/implementations/toCoinbaseSmartAccount.ts b/src/account-abstraction/accounts/implementations/toCoinbaseSmartAccount.ts index 7995fb62b6..ff32e84047 100644 --- a/src/account-abstraction/accounts/implementations/toCoinbaseSmartAccount.ts +++ b/src/account-abstraction/accounts/implementations/toCoinbaseSmartAccount.ts @@ -70,7 +70,9 @@ export type CoinbaseSmartAccountImplementation = Assign< export async function toCoinbaseSmartAccount( parameters: ToCoinbaseSmartAccountParameters, ): Promise { - const { address, client, owners, nonce = 0n } = parameters + const { client, owners, nonce = 0n } = parameters + + let address = parameters.address const entryPoint = { abi: entryPoint06Abi, @@ -115,12 +117,12 @@ export async function toCoinbaseSmartAccount( }, async getAddress() { - if (address) return address - return await readContract(client, { + address ??= await readContract(client, { ...factory, functionName: 'getAddress', args: [owners_bytes, nonce], }) + return address }, async getFactoryArgs() { diff --git a/src/account-abstraction/actions/bundler/prepareUserOperation.ts b/src/account-abstraction/actions/bundler/prepareUserOperation.ts index 3cedff5ceb..1e27ce957f 100644 --- a/src/account-abstraction/actions/bundler/prepareUserOperation.ts +++ b/src/account-abstraction/actions/bundler/prepareUserOperation.ts @@ -409,7 +409,7 @@ export async function prepareUserOperation< bundlerClient, userOperation: request as UserOperation, }) - request = { + return { ...request, ...fees, } @@ -424,7 +424,7 @@ export async function prepareUserOperation< // Otherwise, we will need to estimate the fees to fill the fee properties. try { - const client_ = 'client' in client ? (client.client as Client) : client + const client_ = bundlerClient.client ?? client const fees = await getAction( client_, estimateFeesPerGas, @@ -567,7 +567,7 @@ export async function prepareUserOperation< typeof request.paymasterVerificationGasLimit === 'undefined') ) { const gas = await getAction( - client, + bundlerClient, estimateUserOperationGas, 'estimateUserOperationGas', )({ diff --git a/src/actions/public/mulitcall.bench-d.ts b/src/actions/public/multicall.bench-d.ts similarity index 100% rename from src/actions/public/mulitcall.bench-d.ts rename to src/actions/public/multicall.bench-d.ts diff --git a/src/celo/fees.test.ts b/src/celo/fees.test.ts index 5983d6f892..2a4f8b0b5e 100644 --- a/src/celo/fees.test.ts +++ b/src/celo/fees.test.ts @@ -30,8 +30,8 @@ describe('celo/fees', () => { const requestMock = vi.spyOn(client, 'request') // @ts-ignore requestMock.mockImplementation((request) => { - if (request.method === 'eth_gasPrice') return '11619349802' - if (request.method === 'eth_maxPriorityFeePerGas') return '2323869960' + if (request.method === 'eth_gasPrice') return '15057755162' + if (request.method === 'eth_maxPriorityFeePerGas') return '602286' return }) @@ -39,6 +39,7 @@ describe('celo/fees', () => { const fees = await celoestimateFeesPerGasFn({ client, + multiply: (value: bigint) => (value * 150n) / 100n, request: { feeCurrency: '0xfee', }, @@ -46,8 +47,8 @@ describe('celo/fees', () => { expect(fees).toMatchInlineSnapshot(` { - "maxFeePerGas": 11619349802n, - "maxPriorityFeePerGas": 2323869960n, + "maxFeePerGas": 22587235029n, + "maxPriorityFeePerGas": 602286n, } `) expect(requestMock).toHaveBeenCalledWith({ diff --git a/src/celo/fees.ts b/src/celo/fees.ts index 7329f71687..e6334247c4 100644 --- a/src/celo/fees.ts +++ b/src/celo/fees.ts @@ -30,8 +30,11 @@ export const fees: ChainFees = { ), ]) + const suggestedMaxFeePerGas = + params.multiply(maxFeePerGas) + maxPriorityFeePerGas + return { - maxFeePerGas, + maxFeePerGas: suggestedMaxFeePerGas, maxPriorityFeePerGas, } }, diff --git a/src/celo/sendTransaction.test.ts b/src/celo/sendTransaction.test.ts index 0493efa1dd..1d6a9cac59 100644 --- a/src/celo/sendTransaction.test.ts +++ b/src/celo/sendTransaction.test.ts @@ -29,14 +29,14 @@ describe('sendTransaction()', () => { } if (request.method === 'eth_maxPriorityFeePerGas') { - return 1n + return 602286n } if ( request.method === 'eth_gasPrice' && (request.params as string[])[0] === feeCurrencyAddress ) { - return 2n + return 15057755162n } if (request.method === 'eth_estimateGas') { @@ -99,7 +99,7 @@ describe('sendTransaction()', () => { expect(transportRequestMock).toHaveBeenLastCalledWith({ method: 'eth_sendRawTransaction', params: [ - '0x7bf87782a4ec8001020194f39fd6e51aad88f6f4ce6ab8827279cfffb922660180c0940000000000000000000000000000000000000fee80a0a3163f9ff91200f4c8000f0217d85d16c329c2f38d48a7b4b70119989e475e57a0555fd5b2a6eac95426e33cd07ca5fec121ad46194611a013001f76bbc4b33136', + '0x7bf87f82a4ec80830930ae8504350cec000194f39fd6e51aad88f6f4ce6ab8827279cfffb922660180c0940000000000000000000000000000000000000fee80a0b61a83b7fe73e24f223f563447cdb69f6dedc7f7f7b2acc4e41f2e57143ccd57a03ce0bcc81c026ff0eb17274940748e23250fe988f71370eba1e59e43557835b3', ], }) }) diff --git a/src/chains/definitions/bitlayer.ts b/src/chains/definitions/bitlayer.ts new file mode 100644 index 0000000000..243b65c927 --- /dev/null +++ b/src/chains/definitions/bitlayer.ts @@ -0,0 +1,23 @@ +import { defineChain } from '../../utils/chain/defineChain.js' + +export const bitlayer = /*#__PURE__*/ defineChain({ + id: 200901, + name: 'Bitlayer Mainnet', + nativeCurrency: { + name: 'BTC', + symbol: 'BTC', + decimals: 18, + }, + rpcUrls: { + default: { + http: ['https://rpc.bitlayer.org'], + webSocket: ['wss://ws.bitlayer.org'], + }, + }, + blockExplorers: { + default: { + name: 'bitlayer mainnet scan', + url: 'https://www.btrscan.com', + }, + }, +}) diff --git a/src/chains/definitions/bitlayerTestnet.ts b/src/chains/definitions/bitlayerTestnet.ts new file mode 100644 index 0000000000..a81cdd88e9 --- /dev/null +++ b/src/chains/definitions/bitlayerTestnet.ts @@ -0,0 +1,24 @@ +import { defineChain } from '../../utils/chain/defineChain.js' + +export const bitlayerTestnet = /*#__PURE__*/ defineChain({ + id: 200810, + name: 'Bitlayer Testnet', + nativeCurrency: { + name: 'BTC', + symbol: 'BTC', + decimals: 18, + }, + rpcUrls: { + default: { + http: ['https://testnet-rpc.bitlayer.org'], + webSocket: ['wss://testnet-ws.bitlayer.org'], + }, + }, + blockExplorers: { + default: { + name: 'bitlayer testnet scan', + url: 'https://testnet.btrscan.com', + }, + }, + testnet: true, +}) diff --git a/src/chains/definitions/bsquared.ts b/src/chains/definitions/bsquared.ts new file mode 100644 index 0000000000..f69eecc61a --- /dev/null +++ b/src/chains/definitions/bsquared.ts @@ -0,0 +1,22 @@ +import { defineChain } from '../../utils/chain/defineChain.js' + +export const bsquared = /*#__PURE__*/ defineChain({ + id: 223, + name: 'B2', + nativeCurrency: { + name: 'Bitcoin', + symbol: 'BTC', + decimals: 18, + }, + rpcUrls: { + default: { + http: ['https://rpc.bsquared.network'], + }, + }, + blockExplorers: { + default: { + name: 'blockscout', + url: 'https://explorer.bsquared.network', + }, + }, +}) diff --git a/src/chains/definitions/bsquaredTestnet.ts b/src/chains/definitions/bsquaredTestnet.ts new file mode 100644 index 0000000000..7fd09529c1 --- /dev/null +++ b/src/chains/definitions/bsquaredTestnet.ts @@ -0,0 +1,23 @@ +import { defineChain } from '../../utils/chain/defineChain.js' + +export const bsquaredTestnet = /*#__PURE__*/ defineChain({ + id: 1123, + name: 'B2 Testnet', + nativeCurrency: { + name: 'Bitcoin', + symbol: 'BTC', + decimals: 18, + }, + rpcUrls: { + default: { + http: ['https://testnet-rpc.bsquared.network'], + }, + }, + blockExplorers: { + default: { + name: 'blockscout', + url: 'https://testnet-explorer.bsquared.network', + }, + }, + testnet: true, +}) diff --git a/src/chains/definitions/goChain.ts b/src/chains/definitions/goChain.ts new file mode 100644 index 0000000000..cf1909a706 --- /dev/null +++ b/src/chains/definitions/goChain.ts @@ -0,0 +1,21 @@ +import { defineChain } from '../../utils/chain/defineChain.js' + +export const goChain = /*#__PURE__*/ defineChain({ + id: 60, + name: 'GoChain', + nativeCurrency: { + decimals: 18, + name: 'GO', + symbol: 'GO', + }, + rpcUrls: { + default: { http: ['https://rpc.gochain.io'] }, + }, + blockExplorers: { + default: { + name: 'GoChain Explorer', + url: 'https://explorer.gochain.io', + }, + }, + testnet: false, +}) diff --git a/src/chains/definitions/hemiSepolia.ts b/src/chains/definitions/hemiSepolia.ts new file mode 100644 index 0000000000..217763ee94 --- /dev/null +++ b/src/chains/definitions/hemiSepolia.ts @@ -0,0 +1,24 @@ +import { defineChain } from '../../utils/chain/defineChain.js' + +export const hemiSepolia = /*#__PURE__*/ defineChain({ + id: 743111, + name: 'Hemi Sepolia', + network: 'Hemi Sepolia', + nativeCurrency: { + name: 'Ether', + symbol: 'ETH', + decimals: 18, + }, + rpcUrls: { + default: { + http: ['https://testnet.rpc.hemi.network/rpc'], + }, + }, + blockExplorers: { + default: { + name: 'Hemi Sepolia explorer', + url: 'https://testnet.explorer.hemi.xyz', + }, + }, + testnet: true, +}) diff --git a/src/chains/definitions/kakarotStarknetSepolia.ts b/src/chains/definitions/kakarotStarknetSepolia.ts new file mode 100644 index 0000000000..66f5e9a06a --- /dev/null +++ b/src/chains/definitions/kakarotStarknetSepolia.ts @@ -0,0 +1,23 @@ +import { defineChain } from '../../utils/chain/defineChain.js' + +export const kakarotStarknetSepolia = /*#__PURE__*/ defineChain({ + id: 5424235787602241, + name: 'Kakarot Starknet Sepolia', + nativeCurrency: { + name: 'Ether', + symbol: 'ETH', + decimals: 18, + }, + rpcUrls: { + default: { + http: ['https://sepolia-rpc.kakarot.org'], + }, + }, + blockExplorers: { + default: { + name: 'Kakarot Scan', + url: 'https://sepolia.kakarotscan.org', + }, + }, + testnet: true, +}) diff --git a/src/chains/definitions/lisk.ts b/src/chains/definitions/lisk.ts index f212f6aefe..8422310c32 100644 --- a/src/chains/definitions/lisk.ts +++ b/src/chains/definitions/lisk.ts @@ -1,6 +1,8 @@ import { chainConfig } from '../../op-stack/chainConfig.js' import { defineChain } from '../../utils/chain/defineChain.js' +const sourceId = 1 // mainnet + export const lisk = /*#__PURE__*/ defineChain({ ...chainConfig, id: 1135, @@ -24,8 +26,25 @@ export const lisk = /*#__PURE__*/ defineChain({ }, }, contracts: { + ...chainConfig.contracts, multicall3: { address: '0xA9d71E1dd7ca26F26e656E66d6AA81ed7f745bf0', }, + l2OutputOracle: { + [sourceId]: { + address: '0x113cB99283AF242Da0A0C54347667edF531Aa7d6', + }, + }, + portal: { + [sourceId]: { + address: '0x26dB93F8b8b4f7016240af62F7730979d353f9A7', + }, + }, + l1StandardBridge: { + [sourceId]: { + address: '0x2658723Bf70c7667De6B25F99fcce13A16D25d08', + }, + }, }, + sourceId, }) diff --git a/src/chains/definitions/mapProtocol.ts b/src/chains/definitions/mapProtocol.ts new file mode 100644 index 0000000000..95c930ef03 --- /dev/null +++ b/src/chains/definitions/mapProtocol.ts @@ -0,0 +1,21 @@ +import { defineChain } from '../../utils/chain/defineChain.js' + +export const mapProtocol = /*#__PURE__*/ defineChain({ + id: 22776, + name: 'MAP Protocol', + nativeCurrency: { + decimals: 18, + name: 'MAPO', + symbol: 'MAPO', + }, + rpcUrls: { + default: { http: ['https://rpc.maplabs.io'] }, + }, + blockExplorers: { + default: { + name: 'MAPO Scan', + url: 'https://maposcan.io', + }, + }, + testnet: false, +}) diff --git a/src/chains/definitions/matchain.ts b/src/chains/definitions/matchain.ts new file mode 100644 index 0000000000..58d5279548 --- /dev/null +++ b/src/chains/definitions/matchain.ts @@ -0,0 +1,20 @@ +import { defineChain } from '../../utils/chain/defineChain.js' + +export const matchain = /*#__PURE__*/ defineChain({ + id: 698, + name: 'Matchain', + nativeCurrency: { + name: 'BNB', + symbol: 'BNB', + decimals: 18, + }, + rpcUrls: { + default: { http: ['https://rpc.matchain.io'] }, + }, + blockExplorers: { + default: { + name: 'Matchain Scan', + url: 'https://matchscan.io', + }, + }, +}) diff --git a/src/chains/definitions/matchainTestnet.ts b/src/chains/definitions/matchainTestnet.ts new file mode 100644 index 0000000000..ddecf9837a --- /dev/null +++ b/src/chains/definitions/matchainTestnet.ts @@ -0,0 +1,21 @@ +import { defineChain } from '../../utils/chain/defineChain.js' + +export const matchainTestnet = /*#__PURE__*/ defineChain({ + id: 699, + name: 'Matchain Testnet', + nativeCurrency: { + name: 'BNB', + symbol: 'BNB', + decimals: 18, + }, + rpcUrls: { + default: { http: ['https://testnet-rpc.matchain.io'] }, + }, + blockExplorers: { + default: { + name: 'Matchain Scan', + url: 'https://testnet.matchscan.io', + }, + }, + testnet: true, +}) diff --git a/src/chains/definitions/mode.ts b/src/chains/definitions/mode.ts index d562f75c17..656a5806ac 100644 --- a/src/chains/definitions/mode.ts +++ b/src/chains/definitions/mode.ts @@ -1,8 +1,10 @@ +import { chainConfig } from '../../op-stack/chainConfig.js' import { defineChain } from '../../utils/chain/defineChain.js' const sourceId = 1 // mainnet export const mode = /*#__PURE__*/ defineChain({ + ...chainConfig, id: 34443, name: 'Mode Mainnet', nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, @@ -18,6 +20,7 @@ export const mode = /*#__PURE__*/ defineChain({ }, }, contracts: { + ...chainConfig.contracts, multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 2465882, diff --git a/src/chains/definitions/opBNB.ts b/src/chains/definitions/opBNB.ts index cd9ff3238f..d40eac4421 100644 --- a/src/chains/definitions/opBNB.ts +++ b/src/chains/definitions/opBNB.ts @@ -16,8 +16,9 @@ export const opBNB = /*#__PURE__*/ defineChain({ }, blockExplorers: { default: { - name: 'opbnbscan', - url: 'https://mainnet.opbnbscan.com', + name: 'opBNB (BSCScan)', + url: 'https://opbnb.bscscan.com', + apiUrl: 'https://api-opbnb.bscscan.com/api', }, }, contracts: { diff --git a/src/chains/definitions/zircuitTestnet.ts b/src/chains/definitions/zircuitTestnet.ts index 7f1de151ce..7dd054e7d7 100644 --- a/src/chains/definitions/zircuitTestnet.ts +++ b/src/chains/definitions/zircuitTestnet.ts @@ -6,13 +6,16 @@ export const zircuitTestnet = /*#__PURE__*/ defineChain({ nativeCurrency: { name: 'ETH', symbol: 'ETH', decimals: 18 }, rpcUrls: { default: { - http: ['https://zircuit1.p2pify.com'], + http: [ + 'https://zircuit1-testnet.p2pify.com', + 'https://zircuit1-testnet.liquify.com', + ], }, }, blockExplorers: { default: { - name: 'Zircuit Explorer', - url: 'https://explorer.zircuit.com', + name: 'Zircuit Testnet Explorer', + url: 'https://explorer.testnet.zircuit.com', }, }, contracts: { @@ -21,4 +24,5 @@ export const zircuitTestnet = /*#__PURE__*/ defineChain({ blockCreated: 6040287, }, }, + testnet: true, }) diff --git a/src/chains/index.ts b/src/chains/index.ts index d190552393..458cb616b0 100644 --- a/src/chains/index.ts +++ b/src/chains/index.ts @@ -42,6 +42,8 @@ export { berachainTestnetbArtio } from './definitions/berachainTestnetbArtio.js' export { bevmMainnet } from './definitions/bevmMainnet.js' export { bitkub } from './definitions/bitkub.js' export { bitkubTestnet } from './definitions/bitkubTestnet.js' +export { bitlayer } from './definitions/bitlayer.js' +export { bitlayerTestnet } from './definitions/bitlayerTestnet.js' export { bitTorrent } from './definitions/bitTorrent.js' export { bitTorrentTestnet } from './definitions/bitTorrentTestnet.js' export { blast } from './definitions/blast.js' @@ -58,6 +60,8 @@ export { bronosTestnet } from './definitions/bronosTestnet.js' export { bsc } from './definitions/bsc.js' export { bscTestnet } from './definitions/bscTestnet.js' export { bscGreenfield } from './definitions/bscGreenfield.js' +export { bsquared } from './definitions/bsquared.js' +export { bsquaredTestnet } from './definitions/bsquaredTestnet.js' export { btr } from './definitions/btr.js' export { btrTestnet } from './definitions/btrTestnet.js' export { bxn } from './definitions/bxn.js' @@ -139,6 +143,7 @@ export { jbc } from './definitions/jbc.js' export { jbcTestnet } from './definitions/jbcTestnet.js' export { karura } from './definitions/karura.js' export { garnet } from './definitions/garnet.js' +export { goChain } from './definitions/goChain.js' export { gobi } from './definitions/gobi.js' export { goerli } from './definitions/goerli.js' export { gnosis } from './definitions/gnosis.js' @@ -153,6 +158,7 @@ export { haqqTestedge2 } from './definitions/haqqTestedge2.js' export { hedera } from './definitions/hedera.js' export { hederaTestnet } from './definitions/hederaTestnet.js' export { hederaPreviewnet } from './definitions/hederaPreviewnet.js' +export { hemiSepolia } from './definitions/hemiSepolia.js' export { holesky } from './definitions/holesky.js' export { hychain } from './definitions/hychain.js' export { hychainTestnet } from './definitions/hychainTestnet.js' @@ -162,6 +168,7 @@ export { inEVM } from './definitions/inEVM.js' export { iota } from './definitions/iota.js' export { iotaTestnet } from './definitions/iotaTestnet.js' export { kakarotSepolia } from './definitions/kakarotSepolia.js' +export { kakarotStarknetSepolia } from './definitions/kakarotStarknetSepolia.js' export { kava } from './definitions/kava.js' export { kavaTestnet } from './definitions/kavaTestnet.js' export { kcc } from './definitions/kcc.js' @@ -199,6 +206,9 @@ export { mantaTestnet } from './definitions/mantaTestnet.js' export { mantle } from './definitions/mantle.js' export { mantleSepoliaTestnet } from './definitions/mantleSepoliaTestnet.js' export { mantleTestnet } from './definitions/mantleTestnet.js' +export { mapProtocol } from './definitions/mapProtocol.js' +export { matchain } from './definitions/matchain.js' +export { matchainTestnet } from './definitions/matchainTestnet.js' export { merlin } from './definitions/merlin.js' export { metachain } from './definitions/metachain.js' export { metachainIstanbul } from './definitions/metachainIstanbul.js' diff --git a/src/clients/createTestClient.ts b/src/clients/createTestClient.ts index fdb3c043ca..9a9eca6498 100644 --- a/src/clients/createTestClient.ts +++ b/src/clients/createTestClient.ts @@ -58,7 +58,9 @@ export type TestClient< rpcSchema extends RpcSchema ? [...TestRpcSchema, ...rpcSchema] : TestRpcSchema, - includeActions extends true ? TestActions : Record + { mode: mode } & (includeActions extends true + ? TestActions + : Record) > > diff --git a/src/errors/version.ts b/src/errors/version.ts index 720c0669b0..03959090a0 100644 --- a/src/errors/version.ts +++ b/src/errors/version.ts @@ -1 +1 @@ -export const version = '2.21.17' +export const version = '2.21.20' diff --git a/src/jsr.json b/src/jsr.json index 150eb74e4b..1a65a47e88 100644 --- a/src/jsr.json +++ b/src/jsr.json @@ -1,6 +1,6 @@ { "name": "@wevm/viem", - "version": "2.21.17", + "version": "2.21.20", "exports": { ".": "./index.ts", "./accounts": "./accounts/index.ts", diff --git a/src/package.json b/src/package.json index 1f71e34641..abb9ad20e7 100644 --- a/src/package.json +++ b/src/package.json @@ -1,7 +1,7 @@ { "name": "viem", "description": "TypeScript Interface for Ethereum", - "version": "2.21.17", + "version": "2.21.20", "type": "module", "main": "./_cjs/index.js", "module": "./_esm/index.js", @@ -139,15 +139,15 @@ } }, "dependencies": { - "@adraffy/ens-normalize": "1.10.0", - "@noble/curves": "1.4.0", - "@noble/hashes": "1.4.0", - "@scure/bip32": "1.4.0", + "@adraffy/ens-normalize": "1.11.0", + "@noble/curves": "1.6.0", + "@noble/hashes": "1.5.0", + "@scure/bip32": "1.5.0", "@scure/bip39": "1.4.0", - "abitype": "1.0.5", - "isows": "1.0.4", - "webauthn-p256": "0.0.5", - "ws": "8.17.1" + "abitype": "1.0.6", + "isows": "1.0.6", + "webauthn-p256": "0.0.10", + "ws": "8.18.0" }, "license": "MIT", "homepage": "https://viem.sh",