diff --git a/app.config.js b/app.config.js
index 19fd3e8d28..2bd5f964aa 100644
--- a/app.config.js
+++ b/app.config.js
@@ -11,10 +11,10 @@ module.exports = {
// List of chainIds which metadata cache queries will return by default.
// This preselects the Chains user preferences.
- chainIds: [1, 137],
+ chainIds: [1, 137, 10],
// List of all supported chainIds. Used to populate the Chains user preferences list.
- chainIdsSupported: [1, 137, 5, 80001, 11155111],
+ chainIdsSupported: [1, 137, 10, 5, 80001, 11155111],
customProviderUrl: process.env.NEXT_PUBLIC_PROVIDER_URL,
diff --git a/package-lock.json b/package-lock.json
index 9b38f0efbe..f430b75c50 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -15,7 +15,7 @@
"@coingecko/cryptoformat": "^0.5.4",
"@loadable/component": "^5.15.2",
"@oceanprotocol/art": "^3.2.0",
- "@oceanprotocol/lib": "^3.1.3",
+ "@oceanprotocol/lib": "^3.2.0",
"@oceanprotocol/typographies": "^0.1.0",
"@oceanprotocol/use-dark-mode": "^2.4.3",
"@orbisclub/orbis-sdk": "^0.4.40",
@@ -6072,16 +6072,16 @@
"integrity": "sha512-aUQtg4m5hJlQ0u8C29O9TXJWcAenO3G9vP+vf6LNFkpTDOCMycN/F0SzHS89VNrvGUha8oTDEg7FAkfZBPv2WA=="
},
"node_modules/@oceanprotocol/contracts": {
- "version": "1.1.14",
- "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.1.14.tgz",
- "integrity": "sha512-PJih7C6LHaWHHj1qgxZsSkEqKphhJrL3G7WuMOxl4N1daDrF6sooDDU+9dZkcHSVPc7cMjkFqLc5fP58NSAobw=="
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-2.0.3.tgz",
+ "integrity": "sha512-D2YtlsgmhBuSmF/Ue8zMWPtXNiB4zgW09NjUQzvDFrloUo0a7yC8r8L84LrVniw+0Nmly/PhLcdm8i018yc34g=="
},
"node_modules/@oceanprotocol/lib": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-3.1.3.tgz",
- "integrity": "sha512-A7LStVhJILhDlaxMQM71cLco3+tyrE6croPG4UTX58lSb7IRuikOgWq0uH78p3sC4si1RBXVsfLprcx0HiZ9Gg==",
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-3.2.0.tgz",
+ "integrity": "sha512-Mfc9L35dZNAqusCgbQtyJZspSNv9OydWNOKkQU+w5PB40TfXmAyb/IpbYsMzQ/j7oJBSeO2Ewh9JNayyVtUgcQ==",
"dependencies": {
- "@oceanprotocol/contracts": "^1.1.14",
+ "@oceanprotocol/contracts": "^2.0.3",
"cross-fetch": "^4.0.0",
"crypto-js": "^4.1.1",
"decimal.js": "^10.4.1",
@@ -58939,16 +58939,16 @@
"integrity": "sha512-aUQtg4m5hJlQ0u8C29O9TXJWcAenO3G9vP+vf6LNFkpTDOCMycN/F0SzHS89VNrvGUha8oTDEg7FAkfZBPv2WA=="
},
"@oceanprotocol/contracts": {
- "version": "1.1.14",
- "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.1.14.tgz",
- "integrity": "sha512-PJih7C6LHaWHHj1qgxZsSkEqKphhJrL3G7WuMOxl4N1daDrF6sooDDU+9dZkcHSVPc7cMjkFqLc5fP58NSAobw=="
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-2.0.3.tgz",
+ "integrity": "sha512-D2YtlsgmhBuSmF/Ue8zMWPtXNiB4zgW09NjUQzvDFrloUo0a7yC8r8L84LrVniw+0Nmly/PhLcdm8i018yc34g=="
},
"@oceanprotocol/lib": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-3.1.3.tgz",
- "integrity": "sha512-A7LStVhJILhDlaxMQM71cLco3+tyrE6croPG4UTX58lSb7IRuikOgWq0uH78p3sC4si1RBXVsfLprcx0HiZ9Gg==",
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-3.2.0.tgz",
+ "integrity": "sha512-Mfc9L35dZNAqusCgbQtyJZspSNv9OydWNOKkQU+w5PB40TfXmAyb/IpbYsMzQ/j7oJBSeO2Ewh9JNayyVtUgcQ==",
"requires": {
- "@oceanprotocol/contracts": "^1.1.14",
+ "@oceanprotocol/contracts": "^2.0.3",
"cross-fetch": "^4.0.0",
"crypto-js": "^4.1.1",
"decimal.js": "^10.4.1",
diff --git a/package.json b/package.json
index fad2a6454b..a9cfa452df 100644
--- a/package.json
+++ b/package.json
@@ -30,7 +30,7 @@
"@coingecko/cryptoformat": "^0.5.4",
"@loadable/component": "^5.15.2",
"@oceanprotocol/art": "^3.2.0",
- "@oceanprotocol/lib": "^3.1.3",
+ "@oceanprotocol/lib": "^3.2.0",
"@oceanprotocol/typographies": "^0.1.0",
"@oceanprotocol/use-dark-mode": "^2.4.3",
"@orbisclub/orbis-sdk": "^0.4.40",
diff --git a/src/@hooks/useNetworkMetadata/utils.ts b/src/@hooks/useNetworkMetadata/utils.ts
index 37f795d67f..ae76526997 100644
--- a/src/@hooks/useNetworkMetadata/utils.ts
+++ b/src/@hooks/useNetworkMetadata/utils.ts
@@ -28,6 +28,9 @@ export function getNetworkDisplayName(data: EthereumListsChain): string {
case 137:
displayName = 'Polygon'
break
+ case 10:
+ displayName = 'OP Mainnet'
+ break
case 1285:
displayName = 'Moonriver'
break
diff --git a/src/@images/optimism.svg b/src/@images/optimism.svg
new file mode 100644
index 0000000000..deb0f7b844
--- /dev/null
+++ b/src/@images/optimism.svg
@@ -0,0 +1,12 @@
+
diff --git a/src/@utils/wallet/index.ts b/src/@utils/wallet/index.ts
index c45cbf3ea3..d8de6b5e1c 100644
--- a/src/@utils/wallet/index.ts
+++ b/src/@utils/wallet/index.ts
@@ -1,7 +1,14 @@
import { LoggerInstance } from '@oceanprotocol/lib'
import { createClient, erc20ABI } from 'wagmi'
-import { mainnet, polygon, goerli, polygonMumbai, sepolia } from 'wagmi/chains'
-import { ethers, Contract, Signer, providers } from 'ethers'
+import {
+ mainnet,
+ polygon,
+ optimism,
+ goerli,
+ polygonMumbai,
+ sepolia
+} from 'wagmi/chains'
+import { ethers, Contract, Signer } from 'ethers'
import { formatEther } from 'ethers/lib/utils'
import { getDefaultClient } from 'connectkit'
import { getNetworkDisplayName } from '@hooks/useNetworkMetadata'
@@ -30,7 +37,7 @@ export const wagmiClient = createClient(
appName: 'Ocean Market',
infuraId: process.env.NEXT_PUBLIC_INFURA_PROJECT_ID,
// TODO: mapping between appConfig.chainIdsSupported and wagmi chainId
- chains: [mainnet, polygon, goerli, polygonMumbai, sepolia],
+ chains: [mainnet, polygon, optimism, goerli, polygonMumbai, sepolia],
walletConnectProjectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID
})
)
diff --git a/src/components/@shared/NetworkName/NetworkIcon.tsx b/src/components/@shared/NetworkName/NetworkIcon.tsx
index 38c4be8f80..5f63f91a52 100644
--- a/src/components/@shared/NetworkName/NetworkIcon.tsx
+++ b/src/components/@shared/NetworkName/NetworkIcon.tsx
@@ -4,6 +4,7 @@ import PolygonIcon from '@images/polygon.svg'
import MoonbeamIcon from '@images/moonbeam.svg'
import BscIcon from '@images/bsc.svg'
import EnergywebIcon from '@images/energyweb.svg'
+import OptimismIcon from '@images/optimism.svg'
import styles from './index.module.css'
export function NetworkIcon({ name }: { name: string }): ReactElement {
@@ -17,6 +18,8 @@ export function NetworkIcon({ name }: { name: string }): ReactElement {
? BscIcon
: name.includes('Energy Web')
? EnergywebIcon
+ : name.includes('OP Mainnet')
+ ? OptimismIcon
: EthIcon // ETH icon as fallback
return