From d93543cf292f19453c5feb6524b4a053e3529857 Mon Sep 17 00:00:00 2001 From: mmackz Date: Wed, 3 Apr 2024 16:24:59 -0700 Subject: [PATCH 1/4] chore: bump viem version --- package.json | 2 +- pnpm-lock.yaml | 27 +++++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index f3e09757a..9d47da30a 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ }, "dependencies": { "@rabbitholegg/questdk": "2.0.0-alpha.35", - "viem": "2.7.9", + "viem": "2.9.9", "axios": "1.5.0", "zod": "3.21.4", "react-intl": "6.6.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b06fbe330..23c47cf4d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,8 +25,8 @@ importers: specifier: 5.0.1 version: 5.0.1 viem: - specifier: 2.7.9 - version: 2.7.9(typescript@5.3.2)(zod@3.21.4) + specifier: 2.9.9 + version: 2.9.9(typescript@5.3.2)(zod@3.21.4) zod: specifier: 3.21.4 version: 3.21.4 @@ -11843,6 +11843,29 @@ packages: - zod dev: false + /viem@2.9.9(typescript@5.3.2)(zod@3.21.4): + resolution: {integrity: sha512-SUIHBL6M5IIlqDCMEQwAAvHzeglaM4FEqM6bCI+srLXtFYmrpV4tWhnpobQRNwh4f7HIksmKLLZ+cytv8FfnJQ==} + peerDependencies: + typescript: '>=5.0.4' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@adraffy/ens-normalize': 1.10.0 + '@noble/curves': 1.2.0 + '@noble/hashes': 1.3.2 + '@scure/bip32': 1.3.2 + '@scure/bip39': 1.2.1 + abitype: 1.0.0(typescript@5.3.2)(zod@3.21.4) + isows: 1.0.3(ws@8.13.0) + typescript: 5.3.2 + ws: 8.13.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + - zod + dev: false + /vite-node@0.30.1(@types/node@20.4.5): resolution: {integrity: sha512-vTikpU/J7e6LU/8iM3dzBo8ZhEiKZEKRznEMm+mJh95XhWaPrJQraT/QsT2NWmuEf+zgAoMe64PKT7hfZ1Njmg==} engines: {node: '>=v14.18.0'} From cd321becf6ff261faadc1d49820bdde39d86a52a Mon Sep 17 00:00:00 2001 From: mmackz Date: Wed, 3 Apr 2024 16:25:36 -0700 Subject: [PATCH 2/4] feat(builder): add blast chain to viem client --- apps/create-plugin/src/viem.ts | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/apps/create-plugin/src/viem.ts b/apps/create-plugin/src/viem.ts index 1e969646e..4d2cb8daa 100644 --- a/apps/create-plugin/src/viem.ts +++ b/apps/create-plugin/src/viem.ts @@ -1,18 +1,19 @@ import { - createPublicClient, - http, - type Hash, - type PublicClient, type Address, type Chain, - zeroAddress, + type Hash, + type PublicClient, + createPublicClient, + http, isAddress, + zeroAddress, } from 'viem' import { - mainnet, + arbitrum, base, + blast, + mainnet, optimism, - arbitrum, polygon, zkSync, zora, @@ -31,10 +32,11 @@ interface Transaction { const chains: Record = { 1: mainnet, 10: optimism, - 42161: arbitrum, - 8453: base, 137: polygon, 324: zkSync, + 8453: base, + 42161: arbitrum, + 81457: blast, 7777777: zora, } From dd01c3e824897c98e70627be76e00e6f89b11533 Mon Sep 17 00:00:00 2001 From: mmackz Date: Wed, 3 Apr 2024 16:33:16 -0700 Subject: [PATCH 3/4] refactor(builder): use Chains enum --- apps/create-plugin/src/viem.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/apps/create-plugin/src/viem.ts b/apps/create-plugin/src/viem.ts index 4d2cb8daa..ed269cb42 100644 --- a/apps/create-plugin/src/viem.ts +++ b/apps/create-plugin/src/viem.ts @@ -1,3 +1,4 @@ +import { Chains } from '@rabbitholegg/questdk-plugin-utils' import { type Address, type Chain, @@ -30,14 +31,14 @@ interface Transaction { } const chains: Record = { - 1: mainnet, - 10: optimism, - 137: polygon, - 324: zkSync, - 8453: base, - 42161: arbitrum, - 81457: blast, - 7777777: zora, + [Chains.ETHEREUM]: mainnet, + [Chains.OPTIMISM]: optimism, + [Chains.POLYGON_POS]: polygon, + [Chains.ZK_SYNC_ERA]: zkSync, + [Chains.BASE]: base, + [Chains.ARBITRUM_ONE]: arbitrum, + [Chains.BLAST]: blast, + [Chains.ZORA]: zora, } function getClient(chain: Chain): PublicClient { From 9218a273f981980fb99b8cd60fe2159a79bc6d6d Mon Sep 17 00:00:00 2001 From: mmackz Date: Wed, 3 Apr 2024 16:33:43 -0700 Subject: [PATCH 4/4] chore: generate changeset --- .changeset/clean-coins-count.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/clean-coins-count.md diff --git a/.changeset/clean-coins-count.md b/.changeset/clean-coins-count.md new file mode 100644 index 000000000..979b6f3fd --- /dev/null +++ b/.changeset/clean-coins-count.md @@ -0,0 +1,5 @@ +--- +"@rabbitholegg/create-plugin": minor +--- + +add blast chain support