diff --git a/docs/package.json b/docs/package.json index b9614017e..05467d009 100644 --- a/docs/package.json +++ b/docs/package.json @@ -58,7 +58,7 @@ "@web3-onboard/capsule": "^2.0.1", "@web3-onboard/cede-store": "^2.2.0", "@web3-onboard/coinbase": "^2.2.7", - "@web3-onboard/core": "^2.21.6-alpha.1", + "@web3-onboard/core": "^2.21.6-alpha.2", "@web3-onboard/dcent": "^2.2.7", "@web3-onboard/enkrypt": "^2.0.4", "@web3-onboard/fortmatic": "^2.0.19", diff --git a/docs/src/routes/docs/[...1]overview/[...1]introduction/+page.md b/docs/src/routes/docs/[...1]overview/[...1]introduction/+page.md index 48a823406..4184e6799 100644 --- a/docs/src/routes/docs/[...1]overview/[...1]introduction/+page.md +++ b/docs/src/routes/docs/[...1]overview/[...1]introduction/+page.md @@ -50,7 +50,6 @@ web3-onboard supports ALL EVM networks. Supporting a new network is simply a mat - Gnosis Chain - Harmony One - Moonriver -- Goerli - Sepolia - Base Goerli - All other EVM networks diff --git a/docs/src/routes/docs/[...3]modules/[...1]core/+page.md b/docs/src/routes/docs/[...3]modules/[...1]core/+page.md index 315bc632e..ea2710599 100644 --- a/docs/src/routes/docs/[...3]modules/[...1]core/+page.md +++ b/docs/src/routes/docs/[...3]modules/[...1]core/+page.md @@ -597,7 +597,7 @@ type Notification = { type NotificationType = 'pending' | 'success' | 'error' | 'hint' -export declare type Network = 'main' | 'goerli' | 'matic-main' | 'matic-mumbai' | 'local' +export declare type Network = 'main' | 'sepolia' | 'matic-main' | 'matic-mumbai' | 'local' export interface UpdateNotification { (notificationObject: CustomNotification): { @@ -630,12 +630,6 @@ const onboard = Onboard({ label: 'Ethereum Mainnet', rpcUrl: `https://mainnet.infura.io/v3/${INFURA_ID}` }, - { - id: '0x5', - token: 'ETH', - label: 'Goerli', - rpcUrl: `https://goerli.infura.io/v3/${INFURA_ID}` - }, { id: 11155111, token: 'ETH', diff --git a/docs/src/routes/docs/[...3]modules/[...3]react/+page.md b/docs/src/routes/docs/[...3]modules/[...3]react/+page.md index 619a937b7..3b88bf1f1 100644 --- a/docs/src/routes/docs/[...3]modules/[...3]react/+page.md +++ b/docs/src/routes/docs/[...3]modules/[...3]react/+page.md @@ -109,13 +109,13 @@ the initialized web3Onboard instance will be available in all children component import { Web3OnboardProvider, init } from '@web3-onboard/react' import injectedModule from '@web3-onboard/injected-wallets' const INFURA_KEY = '' -const ethereumRopsten = { - id: '0x3', - token: 'rETH', - label: 'Ethereum Ropsten', - rpcUrl: `https://ropsten.infura.io/v3/${INFURA_KEY}` +const ethereumSepolia = { + id: 11155111, + token: 'ETH', + label: 'Sepolia', + rpcUrl: 'https://rpc.sepolia.org/' } -const chains = [ethereumRopsten] +const chains = [ethereumSepolia] const wallets = [injectedModule()] const web3Onboard = init({ wallets, diff --git a/docs/src/routes/docs/[...3]modules/[...5]transaction-preview/+page.md b/docs/src/routes/docs/[...3]modules/[...5]transaction-preview/+page.md index 43efaff0d..feca003c1 100644 --- a/docs/src/routes/docs/[...3]modules/[...5]transaction-preview/+page.md +++ b/docs/src/routes/docs/[...3]modules/[...5]transaction-preview/+page.md @@ -367,10 +367,7 @@ export type System = 'bitcoin' | 'ethereum' export type Network = | 'main' | 'testnet' - | 'ropsten' - | 'rinkeby' - | 'goerli' - | 'kovan' + | 'sepolia' | 'xdai' | 'bsc-main' | 'matic-main' diff --git a/docs/src/routes/examples/[...1]connect-wallet/+page.md b/docs/src/routes/examples/[...1]connect-wallet/+page.md index 802e90570..9e31ac428 100644 --- a/docs/src/routes/examples/[...1]connect-wallet/+page.md +++ b/docs/src/routes/examples/[...1]connect-wallet/+page.md @@ -127,10 +127,10 @@ const chains = [ rpcUrl: `https://mainnet.infura.io/v3/${INFURA_KEY}` }, { - id: '0x5', + id: 11155111, token: 'ETH', - label: 'Goerli', - rpcUrl: `https://goerli.infura.io/v3/${INFURA_KEY}` + label: 'Sepolia', + rpcUrl: 'https://rpc.sepolia.org/' }, { id: '0x13881', @@ -395,10 +395,10 @@ const chains = [ rpcUrl: `https://mainnet.infura.io/v3/${INFURA_ID}` }, { - id: '0x5', + id: 11155111, token: 'ETH', - label: 'Goerli', - rpcUrl: `https://goerli.infura.io/v3/${INFURA_ID}` + label: 'Sepolia', + rpcUrl: 'https://rpc.sepolia.org/' }, { id: '0x13881', diff --git a/docs/src/routes/examples/[...2]uniswap-widget/+page.md b/docs/src/routes/examples/[...2]uniswap-widget/+page.md index 0c20bcdb3..1fc0d0592 100644 --- a/docs/src/routes/examples/[...2]uniswap-widget/+page.md +++ b/docs/src/routes/examples/[...2]uniswap-widget/+page.md @@ -45,11 +45,11 @@ import injectedModule from '@web3-onboard/injected-wallets' const INFURA_KEY = '' -const ethereumRopsten = { - id: '0x3', - token: 'rETH', - label: 'Ethereum Ropsten', - rpcUrl: `https://ropsten.infura.io/v3/${INFURA_KEY}` +const ethereumSepolia = { + id: 11155111, + token: 'ETH', + label: 'Sepolia', + rpcUrl: 'https://rpc.sepolia.org/' } const polygonMainnet = { @@ -66,7 +66,7 @@ const degenChain = { rpcUrl: 'https://rpc.degen.tips' } -const chains = [ethereumRopsten, polygonMainnet] +const chains = [ethereumSepolia, polygonMainnet] const wallets = [injectedModule()] diff --git a/examples/with-nextjs/pages/_app.js b/examples/with-nextjs/pages/_app.js index 4222d2ef7..00e1079b2 100644 --- a/examples/with-nextjs/pages/_app.js +++ b/examples/with-nextjs/pages/_app.js @@ -4,11 +4,11 @@ import injectedModule from '@web3-onboard/injected-wallets' const INFURA_KEY = '' -const ethereumRopsten = { - id: '0x3', - token: 'rETH', - label: 'Ethereum Ropsten', - rpcUrl: `https://ropsten.infura.io/v3/${INFURA_KEY}` +const ethereumSepolia = { + id: 11155111, + token: 'ETH', + label: 'Sepolia', + rpcUrl: 'https://rpc.sepolia.org/' } const polygonMainnet = { @@ -28,15 +28,21 @@ const celoMainnet = { token: 'ETH', label: 'Celo', rpcUrl: 'https://1rpc.io/celo' -}, -{ +} +const degenMainnet = { id: 666666666, token: 'DEGEN', label: 'Degen', rpcUrl: 'https://rpc.degen.tips' } -const chains = [ethereumRopsten, polygonMainnet, baseMainnet,celoMainnet] +const chains = [ + ethereumSepolia, + polygonMainnet, + baseMainnet, + celoMainnet, + degenMainnet +] const wallets = [injectedModule()] const web3Onboard = init({ diff --git a/packages/core/README.md b/packages/core/README.md index 6b31ef7ab..2a33e37ec 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -548,7 +548,7 @@ type NotificationType = 'pending' | 'success' | 'error' | 'hint' declare type Network = | 'main' - | 'goerli' + | 'sepolia' | 'matic-main' | 'matic-mumbai' | 'local' @@ -575,7 +575,6 @@ const injected = injectedModule() // Only one RPC endpoint required per chain const ETH_MAINNET_RPC = `https://mainnet.infura.io/v3/${INFURA_KEY}` || `https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_KEY}` -const ETH_GOERLI_RPC = `https://goerli.infura.io/v3/${INFURA_ID}` || `https://eth-goerli.g.alchemy.com/v2/${ALCHEMY_KEY}` const onboard = Onboard({ // head to https://explorer.blocknative.com/account to sign up for free @@ -594,12 +593,6 @@ const onboard = Onboard({ label: 'Sepolia', rpcUrl: 'https://rpc.sepolia.org/' }, - { - id: '0x5', - token: 'ETH', - label: 'Goerli', - rpcUrl: ETH_GOERLI_RPC - }, { id: 42161, token: 'ARB-ETH', diff --git a/packages/core/package.json b/packages/core/package.json index 4bb85213e..f7fd1e692 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/core", - "version": "2.21.6-alpha.1", + "version": "2.21.6-alpha.2", "description": "Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", "keywords": [ "Ethereum", diff --git a/packages/core/src/utils.ts b/packages/core/src/utils.ts index fb06eb775..39b68b8ed 100644 --- a/packages/core/src/utils.ts +++ b/packages/core/src/utils.ts @@ -73,8 +73,6 @@ export function validEnsChain(chainId: ChainId): ChainId | null { case '0xa4ba': // Arb Nova case '0x144': // zksync return '0x1' - case '0x5': // Goerli - return chainId case '0xaa36a7': // Sepolia return chainId default: @@ -121,11 +119,7 @@ export function gweiToWeiHex(gwei: number): string { export const chainIdToLabel: Record = { '0x1': 'Ethereum', - '0x3': 'Ropsten', - '0x4': 'Rinkeby', - '0x5': 'Goerli', '0xaa36a7': 'Sepolia', - '0x2a': 'Kovan', '0x38': 'Binance', '0x89': 'Polygon', '0xfa': 'Fantom', @@ -144,17 +138,13 @@ export const chainIdToLabel: Record = { export const networkToChainId: Record = { main: '0x1', - ropsten: '0x3', - rinkeby: '0x4', - goerli: '0x5', - kovan: '0x2a', + sepolia: '0xaa36a7', xdai: '0x64', 'bsc-main': '0x38', 'matic-main': '0x89', 'fantom-main': '0xfa', 'matic-mumbai': '0x80001', - 'degen': '0x27bc86aa' - + degen: '0x27bc86aa' } export const chainStyles: Record = { @@ -162,22 +152,6 @@ export const chainStyles: Record = { icon: ethereumIcon, color: '#627EEA' }, - '0x3': { - icon: ethereumIcon, - color: '#627EEA' - }, - '0x4': { - icon: ethereumIcon, - color: '#627EEA' - }, - '0x5': { - icon: ethereumIcon, - color: '#627EEA' - }, - '0x2a': { - icon: ethereumIcon, - color: '#627EEA' - }, '0xaa36a7': { icon: ethereumIcon, color: '#627EEA' diff --git a/packages/demo/package.json b/packages/demo/package.json index 52375c1ff..f8cf902cd 100644 --- a/packages/demo/package.json +++ b/packages/demo/package.json @@ -32,7 +32,7 @@ "@web3-onboard/blocto": "^2.0.1", "@web3-onboard/capsule": "2.0.1", "@web3-onboard/cede-store": "^2.2.0", - "@web3-onboard/core": "^2.21.6-alpha.1", + "@web3-onboard/core": "^2.21.6-alpha.2", "@web3-onboard/coinbase": "^2.2.7", "@web3-onboard/dcent": "^2.2.7", "@web3-onboard/enkrypt": "^2.0.3", diff --git a/packages/demo/src/App.svelte b/packages/demo/src/App.svelte index c0f3e3b9d..46f92b6f9 100644 --- a/packages/demo/src/App.svelte +++ b/packages/demo/src/App.svelte @@ -404,7 +404,7 @@ // type: 'hint', // message: 'Your in the pool, hope you brought a towel!', // autoDismiss: 0, - // link: `https://goerli.etherscan.io/tx/${transaction.hash}` + // link: `https://sepolia.etherscan.io/tx/${transaction.hash}` // } // } }, @@ -753,7 +753,7 @@ >Set Chain to Mainnet Set Chain to Sepolia