Skip to content

Commit

Permalink
Merge pull request #339 from rabbitholegg/mmackz/builder_add_blast
Browse files Browse the repository at this point in the history
feat(builder): add blast chain support for builder
  • Loading branch information
mmackz authored Apr 4, 2024
2 parents d02526c + 9218a27 commit ed59215
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 17 deletions.
5 changes: 5 additions & 0 deletions .changeset/clean-coins-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rabbitholegg/create-plugin": minor
---

add blast chain support
31 changes: 17 additions & 14 deletions apps/create-plugin/src/viem.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import { Chains } from '@rabbitholegg/questdk-plugin-utils'
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,
Expand All @@ -29,13 +31,14 @@ interface Transaction {
}

const chains: Record<number, Chain> = {
1: mainnet,
10: optimism,
42161: arbitrum,
8453: base,
137: polygon,
324: zkSync,
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 {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
27 changes: 25 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ed59215

Please sign in to comment.