Skip to content

Commit

Permalink
feat: add cyber mainnet (#2180)
Browse files Browse the repository at this point in the history
* add cyber mainnet

* Create chatty-sheep-knock.md

---------

Co-authored-by: jxom <jakemoxey@gmail.com>
  • Loading branch information
PengDeng-Cyber and jxom committed Apr 24, 2024
1 parent a3544f1 commit 27bc03e
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/chatty-sheep-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

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

export const cyber = /*#__PURE__*/ defineChain({
id: 7_560,
name: 'Cyber',
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: {
default: {
http: ['https://cyber.alt.technology'],
},
},
blockExplorers: {
default: {
name: 'Blockscout',
url: 'https://cyberscan.co',
apiUrl: 'https://cyberscan.co/api',
},
},
contracts: {
multicall3: {
address: '0xd1A3cb95E97Abc83777Ced3d474CCdD1AC948F0E',
blockCreated: 43798,
},
},
testnet: true,
})
4 changes: 2 additions & 2 deletions src/chains/definitions/cyberTestnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export const cyberTestnet = /*#__PURE__*/ defineChain({
blockExplorers: {
default: {
name: 'Blockscout',
url: 'https://cyber-testnet-explorer.alt.technology',
apiUrl: 'https://cyber-testnet-explorer.alt.technology/api',
url: 'https://testnet.cyberscan.co',
apiUrl: 'https://testnet.cyberscan.co/api',
},
},
contracts: {
Expand Down
1 change: 1 addition & 0 deletions src/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export { coreDao } from './definitions/coreDao.js'
export { cronos } from './definitions/cronos.js'
export { cronosTestnet } from './definitions/cronosTestnet.js'
export { crossbell } from './definitions/crossbell.js'
export { cyber } from './definitions/cyber.js'
export { cyberTestnet } from './definitions/cyberTestnet.js'
export { darwinia } from './definitions/darwinia.js'
export { defichainEvm } from './definitions/defichainEvm.js'
Expand Down

0 comments on commit 27bc03e

Please sign in to comment.