Skip to content

Commit

Permalink
feat: add Corn testnet (#3072)
Browse files Browse the repository at this point in the history
feat: added corn testnet

Co-authored-by: jxom <7336481+jxom@users.noreply.github.com>
  • Loading branch information
sajanrajdev and jxom authored Nov 28, 2024
1 parent 29fc493 commit c2beb14
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/real-hairs-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

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

const sourceId = 11_155_111 // sepolia

export const cornTestnet = /*#__PURE__*/ defineChain({
id: 21_000_001,
name: 'Corn Testnet',
nativeCurrency: {
decimals: 18,
name: 'Bitcorn',
symbol: 'BTCN',
},
rpcUrls: {
default: { http: ['https://rpc.ankr.com/corn_testnet'] },
},
blockExplorers: {
default: {
name: 'Corn Testnet Explorer',
url: 'https://testnet.cornscan.io',
apiUrl:
'https://api.routescan.io/v2/network/testnet/evm/21000001/etherscan/api',
},
},
contracts: {
multicall3: {
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
blockCreated: 4886,
},
},
testnet: true,
sourceId,
})
1 change: 1 addition & 0 deletions src/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export { confluxESpace } from './definitions/confluxESpace.js'
export { confluxESpaceTestnet } from './definitions/confluxESpaceTestnet.js'
export { coreDao } from './definitions/coreDao.js'
export { corn } from './definitions/corn.js'
export { cornTestnet } from './definitions/cornTestnet.js'
export { crab } from './definitions/crab.js'
export { cronos } from './definitions/cronos.js'
export { cronosTestnet } from './definitions/cronosTestnet.js'
Expand Down

0 comments on commit c2beb14

Please sign in to comment.