From 59d1028712e333eb549ab7309aec7e8db10f5bc0 Mon Sep 17 00:00:00 2001 From: Dmytro Date: Mon, 19 Aug 2024 19:50:47 +0100 Subject: [PATCH 1/2] Add DisclaimerComponent, update skale-network --- skale-network | 2 +- src/components/MetaportProvider.tsx | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/skale-network b/skale-network index eb8c44e..8837b6c 160000 --- a/skale-network +++ b/skale-network @@ -1 +1 @@ -Subproject commit eb8c44e8644528fbb6a11df813a7359e469615ee +Subproject commit 8837b6c9b6c2b3aa2ea797faa6f2e4b537f45fec diff --git a/src/components/MetaportProvider.tsx b/src/components/MetaportProvider.tsx index 83d3502..348f0a3 100644 --- a/src/components/MetaportProvider.tsx +++ b/src/components/MetaportProvider.tsx @@ -26,7 +26,8 @@ import { RainbowKitProvider, darkTheme, lightTheme, - connectorsForWallets + connectorsForWallets, + DisclaimerComponent } from '@rainbow-me/rainbowkit' import { WagmiProvider, createConfig, http } from 'wagmi' import { mainnet, goerli, holesky } from 'wagmi/chains' @@ -169,11 +170,21 @@ export default function MetaportProvider(props: { const queryClient = new QueryClient() + const Disclaimer: DisclaimerComponent = ({ Text, Link }) => ( + +

SKALE Portal Terms of Use

+ By connecting your wallet, you agree to the{' '} + Terms of Service and + acknowledge you have read and understand them. +
+ ) + return ( Date: Mon, 19 Aug 2024 20:26:55 +0100 Subject: [PATCH 2/2] Update metadata format, update skale-network submodule, remove staging --- skale-network | 2 +- src/core/constants.ts | 3 --- src/core/contracts.ts | 2 -- src/core/interfaces/ChainsMetadata.ts | 28 +++++++++++++++++++-------- src/core/interfaces/Config.ts | 2 +- src/core/metadata.ts | 7 +------ src/core/network.ts | 4 ---- src/metadata/addresses/staging.json | 10 ---------- src/metadata/faucet.json | 26 ------------------------- src/metadata/proxy.json | 1 - 10 files changed, 23 insertions(+), 62 deletions(-) delete mode 100644 src/metadata/addresses/staging.json diff --git a/skale-network b/skale-network index 8837b6c..2c1f37b 160000 --- a/skale-network +++ b/skale-network @@ -1 +1 @@ -Subproject commit 8837b6c9b6c2b3aa2ea797faa6f2e4b537f45fec +Subproject commit 2c1f37b5ae24061391241dc5fa5d692b2afecce4 diff --git a/src/core/constants.ts b/src/core/constants.ts index 51920aa..59057c6 100644 --- a/src/core/constants.ts +++ b/src/core/constants.ts @@ -54,7 +54,6 @@ export const HTTPS_PREFIX = 'https://' export const MAINNET_EXPLORER_URLS: { [skaleNetwork: string]: string } = { mainnet: 'https://etherscan.io', - staging: 'https://goerli.etherscan.io/', legacy: 'https://holesky.etherscan.io/', regression: 'https://goerli.etherscan.io/', testnet: 'https://holesky.etherscan.io/' @@ -62,7 +61,6 @@ export const MAINNET_EXPLORER_URLS: { [skaleNetwork: string]: string } = { export const BASE_EXPLORER_URLS: { [skaleNetwork: string]: string } = { mainnet: 'explorer.mainnet.skalenodes.com', - staging: 'explorer.staging-v3.skalenodes.com', legacy: 'legacy-explorer.skalenodes.com', regression: 'regression-explorer.skalenodes.com', testnet: 'explorer.testnet.skalenodes.com' @@ -70,7 +68,6 @@ export const BASE_EXPLORER_URLS: { [skaleNetwork: string]: string } = { export const MAINNET_WS_ENDPOINTS: { [skaleNetwork: string]: string } = { mainnet: 'wss://ethereum.publicnode.com', - staging: 'wss://ethereum-goerli.publicnode.com', legacy: 'wss://ethereum-holesky.publicnode.com', regression: 'wss://ethereum-goerli.publicnode.com', testnet: 'wss://ethereum-holesky.publicnode.com' diff --git a/src/core/contracts.ts b/src/core/contracts.ts index a216b3f..b2df8d2 100644 --- a/src/core/contracts.ts +++ b/src/core/contracts.ts @@ -31,7 +31,6 @@ import erc20WrapperAbi from '../metadata/erc20_wrapper_abi.json' import sFuelWrapperAbi from '../metadata/sfuel_wrapper_abi.json' import mainnetAddresses from '../metadata/addresses/mainnet.json' -import stagingAddresses from '../metadata/addresses/staging.json' import legacyAddresses from '../metadata/addresses/legacy.json' import regressionAddresses from '../metadata/addresses/regression.json' import testnetAddresses from '../metadata/addresses/testnet.json' @@ -51,7 +50,6 @@ export const ERC_ABIS: { [tokenType in CustomAbiTokenType | TokenType]: { ['abi' export const IMA_ADDRESSES = { mainnet: mainnetAddresses, - staging: stagingAddresses, legacy: legacyAddresses, regression: regressionAddresses, testnet: testnetAddresses diff --git a/src/core/interfaces/ChainsMetadata.ts b/src/core/interfaces/ChainsMetadata.ts index 3745576..ec47950 100644 --- a/src/core/interfaces/ChainsMetadata.ts +++ b/src/core/interfaces/ChainsMetadata.ts @@ -28,8 +28,8 @@ export interface ChainMetadata { shortAlias?: string minSfuelWei?: string faucetUrl?: string - category: string | string[] - background: string + categories: CategoriesMap + background?: string gradientBackground?: string description?: string url?: string @@ -38,15 +38,17 @@ export interface ChainMetadata { export interface AppMetadata { alias: string - background: string gradientBackground?: string description?: string - url?: string - tags?: string[] contracts?: string[] - dappradar?: string | boolean - legacy?: boolean - featured?: boolean + social?: AppSocials + tags?: string[] + added?: number + categories: CategoriesMap +} + +export interface CategoriesMap { + [category: string]: string[] | null } export interface AppMetadataMap { @@ -60,3 +62,13 @@ export interface ChainsMetadataMap { export type NetworksMetadataMap = { [key in SkaleNetwork]: ChainsMetadataMap } + +export interface AppSocials { + website?: string + x?: string + telegram?: string + github?: string + discord?: string + swell?: string + dappradar?: string +} diff --git a/src/core/interfaces/Config.ts b/src/core/interfaces/Config.ts index 44982be..2679b99 100644 --- a/src/core/interfaces/Config.ts +++ b/src/core/interfaces/Config.ts @@ -23,7 +23,7 @@ import { TokenConnectionsMap, TokenMetadataMap, MetaportTheme } from '.' -export type SkaleNetwork = 'mainnet' | 'staging' | 'legacy' | 'regression' | 'testnet' +export type SkaleNetwork = 'mainnet' | 'legacy' | 'regression' | 'testnet' export interface MetaportConfig { openOnLoad?: boolean diff --git a/src/core/metadata.ts b/src/core/metadata.ts index 044eced..d32b660 100644 --- a/src/core/metadata.ts +++ b/src/core/metadata.ts @@ -26,13 +26,11 @@ import { SkaleNetwork, NetworksMetadataMap } from './interfaces' import { MAINNET_CHAIN_NAME } from './constants' import mainnetMeta from '../meta/mainnet/chains.json' -import stagingMeta from '../meta/staging/chains.json' import legacyMeta from '../meta/legacy/chains.json' import regressionMeta from '../meta/regression/chains.json' import testnetMeta from '../meta/testnet/chains.json' import * as MAINNET_CHAIN_ICONS from '../meta/mainnet/icons' -import * as STAGING_CHAIN_ICONS from '../meta/staging/icons' import * as LEGACY_CHAIN_ICONS from '../meta/legacy/icons' import * as REGRESSION_CHAIN_ICONS from '../meta/regression/icons' import * as TESTNET_CHAIN_ICONS from '../meta/testnet/icons' @@ -41,7 +39,6 @@ import * as icons from '../icons' const CHAIN_ICONS: { [network in SkaleNetwork]: any } = { mainnet: MAINNET_CHAIN_ICONS, - staging: STAGING_CHAIN_ICONS, legacy: LEGACY_CHAIN_ICONS, regression: REGRESSION_CHAIN_ICONS, testnet: TESTNET_CHAIN_ICONS @@ -49,7 +46,6 @@ const CHAIN_ICONS: { [network in SkaleNetwork]: any } = { export const CHAINS_META: NetworksMetadataMap = { mainnet: mainnetMeta, - staging: stagingMeta, legacy: legacyMeta, regression: regressionMeta, testnet: testnetMeta @@ -72,8 +68,7 @@ export function getChainAlias( ): string { if (chainName === MAINNET_CHAIN_NAME) { if (skaleNetwork != MAINNET_CHAIN_NAME) { - const network = skaleNetwork === 'staging' ? 'Goerli' : skaleNetwork - return `Ethereum (${network})` + return `Ethereum (${skaleNetwork})` } return 'Ethereum' } diff --git a/src/core/network.ts b/src/core/network.ts index 99f5324..b5025ec 100644 --- a/src/core/network.ts +++ b/src/core/network.ts @@ -47,7 +47,6 @@ const PROTOCOL: { [protocol in 'http' | 'ws']: string } = { } export const CHAIN_IDS: { [network in SkaleNetwork]: number } = { - staging: 5, legacy: 17000, regression: 5, mainnet: 1, @@ -86,9 +85,6 @@ function getProxyEndpoint(network: SkaleNetwork) { } export function getMainnetAbi(network: string) { - if (network === 'staging') { - return { ...IMA_ABIS.mainnet, ...IMA_ADDRESSES.staging } - } if (network === 'legacy') { return { ...IMA_ABIS.mainnet, ...IMA_ADDRESSES.legacy } } diff --git a/src/metadata/addresses/staging.json b/src/metadata/addresses/staging.json deleted file mode 100644 index ef115e5..0000000 --- a/src/metadata/addresses/staging.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "message_proxy_mainnet_address": "0x08913E0DC2BA60A1626655581f701bCa84f42324", - "linker_address": "0xd081AC47D26baE9c07320AdB83867da28678959E", - "community_pool_address": "0x4957cF98336C0911E42100C8839dCd65DdDe88C9", - "deposit_box_eth_address": "0xD0C9019c517A6CEbb86527fd52F2bDD4Dc6A94Dd", - "deposit_box_erc20_address": "0x2F4B31e661955d41bd6ab5530b117758C26C8159", - "deposit_box_erc721_address": "0x3B1425c6EfD383BAA53F607DD43e5593c4DeBf8f", - "deposit_box_erc1155_address": "0x29DF2117459Dd2c692A1E86DE90371fBc0E3EC76", - "deposit_box_erc721_with_metadata_address": "0x01dd5b9a147c03336F37b7857248d9CDF27661e8" -} \ No newline at end of file diff --git a/src/metadata/faucet.json b/src/metadata/faucet.json index 4e7a8e1..7665e8e 100644 --- a/src/metadata/faucet.json +++ b/src/metadata/faucet.json @@ -29,32 +29,6 @@ "func": "0x0c11dedd" } }, - "staging": { - "staging-perfect-parallel-gacrux": { - "address": "0x4576d1B9eeaE16d6Ca643e55D21E0Dc00e8A7b6D", - "func": "0x0c11dedd" - }, - "staging-severe-violet-wezen": { - "address": "0x37412E23bBF1058A7e325A16C01FF654E1D53562", - "func": "0x0c11dedd" - }, - "staging-legal-crazy-castor": { - "address": "0x436389289aEAFefD1d7471b7FbEc67539Bde3E34", - "func": "0x6a627842" - }, - "staging-utter-unripe-menkar": { - "address": "0x84b7265Bc964BB69b4275d4Dac4df0FD87556960", - "func": "0x0c11dedd" - }, - "staging-faint-slimy-achird": { - "address": "0xfd56A3456fbAB0fc013213edCc830B9d32403C8B", - "func": "0x0c11dedd" - }, - "staging-fast-active-bellatrix": { - "address": "0x1B2e7E6E66a6c202cdC0C31DF996b530af22CBee", - "func": "0x0c11dedd" - } - }, "legacy": { "adorable-quaint-bellatrix": { "address": "0x94977628d2EeDa78E2A56Abe178F432c46E13a6b", diff --git a/src/metadata/proxy.json b/src/metadata/proxy.json index 8999f45..b3c4016 100644 --- a/src/metadata/proxy.json +++ b/src/metadata/proxy.json @@ -1,6 +1,5 @@ { "mainnet": "mainnet.skalenodes.com", - "staging": "staging-v3.skalenodes.com", "legacy": "legacy-proxy.skaleserver.com", "regression": "regression-proxy.skalenodes.com", "qatestnet": "new-testnet-proxy.skalenodes.com",