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

[UPDATE] - Remove deprecated testnets from Core, TX Preview and docs #2162

Merged
merged 19 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
9dd3a56
Bump versions for release and Remove console.log
Adamj1232 Mar 20, 2024
50c6dd5
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Mar 25, 2024
6407e04
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Mar 26, 2024
781e792
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 1, 2024
6f09e2c
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 4, 2024
5a34b64
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 5, 2024
cd21151
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 5, 2024
7bcedf0
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 9, 2024
1df7db3
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 12, 2024
14bc7bf
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 12, 2024
6923d85
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 12, 2024
6f303ca
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 12, 2024
6193944
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 12, 2024
e35c6d8
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 12, 2024
2b8d610
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 12, 2024
33b4dd9
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 12, 2024
b974a3d
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 15, 2024
8c49626
Remove deprecated testnets
Adamj1232 Apr 15, 2024
4d410ae
Merge branch 'develop' into update/remove_deprecated_testnets
Adamj1232 Apr 15, 2024
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
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 1 addition & 7 deletions docs/src/routes/docs/[...3]modules/[...1]core/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -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): {
Expand Down Expand Up @@ -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',
Expand Down
12 changes: 6 additions & 6 deletions docs/src/routes/docs/[...3]modules/[...3]react/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,7 @@ export type System = 'bitcoin' | 'ethereum'
export type Network =
| 'main'
| 'testnet'
| 'ropsten'
| 'rinkeby'
| 'goerli'
| 'kovan'
| 'sepolia'
| 'xdai'
| 'bsc-main'
| 'matic-main'
Expand Down
12 changes: 6 additions & 6 deletions docs/src/routes/examples/[...1]connect-wallet/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
12 changes: 6 additions & 6 deletions docs/src/routes/examples/[...2]uniswap-widget/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -66,7 +66,7 @@ const degenChain = {
rpcUrl: 'https://rpc.degen.tips'
}

const chains = [ethereumRopsten, polygonMainnet]
const chains = [ethereumSepolia, polygonMainnet]

const wallets = [injectedModule()]

Expand Down
22 changes: 14 additions & 8 deletions examples/with-nextjs/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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({
Expand Down
9 changes: 1 addition & 8 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ type NotificationType = 'pending' | 'success' | 'error' | 'hint'

declare type Network =
| 'main'
| 'goerli'
| 'sepolia'
| 'matic-main'
| 'matic-mumbai'
| 'local'
Expand All @@ -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
Expand All @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
30 changes: 2 additions & 28 deletions packages/core/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -121,11 +119,7 @@ export function gweiToWeiHex(gwei: number): string {

export const chainIdToLabel: Record<string, string> = {
'0x1': 'Ethereum',
'0x3': 'Ropsten',
'0x4': 'Rinkeby',
'0x5': 'Goerli',
'0xaa36a7': 'Sepolia',
'0x2a': 'Kovan',
'0x38': 'Binance',
'0x89': 'Polygon',
'0xfa': 'Fantom',
Expand All @@ -144,40 +138,20 @@ export const chainIdToLabel: Record<string, string> = {

export const networkToChainId: Record<string, ChainId> = {
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<string, ChainStyle> = {
'0x1': {
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'
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/demo/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
// }
// }
},
Expand Down Expand Up @@ -753,7 +753,7 @@
>Set Chain to Mainnet</button
>
<button on:click={() => onboard.setChain({ chainId: '0x5' })}
>Set Chain to Goerli</button
>Set Chain to Sepolia</button
>
<button on:click={() => onboard.setChain({ chainId: '0x89' })}
>Set Chain to Matic</button
Expand Down
12 changes: 6 additions & 6 deletions packages/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ 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({
Expand Down
4 changes: 2 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/react",
"version": "2.8.17-alpha.1",
"version": "2.8.17-alpha.2",
"description": "A collection of React hooks for integrating Web3-Onboard in to React and Next.js projects. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, 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",
Expand Down Expand Up @@ -62,7 +62,7 @@
},
"dependencies": {
"@web3-onboard/common": "^2.3.3",
"@web3-onboard/core": "^2.21.6-alpha.1",
"@web3-onboard/core": "^2.21.6-alpha.2",
"use-sync-external-store": "1.0.0"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/solid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/solid",
"version": "2.0.4-alpha.1",
"version": "2.0.4-alpha.2",
"description": "A collection of solid Composables for integrating Web3-Onboard in to a Solid project. 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, 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",
Expand Down Expand Up @@ -63,7 +63,7 @@
},
"dependencies": {
"@web3-onboard/common": "^2.3.3",
"@web3-onboard/core": "^2.21.6-alpha.1",
"@web3-onboard/core": "^2.21.6-alpha.2",
"solid-js": "^1.8.1"
}
}
5 changes: 1 addition & 4 deletions packages/transaction-preview/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,7 @@ export type System = 'bitcoin' | 'ethereum'
export type Network =
| 'main'
| 'testnet'
| 'ropsten'
| 'rinkeby'
| 'goerli'
| 'kovan'
| 'sepolia'
| 'xdai'
| 'bsc-main'
| 'matic-main'
Expand Down
2 changes: 1 addition & 1 deletion packages/transaction-preview/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/transaction-preview",
"version": "2.0.8",
"version": "2.0.9-alpha.1",
"description": "In app preview of Ethereum transactions",
"keywords": [
"Ethereum",
Expand Down
4 changes: 2 additions & 2 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/vue",
"version": "2.7.16-alpha.1",
"version": "2.7.16-alpha.2",
"description": "A collection of Vue Composables for integrating Web3-Onboard in to a Vue or Nuxt project. 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, 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",
Expand Down Expand Up @@ -62,7 +62,7 @@
"@vueuse/core": "^8.4.2",
"@vueuse/rxjs": "^8.2.0",
"@web3-onboard/common": "^2.3.4",
"@web3-onboard/core": "^2.21.6-alpha.1",
"@web3-onboard/core": "^2.21.6-alpha.2",
"vue-demi": "^0.12.4"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion test/tests/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const metamaskTest = base.extend<{
// setup metamask
await initialSetup(chromium, {
secretWordsOrPrivateKey: process.env.TEST_WALLET_PHRASE,
network: 'goerli',
network: 'sepolia',
password: 'Tester@1234',
enableAdvancedSettings: true
})
Expand Down
Loading
Loading