Skip to content

Commit

Permalink
Add Palm and Palm Testnet chains (#1691)
Browse files Browse the repository at this point in the history
* feat: add Palm and Palm Testnet chains

* chore: changeset

* fix: remove `infura` URL

Co-authored-by: awkweb <tom@meagher.co>

* fix: update `id` with numeric separator

Co-authored-by: awkweb <tom@meagher.co>

* fix: remove `infura` rpcUrl

Co-authored-by: awkweb <tom@meagher.co>

* fix: update `id` with numeric separator

Co-authored-by: awkweb <tom@meagher.co>

---------

Co-authored-by: awkweb <tom@meagher.co>
  • Loading branch information
skenaja and tmm committed Jan 15, 2024
1 parent bcd3dbe commit 8d011e8
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/angry-bears-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

Added Palm and Palm Testnet chains
29 changes: 29 additions & 0 deletions src/chains/definitions/palm.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { defineChain } from '../../utils/chain/defineChain.js'

export const palm = /*#__PURE__*/ defineChain({
id: 11_297_108_109,
name: 'Palm',
nativeCurrency: {
decimals: 18,
name: 'PALM',
symbol: 'PALM',
},
rpcUrls: {
default: {
http: ['https://palm-mainnet.public.blastapi.io'],
webSocket: ['wss://palm-mainnet.public.blastapi.io'],
},
},
blockExplorers: {
default: {
name: 'Chainlens',
url: 'https://palm.chainlens.com',
},
},
contracts: {
multicall3: {
address: '0xca11bde05977b3631167028862be2a173976ca11',
blockCreated: 15429248,
},
},
})
30 changes: 30 additions & 0 deletions src/chains/definitions/palmTestnet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { defineChain } from '../../utils/chain/defineChain.js'

export const palmTestnet = /*#__PURE__*/ defineChain({
id: 11_297_108_099,
name: 'Palm Testnet',
nativeCurrency: {
decimals: 18,
name: 'PALM',
symbol: 'PALM',
},
rpcUrls: {
default: {
http: ['https://palm-mainnet.public.blastapi.io'],
webSocket: ['wss://palm-mainnet.public.blastapi.io'],
},
},
blockExplorers: {
default: {
name: 'Chainlens',
url: 'https://palm.chainlens.com',
},
},
contracts: {
multicall3: {
address: '0xca11bde05977b3631167028862be2a173976ca11',
blockCreated: 15429248,
},
},
testnet: true,
})
2 changes: 2 additions & 0 deletions src/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ export { optimismGoerli } from './definitions/optimismGoerli.js'
export { optimismSepolia } from './definitions/optimismSepolia.js'
export { opBNB } from './definitions/opBNB.js'
export { opBNBTestnet } from './definitions/opBNBTestnet.js'
export { palm } from './definitions/palm.js'
export { palmTestnet } from './definitions/palmTestnet.js'
export { pgn } from './definitions/pgn.js'
export { pgnTestnet } from './definitions/pgnTestnet.js'
export { plinga } from './definitions/plinga.js'
Expand Down

1 comment on commit 8d011e8

@vercel
Copy link

@vercel vercel bot commented on 8d011e8 Jan 15, 2024

Choose a reason for hiding this comment

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

Please sign in to comment.