Skip to content

Commit

Permalink
feat: add Flow's previewnet evm network (#1913)
Browse files Browse the repository at this point in the history
* add Flow's previewnet evm network

* add flow mainnet configuration

* consistent flow network names with ethereum list chain

* Update flowMainnet.ts

* Update flowPreviewnet.ts

* Update gentle-jokes-rule.md

---------

Co-authored-by: jxom <jakemoxey@gmail.com>
  • Loading branch information
bthaile and jxom committed Mar 13, 2024
1 parent 798b346 commit b078820
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/gentle-jokes-rule.md
@@ -0,0 +1,5 @@
---
"viem": patch
---

Added Flow previewnet evm network
22 changes: 22 additions & 0 deletions src/chains/definitions/flowMainnet.ts
@@ -0,0 +1,22 @@
import { defineChain } from '../../utils/chain/defineChain.js'

export const flowMainnet= /*#__PURE__*/ defineChain({
id: 747,
name: 'FlowEVM Mainnet',
nativeCurrency: {
decimals: 18,
name: 'Flow',
symbol: 'FLOW',
},
rpcUrls: {
default: {
http: ['https://mainnet.evm.nodes.onflow.org']
},
},
blockExplorers: {
default: {
name: 'Mainnet Explorer',
url: 'https://flowdiver.io',
},
},
})
22 changes: 22 additions & 0 deletions src/chains/definitions/flowPreviewnet.ts
@@ -0,0 +1,22 @@
import { defineChain } from '../../utils/chain/defineChain.js'

export const flowPreviewnet = /*#__PURE__*/ defineChain({
id: 646,
name: 'FlowEVM Previewnet',
nativeCurrency: {
decimals: 18,
name: 'Flow',
symbol: 'FLOW',
},
rpcUrls: {
default: {
http: ['https://previewnet.evm.nodes.onflow.org']
},
},
blockExplorers: {
default: {
name: 'Previewnet Explorer',
url: 'https://previewnet.flowdiver.io',
},
},
})
2 changes: 2 additions & 0 deletions src/chains/index.ts
Expand Up @@ -72,6 +72,8 @@ export { filecoinCalibration } from './definitions/filecoinCalibration.js'
export { filecoinHyperspace } from './definitions/filecoinHyperspace.js'
export { flare } from './definitions/flare.js'
export { flareTestnet } from './definitions/flareTestnet.js'
export { flowPreviewnet } from './definitions/flowPreviewnet.js'
export { flowMainnet } from './definitions/flowMainnet.js'
/** @deprecated Use `anvil` instead. */
export { foundry } from './definitions/foundry.js'
export { fraxtal } from './definitions/fraxtal.js'
Expand Down

0 comments on commit b078820

Please sign in to comment.