Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove chain type declaration #622

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/viem/scripts/templates/chains.eta
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// DO NOT MODIFY THIS FILE IS AUTOGENERATED
import type { Chain } from 'viem'
import { defineChain } from 'viem'
import { chainConfig } from 'viem/op-stack'

<%- it.chainDefs.forEach(function(chainDef){ %>
/**
* Chain Definition for <%= chainDef.chainName %>
*/
export const <%= chainDef.exportName %>: Chain = defineChain({
export const <%= chainDef.exportName %> = /*#__PURE__*/ defineChain({
...chainConfig,
name: '<%= chainDef.chainName %>',
id: <%= chainDef.chainId %>,
Expand Down
45 changes: 22 additions & 23 deletions packages/viem/src/chains/mainnet.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// DO NOT MODIFY THIS FILE IS AUTOGENERATED
import type { Chain } from 'viem'
import { defineChain } from 'viem'
import { chainConfig } from 'viem/op-stack'

/**
* Chain Definition for arena-z
*/
export const arenaZMainnet: Chain = defineChain({
export const arenaZMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'arena-z',
id: 7897,
Expand Down Expand Up @@ -65,7 +64,7 @@ export const arenaZMainnet: Chain = defineChain({
/**
* Chain Definition for Automata Mainnet
*/
export const automataMainnet: Chain = defineChain({
export const automataMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Automata Mainnet',
id: 65536,
Expand Down Expand Up @@ -129,7 +128,7 @@ export const automataMainnet: Chain = defineChain({
/**
* Chain Definition for Base
*/
export const baseMainnet: Chain = defineChain({
export const baseMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Base',
id: 8453,
Expand Down Expand Up @@ -193,7 +192,7 @@ export const baseMainnet: Chain = defineChain({
/**
* Chain Definition for Cyber Mainnet
*/
export const cyberMainnet: Chain = defineChain({
export const cyberMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Cyber Mainnet',
id: 7560,
Expand Down Expand Up @@ -257,7 +256,7 @@ export const cyberMainnet: Chain = defineChain({
/**
* Chain Definition for Ethernity
*/
export const ethernityMainnet: Chain = defineChain({
export const ethernityMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Ethernity',
id: 183,
Expand Down Expand Up @@ -321,7 +320,7 @@ export const ethernityMainnet: Chain = defineChain({
/**
* Chain Definition for Funki
*/
export const funkiMainnet: Chain = defineChain({
export const funkiMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Funki',
id: 33979,
Expand Down Expand Up @@ -385,7 +384,7 @@ export const funkiMainnet: Chain = defineChain({
/**
* Chain Definition for Ink
*/
export const inkMainnet: Chain = defineChain({
export const inkMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Ink',
id: 57073,
Expand Down Expand Up @@ -444,7 +443,7 @@ export const inkMainnet: Chain = defineChain({
/**
* Chain Definition for Lisk
*/
export const liskMainnet: Chain = defineChain({
export const liskMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Lisk',
id: 1135,
Expand Down Expand Up @@ -508,7 +507,7 @@ export const liskMainnet: Chain = defineChain({
/**
* Chain Definition for Lyra Chain
*/
export const lyraMainnet: Chain = defineChain({
export const lyraMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Lyra Chain',
id: 957,
Expand Down Expand Up @@ -567,7 +566,7 @@ export const lyraMainnet: Chain = defineChain({
/**
* Chain Definition for Metal L2
*/
export const metalMainnet: Chain = defineChain({
export const metalMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Metal L2',
id: 1750,
Expand Down Expand Up @@ -626,7 +625,7 @@ export const metalMainnet: Chain = defineChain({
/**
* Chain Definition for Mode
*/
export const modeMainnet: Chain = defineChain({
export const modeMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Mode',
id: 34443,
Expand Down Expand Up @@ -685,7 +684,7 @@ export const modeMainnet: Chain = defineChain({
/**
* Chain Definition for OP Mainnet
*/
export const opMainnet: Chain = defineChain({
export const opMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'OP Mainnet',
id: 10,
Expand Down Expand Up @@ -744,7 +743,7 @@ export const opMainnet: Chain = defineChain({
/**
* Chain Definition for Orderly Mainnet
*/
export const orderlyMainnet: Chain = defineChain({
export const orderlyMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Orderly Mainnet',
id: 291,
Expand Down Expand Up @@ -803,7 +802,7 @@ export const orderlyMainnet: Chain = defineChain({
/**
* Chain Definition for RACE Mainnet
*/
export const raceMainnet: Chain = defineChain({
export const raceMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'RACE Mainnet',
id: 6805,
Expand Down Expand Up @@ -862,7 +861,7 @@ export const raceMainnet: Chain = defineChain({
/**
* Chain Definition for Redstone
*/
export const redstoneMainnet: Chain = defineChain({
export const redstoneMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Redstone',
id: 690,
Expand Down Expand Up @@ -926,7 +925,7 @@ export const redstoneMainnet: Chain = defineChain({
/**
* Chain Definition for Shape
*/
export const shapeMainnet: Chain = defineChain({
export const shapeMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Shape',
id: 360,
Expand Down Expand Up @@ -990,7 +989,7 @@ export const shapeMainnet: Chain = defineChain({
/**
* Chain Definition for Superseed
*/
export const sseedMainnet: Chain = defineChain({
export const sseedMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Superseed',
id: 5330,
Expand Down Expand Up @@ -1054,7 +1053,7 @@ export const sseedMainnet: Chain = defineChain({
/**
* Chain Definition for Swan Chain Mainnet
*/
export const swanMainnet: Chain = defineChain({
export const swanMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Swan Chain Mainnet',
id: 254,
Expand Down Expand Up @@ -1118,7 +1117,7 @@ export const swanMainnet: Chain = defineChain({
/**
* Chain Definition for Swellchain
*/
export const swellMainnet: Chain = defineChain({
export const swellMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Swellchain',
id: 1923,
Expand Down Expand Up @@ -1177,7 +1176,7 @@ export const swellMainnet: Chain = defineChain({
/**
* Chain Definition for Binary Mainnet
*/
export const tbnMainnet: Chain = defineChain({
export const tbnMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Binary Mainnet',
id: 624,
Expand Down Expand Up @@ -1241,7 +1240,7 @@ export const tbnMainnet: Chain = defineChain({
/**
* Chain Definition for World Chain
*/
export const worldchainMainnet: Chain = defineChain({
export const worldchainMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'World Chain',
id: 480,
Expand Down Expand Up @@ -1305,7 +1304,7 @@ export const worldchainMainnet: Chain = defineChain({
/**
* Chain Definition for Zora
*/
export const zoraMainnet: Chain = defineChain({
export const zoraMainnet = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Zora',
id: 7777777,
Expand Down
35 changes: 17 additions & 18 deletions packages/viem/src/chains/sepolia.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// DO NOT MODIFY THIS FILE IS AUTOGENERATED
import type { Chain } from 'viem'
import { defineChain } from 'viem'
import { chainConfig } from 'viem/op-stack'

/**
* Chain Definition for arena-z-testnet
*/
export const arenaZSepolia: Chain = defineChain({
export const arenaZSepolia = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'arena-z-testnet',
id: 9897,
Expand Down Expand Up @@ -70,7 +69,7 @@ export const arenaZSepolia: Chain = defineChain({
/**
* Chain Definition for Base Sepolia Testnet
*/
export const baseSepolia: Chain = defineChain({
export const baseSepolia = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Base Sepolia Testnet',
id: 84532,
Expand Down Expand Up @@ -129,7 +128,7 @@ export const baseSepolia: Chain = defineChain({
/**
* Chain Definition for Cyber Testnet
*/
export const cyberSepolia: Chain = defineChain({
export const cyberSepolia = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Cyber Testnet',
id: 111557560,
Expand Down Expand Up @@ -193,7 +192,7 @@ export const cyberSepolia: Chain = defineChain({
/**
* Chain Definition for Ethernity Testnet
*/
export const ethernitySepolia: Chain = defineChain({
export const ethernitySepolia = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Ethernity Testnet',
id: 233,
Expand Down Expand Up @@ -257,7 +256,7 @@ export const ethernitySepolia: Chain = defineChain({
/**
* Chain Definition for Funki Sepolia Testnet
*/
export const funkiSepolia: Chain = defineChain({
export const funkiSepolia = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Funki Sepolia Testnet',
id: 3397901,
Expand Down Expand Up @@ -321,7 +320,7 @@ export const funkiSepolia: Chain = defineChain({
/**
* Chain Definition for Ink Sepolia
*/
export const inkSepolia: Chain = defineChain({
export const inkSepolia = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Ink Sepolia',
id: 763373,
Expand Down Expand Up @@ -380,7 +379,7 @@ export const inkSepolia: Chain = defineChain({
/**
* Chain Definition for Lisk Sepolia Testnet
*/
export const liskSepolia: Chain = defineChain({
export const liskSepolia = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Lisk Sepolia Testnet',
id: 4202,
Expand Down Expand Up @@ -444,7 +443,7 @@ export const liskSepolia: Chain = defineChain({
/**
* Chain Definition for Metal L2 Testnet
*/
export const metalSepolia: Chain = defineChain({
export const metalSepolia = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Metal L2 Testnet',
id: 1740,
Expand Down Expand Up @@ -503,7 +502,7 @@ export const metalSepolia: Chain = defineChain({
/**
* Chain Definition for Minato
*/
export const minatoSepolia: Chain = defineChain({
export const minatoSepolia = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Minato',
id: 1946,
Expand Down Expand Up @@ -567,7 +566,7 @@ export const minatoSepolia: Chain = defineChain({
/**
* Chain Definition for Mode Testnet
*/
export const modeSepolia: Chain = defineChain({
export const modeSepolia = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Mode Testnet',
id: 919,
Expand Down Expand Up @@ -626,7 +625,7 @@ export const modeSepolia: Chain = defineChain({
/**
* Chain Definition for OP Sepolia Testnet
*/
export const opSepolia: Chain = defineChain({
export const opSepolia = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'OP Sepolia Testnet',
id: 11155420,
Expand Down Expand Up @@ -685,7 +684,7 @@ export const opSepolia: Chain = defineChain({
/**
* Chain Definition for RACE Testnet
*/
export const raceSepolia: Chain = defineChain({
export const raceSepolia = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'RACE Testnet',
id: 6806,
Expand Down Expand Up @@ -744,7 +743,7 @@ export const raceSepolia: Chain = defineChain({
/**
* Chain Definition for Shape Sepolia Testnet
*/
export const shapeSepolia: Chain = defineChain({
export const shapeSepolia = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Shape Sepolia Testnet',
id: 11011,
Expand Down Expand Up @@ -808,7 +807,7 @@ export const shapeSepolia: Chain = defineChain({
/**
* Chain Definition for Binary Sepolia
*/
export const tbnSepolia: Chain = defineChain({
export const tbnSepolia = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Binary Sepolia',
id: 625,
Expand Down Expand Up @@ -872,7 +871,7 @@ export const tbnSepolia: Chain = defineChain({
/**
* Chain Definition for Unichain Sepolia Testnet
*/
export const unichainSepolia: Chain = defineChain({
export const unichainSepolia = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Unichain Sepolia Testnet',
id: 1301,
Expand Down Expand Up @@ -931,7 +930,7 @@ export const unichainSepolia: Chain = defineChain({
/**
* Chain Definition for World Chain Sepolia Testnet
*/
export const worldchainSepolia: Chain = defineChain({
export const worldchainSepolia = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'World Chain Sepolia Testnet',
id: 4801,
Expand Down Expand Up @@ -995,7 +994,7 @@ export const worldchainSepolia: Chain = defineChain({
/**
* Chain Definition for Zora Sepolia Testnet
*/
export const zoraSepolia: Chain = defineChain({
export const zoraSepolia = /*#__PURE__*/ defineChain({
...chainConfig,
name: 'Zora Sepolia Testnet',
id: 999999999,
Expand Down
Loading