Skip to content

Commit

Permalink
feat: add Corn maizenet (#3071)
Browse files Browse the repository at this point in the history
* feat: added corn maizenet

* feat: modified explorer api

* feat: remove sourceid

* feat: revert sourceid removal
  • Loading branch information
sajanrajdev authored Nov 28, 2024
1 parent 6edad02 commit 29fc493
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/shaggy-jokes-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

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

const sourceId = 1 // mainnet

export const corn = /*#__PURE__*/ defineChain({
id: 21_000_000,
name: 'Corn Maizenet',
nativeCurrency: {
decimals: 18,
name: 'Bitcorn',
symbol: 'BTCN',
},
rpcUrls: {
default: { http: ['https://rpc.ankr.com/corn_maizenet'] },
},
blockExplorers: {
default: {
name: 'Corn Explorer',
url: 'https://cornscan.io',
apiUrl:
'https://api.routescan.io/v2/network/mainnet/evm/21000000/etherscan/api',
},
},
contracts: {
multicall3: {
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
blockCreated: 3228,
},
},
sourceId,
})
1 change: 1 addition & 0 deletions src/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export { coinex } from './definitions/coinex.js'
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 { crab } from './definitions/crab.js'
export { cronos } from './definitions/cronos.js'
export { cronosTestnet } from './definitions/cronosTestnet.js'
Expand Down

0 comments on commit 29fc493

Please sign in to comment.