From ebc85ece926896aa3ba9ac705cfe9c9c08d72162 Mon Sep 17 00:00:00 2001 From: Glitch <66949816+glitch-txs@users.noreply.github.com> Date: Wed, 9 Aug 2023 00:52:19 -0300 Subject: [PATCH] feat: add Ronin and Saigon chains (#434) * add Ronin and Saigon chains * fix ronin chain name * fix ronin and saigon export order * fix ronin and saigon export order * Update saigon.ts * Update ronin.ts --------- Co-authored-by: jxom --- .changeset/odd-avocados-invite.md | 5 +++++ packages/chains/src/index.ts | 2 ++ packages/chains/src/ronin.ts | 25 +++++++++++++++++++++++++ packages/chains/src/saigon.ts | 29 +++++++++++++++++++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 .changeset/odd-avocados-invite.md create mode 100644 packages/chains/src/ronin.ts create mode 100644 packages/chains/src/saigon.ts diff --git a/.changeset/odd-avocados-invite.md b/.changeset/odd-avocados-invite.md new file mode 100644 index 00000000..14815ca3 --- /dev/null +++ b/.changeset/odd-avocados-invite.md @@ -0,0 +1,5 @@ +--- +"@wagmi/chains": minor +--- + +Added Ronin and Saigon chains diff --git a/packages/chains/src/index.ts b/packages/chains/src/index.ts index 3d9543e4..20434f4e 100644 --- a/packages/chains/src/index.ts +++ b/packages/chains/src/index.ts @@ -82,6 +82,8 @@ export { polygonZkEvmTestnet } from './polygonZkEvmTestnet' export { polygonZkEvm } from './polygonZkEvm' export { pulsechain } from './pulsechain' export { pulsechainV4 } from './pulsechainV4' +export { ronin } from './ronin' +export { saigon } from './saigon' export { scrollSepolia } from './scrollSepolia' export { scrollTestnet } from './scrollTestnet' export { sepolia } from './sepolia' diff --git a/packages/chains/src/ronin.ts b/packages/chains/src/ronin.ts new file mode 100644 index 00000000..2a3d7d7e --- /dev/null +++ b/packages/chains/src/ronin.ts @@ -0,0 +1,25 @@ +import { Chain } from './types' + +export const ronin = { + id: 2020, + name: 'Ronin', + network: 'ronin', + nativeCurrency: { name: 'RON', symbol: 'RON', decimals: 18 }, + rpcUrls: { + default: { + http: ['https://api.roninchain.com/rpc'], + }, + public: { + http: ['https://api.roninchain.com/rpc'], + }, + }, + blockExplorers: { + default: { name: 'Ronin Explorer', url: 'https://app.roninchain.com' }, + }, + contracts: { + multicall3: { + address: '0xca11bde05977b3631167028862be2a173976ca11', + blockCreated: 26023535, + }, + }, +} as const satisfies Chain diff --git a/packages/chains/src/saigon.ts b/packages/chains/src/saigon.ts new file mode 100644 index 00000000..65d55621 --- /dev/null +++ b/packages/chains/src/saigon.ts @@ -0,0 +1,29 @@ +import { Chain } from './types' + +export const saigon = { + id: 2021, + name: 'Saigon Testnet', + network: 'saigon', + nativeCurrency: { name: 'RON', symbol: 'RON', decimals: 18 }, + rpcUrls: { + default: { + http: ['https://saigon-testnet.roninchain.com/rpc'], + }, + public: { + http: ['https://saigon-testnet.roninchain.com/rpc'], + }, + }, + blockExplorers: { + default: { + name: 'Saigon Explorer', + url: 'https://saigon-explorer.roninchain.com', + }, + }, + contracts: { + multicall3: { + address: '0xca11bde05977b3631167028862be2a173976ca11', + blockCreated: 18736871, + }, + }, + testnet: true, +} as const satisfies Chain