diff --git a/.changeset/bright-birds-know.md b/.changeset/bright-birds-know.md new file mode 100644 index 00000000000..517826de9a9 --- /dev/null +++ b/.changeset/bright-birds-know.md @@ -0,0 +1,5 @@ +--- +"viem": patch +--- + +Updated XDC Testnet Block Explorer URL. diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 19f1b3dcad3..952a469b103 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -168,7 +168,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.35(typescript@5.4.2)(zod@3.22.4) + version: 2.21.36(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -181,7 +181,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.35(typescript@5.5.4)(zod@3.22.4) + version: 2.21.36(typescript@5.5.4)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -194,7 +194,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.35(typescript@5.4.2)(zod@3.22.4) + version: 2.21.36(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -207,7 +207,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.35(typescript@5.4.2)(zod@3.22.4) + version: 2.21.36(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -220,7 +220,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.35(typescript@5.4.2)(zod@3.22.4) + version: 2.21.36(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -239,7 +239,7 @@ importers: version: 18.2.0(react@18.2.0) viem: specifier: latest - version: 2.21.35(typescript@5.4.2)(zod@3.22.4) + version: 2.21.36(typescript@5.4.2)(zod@3.22.4) devDependencies: '@types/react': specifier: ^18.0.27 @@ -267,7 +267,7 @@ importers: version: 18.2.0(react@18.2.0) viem: specifier: latest - version: 2.21.35(typescript@5.4.2)(zod@3.22.4) + version: 2.21.36(typescript@5.4.2)(zod@3.22.4) devDependencies: '@types/react': specifier: ^18.0.27 @@ -289,7 +289,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.35(typescript@5.4.2)(zod@3.22.4) + version: 2.21.36(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -302,7 +302,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.35(typescript@5.4.2)(zod@3.22.4) + version: 2.21.36(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -321,7 +321,7 @@ importers: version: 18.2.0(react@18.2.0) viem: specifier: latest - version: 2.21.35(typescript@5.4.2)(zod@3.22.4) + version: 2.21.36(typescript@5.4.2)(zod@3.22.4) devDependencies: '@types/react': specifier: ^18.0.27 @@ -343,7 +343,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.35(typescript@5.4.2)(zod@3.22.4) + version: 2.21.36(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -356,7 +356,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.35(typescript@5.4.2)(zod@3.22.4) + version: 2.21.36(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -369,7 +369,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.35(typescript@5.4.2)(zod@3.22.4) + version: 2.21.36(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -382,7 +382,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.35(typescript@5.4.2)(zod@3.22.4) + version: 2.21.36(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -429,7 +429,7 @@ importers: version: 18.2.0(react@18.2.0) viem: specifier: latest - version: 2.21.35(typescript@5.4.2)(zod@3.22.4) + version: 2.21.36(typescript@5.4.2)(zod@3.22.4) devDependencies: '@types/react': specifier: ^18.0.27 @@ -457,7 +457,7 @@ importers: version: 18.2.0(react@18.2.0) viem: specifier: latest - version: 2.21.35(typescript@5.5.4)(zod@3.22.4) + version: 2.21.36(typescript@5.5.4)(zod@3.22.4) devDependencies: '@types/react': specifier: ^18.0.27 @@ -479,7 +479,7 @@ importers: dependencies: viem: specifier: latest - version: 2.21.35(typescript@5.4.2)(zod@3.22.4) + version: 2.21.36(typescript@5.4.2)(zod@3.22.4) devDependencies: typescript: specifier: ^5.0.3 @@ -498,7 +498,7 @@ importers: version: 18.2.0(react@18.2.0) viem: specifier: latest - version: 2.21.35(typescript@5.4.2)(zod@3.22.4) + version: 2.21.36(typescript@5.4.2)(zod@3.22.4) devDependencies: '@types/react': specifier: ^18.0.27 @@ -5551,8 +5551,8 @@ packages: vfile@6.0.1: resolution: {integrity: sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==} - viem@2.21.35: - resolution: {integrity: sha512-f3EFc5JILeA9veuNymUN8HG/nKP9ykC0NCgwFrZWuxcCc822GaP0IEnkRBsHGqmjwbz//FxJFmvtx7TBcdVs0A==} + viem@2.21.36: + resolution: {integrity: sha512-rKQj4EiA/usM2bY1/lYGaiHg17T4By6vbFPiomtod4evi0IH91ZPFI5lDOz1dnUVqQTNOJhKkwQupN3ahuRhHQ==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -6961,7 +6961,7 @@ snapshots: pino-http: 8.6.1 pino-pretty: 10.3.1 prom-client: 14.2.0 - viem: 2.21.35(typescript@5.6.2)(zod@3.22.4) + viem: 2.21.36(typescript@5.6.2)(zod@3.22.4) yargs: 17.7.2 zod: 3.22.4 zod-validation-error: 1.5.0(zod@3.22.4) @@ -11536,7 +11536,7 @@ snapshots: unist-util-stringify-position: 4.0.0 vfile-message: 4.0.2 - viem@2.21.35(typescript@5.4.2)(zod@3.22.4): + viem@2.21.36(typescript@5.4.2)(zod@3.22.4): dependencies: '@adraffy/ens-normalize': 1.11.0 '@noble/curves': 1.6.0 @@ -11554,7 +11554,7 @@ snapshots: - utf-8-validate - zod - viem@2.21.35(typescript@5.5.4)(zod@3.22.4): + viem@2.21.36(typescript@5.5.4)(zod@3.22.4): dependencies: '@adraffy/ens-normalize': 1.11.0 '@noble/curves': 1.6.0 @@ -11572,7 +11572,7 @@ snapshots: - utf-8-validate - zod - viem@2.21.35(typescript@5.6.2)(zod@3.22.4): + viem@2.21.36(typescript@5.6.2)(zod@3.22.4): dependencies: '@adraffy/ens-normalize': 1.11.0 '@noble/curves': 1.6.0 diff --git a/site/pages/op-stack/chains.md b/site/pages/op-stack/chains.md index 649998e67cf..bad66301a95 100644 --- a/site/pages/op-stack/chains.md +++ b/site/pages/op-stack/chains.md @@ -9,6 +9,7 @@ import { baseSepolia, // [!code hl] fraxtal, // [!code hl] fraxtalTestnet, // [!code hl] + inkSepolia, // [!code hl] optimism, // [!code hl] optimismGoerli, // [!code hl] optimismSepolia, // [!code hl] diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md index b3f7368ec03..e61ed1926ff 100644 --- a/src/CHANGELOG.md +++ b/src/CHANGELOG.md @@ -1,5 +1,15 @@ # viem +## 2.21.37 + +### Patch Changes + +- [#2940](https://github.com/wevm/viem/pull/2940) [`c1ef3b7902a67aed76cac72ba469ff8c709287a6`](https://github.com/wevm/viem/commit/c1ef3b7902a67aed76cac72ba469ff8c709287a6) Thanks [@Zhangnong](https://github.com/Zhangnong)! - Added Theta chain. + +- [#2941](https://github.com/wevm/viem/pull/2941) [`3bf2526a650a4208e95d4623a7bbc1d9f3fb893e`](https://github.com/wevm/viem/commit/3bf2526a650a4208e95d4623a7bbc1d9f3fb893e) Thanks [@Zhangnong](https://github.com/Zhangnong)! - Added Glide Protocol. + +- [#2942](https://github.com/wevm/viem/pull/2942) [`12347cf1f91f9a7d04a619b7c2f1b202842d43f5`](https://github.com/wevm/viem/commit/12347cf1f91f9a7d04a619b7c2f1b202842d43f5) Thanks [@ink-alexander](https://github.com/ink-alexander)! - Added Ink Sepolia chain configurations + ## 2.21.36 ### Patch Changes diff --git a/src/chains/definitions/glideL1Protocol.ts b/src/chains/definitions/glideL1Protocol.ts new file mode 100644 index 00000000000..4b5336e9726 --- /dev/null +++ b/src/chains/definitions/glideL1Protocol.ts @@ -0,0 +1,20 @@ +import { defineChain } from '../../utils/chain/defineChain.js' + +export const glideL1Protocol = /*#__PURE__*/ defineChain({ + id: 251, + name: 'Glide L1 Protocol XP', + nativeCurrency: { name: 'GLXP', symbol: 'GLXP', decimals: 18 }, + rpcUrls: { + default: { + http: ['https://rpc-api.glideprotocol.xyz/l1-rpc'], + webSocket: ['wss://rpc-api.glideprotocol.xyz/l1-rpc'], + }, + }, + blockExplorers: { + default: { + name: 'Glide Protocol Explore', + url: 'https://blockchain-explorer.glideprotocol.xyz', + }, + }, + testnet: false, +}) diff --git a/src/chains/definitions/glideL2Protocol.ts b/src/chains/definitions/glideL2Protocol.ts new file mode 100644 index 00000000000..ee802c1757f --- /dev/null +++ b/src/chains/definitions/glideL2Protocol.ts @@ -0,0 +1,20 @@ +import { defineChain } from '../../utils/chain/defineChain.js' + +export const glideL2Protocol = /*#__PURE__*/ defineChain({ + id: 253, + name: 'Glide L2 Protocol XP', + nativeCurrency: { name: 'GLXP', symbol: 'GLXP', decimals: 18 }, + rpcUrls: { + default: { + http: ['https://rpc-api.glideprotocol.xyz/l2-rpc'], + webSocket: ['wss://rpc-api.glideprotocol.xyz/l2-rpc'], + }, + }, + blockExplorers: { + default: { + name: 'Glide Protocol Explore', + url: 'https://blockchain-explorer.glideprotocol.xyz', + }, + }, + testnet: false, +}) diff --git a/src/chains/definitions/inkSepolia.ts b/src/chains/definitions/inkSepolia.ts new file mode 100644 index 00000000000..b57576bd942 --- /dev/null +++ b/src/chains/definitions/inkSepolia.ts @@ -0,0 +1,43 @@ +import { chainConfig } from '../../op-stack/chainConfig.js' +import { defineChain } from '../../utils/chain/defineChain.js' + +const sourceId = 11_155_111 // sepolia + +export const inkSepolia = /*#__PURE__*/ defineChain({ + ...chainConfig, + id: 763373, + name: 'Ink Sepolia', + nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 }, + rpcUrls: { + default: { + http: ['https://rpc-gel-sepolia.inkonchain.com'], + }, + }, + blockExplorers: { + default: { + name: 'Blockscout', + url: 'https://explorer-sepolia.inkonchain.com/', + apiUrl: 'https://explorer-sepolia.inkonchain.com/api/v2', + }, + }, + contracts: { + ...chainConfig.contracts, + disputeGameFactory: { + [sourceId]: { + address: '0x860e626c700af381133d9f4af31412a2d1db3d5d', + }, + }, + portal: { + [sourceId]: { + address: '0x5c1d29c6c9c8b0800692acc95d700bcb4966a1d7', + }, + }, + l1StandardBridge: { + [sourceId]: { + address: '0x33f60714bbd74d62b66d79213c348614de51901c', + }, + }, + }, + testnet: true, + sourceId, +}) diff --git a/src/chains/definitions/theta.ts b/src/chains/definitions/theta.ts new file mode 100644 index 00000000000..bb38fce11a7 --- /dev/null +++ b/src/chains/definitions/theta.ts @@ -0,0 +1,19 @@ +import { defineChain } from '../../utils/chain/defineChain.js' + +export const theta = /*#__PURE__*/ defineChain({ + id: 361, + name: 'Theta Mainnet', + nativeCurrency: { name: 'TFUEL', symbol: 'TFUEL', decimals: 18 }, + rpcUrls: { + default: { + http: ['https://eth-rpc-api.thetatoken.org/rpc'], + }, + }, + blockExplorers: { + default: { + name: 'Theta Explorer', + url: 'https://explorer.thetatoken.org', + }, + }, + testnet: false, +}) diff --git a/src/chains/definitions/thetaTestnet.ts b/src/chains/definitions/thetaTestnet.ts new file mode 100644 index 00000000000..0a1cd22b28b --- /dev/null +++ b/src/chains/definitions/thetaTestnet.ts @@ -0,0 +1,19 @@ +import { defineChain } from '../../utils/chain/defineChain.js' + +export const thetaTestnet = /*#__PURE__*/ defineChain({ + id: 365, + name: 'Theta Testnet', + nativeCurrency: { name: 'TFUEL', symbol: 'TFUEL', decimals: 18 }, + rpcUrls: { + default: { + http: ['https://eth-rpc-api-testnet.thetatoken.org/rpc'], + }, + }, + blockExplorers: { + default: { + name: 'Theta Explorer', + url: 'https://testnet-explorer.thetatoken.org', + }, + }, + testnet: true, +}) diff --git a/src/chains/definitions/xdcTestnet.ts b/src/chains/definitions/xdcTestnet.ts index 8fe474702c2..3cfcbabb22e 100644 --- a/src/chains/definitions/xdcTestnet.ts +++ b/src/chains/definitions/xdcTestnet.ts @@ -13,8 +13,8 @@ export const xdcTestnet = /*#__PURE__*/ defineChain({ }, blockExplorers: { default: { - name: 'Blocksscan', - url: 'https://apothem.blocksscan.io', + name: 'XDCScan', + url: 'https://testnet.xdcscan.com', }, }, contracts: { diff --git a/src/chains/index.ts b/src/chains/index.ts index d75d80f195a..ef3ae7c5a78 100644 --- a/src/chains/index.ts +++ b/src/chains/index.ts @@ -152,6 +152,8 @@ export { fusion } from './definitions/fusion.js' export { fusionTestnet } from './definitions/fusionTestnet.js' export { garnet } from './definitions/garnet.js' export { genesys } from './definitions/genesys.js' +export { glideL1Protocol } from './definitions/glideL1Protocol.js' +export { glideL2Protocol } from './definitions/glideL2Protocol.js' export { gnosis } from './definitions/gnosis.js' export { gnosisChiado } from './definitions/gnosisChiado.js' export { gobi } from './definitions/gobi.js' @@ -176,6 +178,7 @@ export { hychainTestnet } from './definitions/hychainTestnet.js' export { immutableZkEvm } from './definitions/immutableZkEvm.js' export { immutableZkEvmTestnet } from './definitions/immutableZkEvmTestnet.js' export { inEVM } from './definitions/inEVM.js' +export { inkSepolia } from './definitions/inkSepolia.js' export { iota } from './definitions/iota.js' export { iotaTestnet } from './definitions/iotaTestnet.js' export { iotex } from './definitions/iotex.js' @@ -370,6 +373,8 @@ export { telosTestnet } from './definitions/telosTestnet.js' export { tenet } from './definitions/tenet.js' export { thaiChain } from './definitions/thaiChain.js' export { that } from './definitions/that.js' +export { theta } from './definitions/theta.js' +export { thetaTestnet } from './definitions/thetaTestnet.js' export { thunderCore } from './definitions/thunderCore.js' export { thunderTestnet } from './definitions/thunderTestnet.js' export { tiktrixTestnet } from './definitions/tiktrixTestnet.js' diff --git a/src/errors/version.ts b/src/errors/version.ts index 50a4e4b6238..86e1e1c3919 100644 --- a/src/errors/version.ts +++ b/src/errors/version.ts @@ -1 +1 @@ -export const version = '2.21.36' +export const version = '2.21.37' diff --git a/src/jsr.json b/src/jsr.json index 97bd0b474f3..072a6a8b422 100644 --- a/src/jsr.json +++ b/src/jsr.json @@ -1,6 +1,6 @@ { "name": "@wevm/viem", - "version": "2.21.36", + "version": "2.21.37", "exports": { ".": "./index.ts", "./accounts-abstraction": "./account-abstraction/index.ts", diff --git a/src/op-stack/chains.ts b/src/op-stack/chains.ts index 1d58f288729..97f51926702 100644 --- a/src/op-stack/chains.ts +++ b/src/op-stack/chains.ts @@ -6,6 +6,7 @@ export { baseGoerli } from '../chains/definitions/baseGoerli.js' export { baseSepolia } from '../chains/definitions/baseSepolia.js' export { fraxtal } from '../chains/definitions/fraxtal.js' export { fraxtalTestnet } from '../chains/definitions/fraxtalTestnet.js' +export { inkSepolia } from '../chains/definitions/inkSepolia.js' export { metalL2 } from '../chains/definitions/metalL2.js' export { optimism } from '../chains/definitions/optimism.js' export { optimismGoerli } from '../chains/definitions/optimismGoerli.js' diff --git a/src/package.json b/src/package.json index 9e055a8629d..5b6d19e7a04 100644 --- a/src/package.json +++ b/src/package.json @@ -1,7 +1,7 @@ { "name": "viem", "description": "TypeScript Interface for Ethereum", - "version": "2.21.36", + "version": "2.21.37", "type": "module", "main": "./_cjs/index.js", "module": "./_esm/index.js",