Skip to content

Commit

Permalink
fix: update usage of OP goerli to OP Sepolia (#3999)
Browse files Browse the repository at this point in the history
## Explanation

This PR replaces the reference to OP goerli to OP sepolia. It also
renames the variable `OPTIMISM_TESTNET` to `OPTIMISM_SEPOLIA`.

Renaming the variable and switching to Sepolia is a breaking change,
please use Sepolia and `OPTIMISM_SEPOLIA` instead of `OPTIMISM_TESTNET`.

## References

* Fixes MetaMask/mobile-planning#1569
* Related to
[#67890](MetaMask/metamask-mobile#8784)

## Changelog

<!--
If you're making any consumer-facing changes, list those changes here as
if you were updating a changelog, using the template below as a guide.

(CATEGORY is one of BREAKING, ADDED, CHANGED, DEPRECATED, REMOVED, or
FIXED. For security-related issues, follow the Security Advisory
process.)

Please take care to name the exact pieces of the API you've added or
changed (e.g. types, interfaces, functions, or methods).

If there are any breaking changes, make sure to offer a solution for
consumers to follow once they upgrade to the changes.

Finally, if you're only making changes to development scripts or tests,
you may replace the template below with "None".
-->

### `@metamask/transaction-controller`

**Removed**

- **BREAKING**: Renamed `OPTIMISM_TESTNET` to `OPTIMISM_SEPOLIA` and
updated the chainId accordingly.
- **BREAKING**: Updated the etherscan subdomain that was for
OPTIMISM_TESTNET from goerli to sepolia.

### `@metamask/preferences-controller`

**Removed**

- **BREAKING**: Renamed `OPTIMISM_TESTNET` to `OPTIMISM_SEPOLIA` and
updated the chainId accordingly.

### `@metamask/name-controller`

**Removed**

- **BREAKING**: Renamed `OPTIMISM_TESTNET` to `OPTIMISM_SEPOLIA` and
updated the chainId accordingly.
- **BREAKING**: updated the etherscan subdomain for OPTIMISM_TESTNET
from goerli to sepolia

## Checklist

- [ ] I've updated the test suite for new or updated code as appropriate
- [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [ ] I've highlighted breaking changes using the "BREAKING" category
above as appropriate
  • Loading branch information
sahar-fehri authored and mcmire committed Mar 4, 2024
1 parent f0481f7 commit 4706c98
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions packages/name-controller/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const CHAIN_IDS = {
BSC: '0x38',
BSC_TESTNET: '0x61',
OPTIMISM: '0xa',
OPTIMISM_TESTNET: '0x1a4',
OPTIMISM_SEPOLIA: '0xaa37dc',
POLYGON: '0x89',
POLYGON_TESTNET: '0x13881',
AVALANCHE: '0xa86a',
Expand Down Expand Up @@ -58,9 +58,9 @@ export const ETHERSCAN_SUPPORTED_NETWORKS = {
domain: DEFAULT_ETHERSCAN_DOMAIN,
subdomain: `${DEFAULT_ETHERSCAN_SUBDOMAIN_PREFIX}-optimistic`,
},
[CHAIN_IDS.OPTIMISM_TESTNET]: {
[CHAIN_IDS.OPTIMISM_SEPOLIA]: {
domain: DEFAULT_ETHERSCAN_DOMAIN,
subdomain: `${DEFAULT_ETHERSCAN_SUBDOMAIN_PREFIX}-goerli-optimistic`,
subdomain: `${DEFAULT_ETHERSCAN_SUBDOMAIN_PREFIX}-sepolia-optimistic`,
},
[CHAIN_IDS.POLYGON]: {
domain: 'polygonscan.com',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export function getDefaultPreferencesState() {
[ETHERSCAN_SUPPORTED_CHAIN_IDS.BSC]: true,
[ETHERSCAN_SUPPORTED_CHAIN_IDS.BSC_TESTNET]: true,
[ETHERSCAN_SUPPORTED_CHAIN_IDS.OPTIMISM]: true,
[ETHERSCAN_SUPPORTED_CHAIN_IDS.OPTIMISM_TESTNET]: true,
[ETHERSCAN_SUPPORTED_CHAIN_IDS.OPTIMISM_SEPOLIA]: true,
[ETHERSCAN_SUPPORTED_CHAIN_IDS.POLYGON]: true,
[ETHERSCAN_SUPPORTED_CHAIN_IDS.POLYGON_TESTNET]: true,
[ETHERSCAN_SUPPORTED_CHAIN_IDS.AVALANCHE]: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/preferences-controller/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const ETHERSCAN_SUPPORTED_CHAIN_IDS = {
BSC: '0x38',
BSC_TESTNET: '0x61',
OPTIMISM: '0xa',
OPTIMISM_TESTNET: '0x1a4',
OPTIMISM_SEPOLIA: '0xaa37dc',
POLYGON: '0x89',
POLYGON_TESTNET: '0x13881',
AVALANCHE: '0xa86a',
Expand Down
8 changes: 4 additions & 4 deletions packages/transaction-controller/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const CHAIN_IDS = {
BSC: '0x38',
BSC_TESTNET: '0x61',
OPTIMISM: '0xa',
OPTIMISM_TESTNET: '0x1a4',
OPTIMISM_SEPOLIA: '0xaa37dc',
POLYGON: '0x89',
POLYGON_TESTNET: '0x13881',
AVALANCHE: '0xa86a',
Expand Down Expand Up @@ -58,9 +58,9 @@ export const ETHERSCAN_SUPPORTED_NETWORKS = {
domain: DEFAULT_ETHERSCAN_DOMAIN,
subdomain: `${DEFAULT_ETHERSCAN_SUBDOMAIN_PREFIX}-optimistic`,
},
[CHAIN_IDS.OPTIMISM_TESTNET]: {
[CHAIN_IDS.OPTIMISM_SEPOLIA]: {
domain: DEFAULT_ETHERSCAN_DOMAIN,
subdomain: `${DEFAULT_ETHERSCAN_SUBDOMAIN_PREFIX}-goerli-optimistic`,
subdomain: `${DEFAULT_ETHERSCAN_SUBDOMAIN_PREFIX}-sepolia-optimistic`,
},
[CHAIN_IDS.POLYGON]: {
domain: 'polygonscan.com',
Expand Down Expand Up @@ -106,5 +106,5 @@ export const ETHERSCAN_SUPPORTED_NETWORKS = {

export const GAS_BUFFER_CHAIN_OVERRIDES = {
[CHAIN_IDS.OPTIMISM]: 1,
[CHAIN_IDS.OPTIMISM_TESTNET]: 1,
[CHAIN_IDS.OPTIMISM_SEPOLIA]: 1,
};

0 comments on commit 4706c98

Please sign in to comment.