From b5655f758697b282e7deca4ad72338841b50b1a0 Mon Sep 17 00:00:00 2001 From: Kevin Rohlf <123676073+KevinRohlf@users.noreply.github.com> Date: Fri, 25 Oct 2024 12:17:13 +0200 Subject: [PATCH] chore: remove gen-x from all files (#612) --- app.config.js | 2 +- chains.config.js | 31 ------------------- content/onboarding/steps/claimTokens.json | 7 ----- genxAddress.json | 20 ------------ networksMetadata.config.js | 22 ------------- package.json | 2 +- scripts/copy-addresses.js | 8 ++--- src/@hooks/useNetworkMetadata/utils.ts | 3 -- .../FormInput/InputElement/Provider/index.tsx | 4 +-- .../@shared/Onboarding/Steps/ClaimTokens.tsx | 31 ------------------- src/components/Publish/Pricing/Fees.tsx | 2 +- 11 files changed, 7 insertions(+), 125 deletions(-) delete mode 100644 content/onboarding/steps/claimTokens.json delete mode 100644 genxAddress.json delete mode 100644 src/components/@shared/Onboarding/Steps/ClaimTokens.tsx diff --git a/app.config.js b/app.config.js index f7f767b88..1c4a6673c 100644 --- a/app.config.js +++ b/app.config.js @@ -103,7 +103,7 @@ module.exports = { errorMargin: 10, // Map chainIds to their respective status endpoints statusEndpoints: { - 100: 'https://status.genx.delta-dao.com/api/check-blocks' + 32456: 'https://status.dev.pontus-x.eu/' } }, diff --git a/chains.config.js b/chains.config.js index 31f02e6c0..5c0aac1a0 100644 --- a/chains.config.js +++ b/chains.config.js @@ -2,37 +2,6 @@ // see: https://github.com/oceanprotocol/ocean.js/blob/e07a7cb6ecea12b39ed96f994b4abe37806799a1/src/utils/ConfigHelper.ts#L8 const chains = [ - { - chainId: 100, - isDefault: false, - isCustom: true, - network: 'genx', - metadataCacheUri: 'https://aquarius510.v4.delta-dao.com', - nodeUri: 'https://rpc.genx.minimal-gaia-x.eu', - providerUri: 'https://provider.v4.genx.delta-dao.com', - subgraphUri: 'https://subgraph.v4.genx.minimal-gaia-x.eu', - explorerUri: 'https://explorer.genx.pontus-x.eu', - oceanTokenAddress: '0x0995527d3473b3a98c471f1ed8787acd77fbf009', - oceanTokenSymbol: 'OCEAN', - fixedRateExchangeAddress: '0xAD8E7d2aFf5F5ae7c2645a52110851914eE6664b', - dispenserAddress: '0x94cb8FC8719Ed09bE3D9c696d2037EA95ef68d3e', - startBlock: 3665369, - transactionBlockTimeout: 50, - transactionConfirmationBlocks: 1, - transactionPollingTimeout: 750, - gasFeeMultiplier: 1.1, - nftFactoryAddress: '0x6cb85858183B82154921f68b434299EC4281da53', - opfCommunityFeeCollector: '0x2e0C9e15A45c9884F7768BB852E7399B9153525d', - veAllocate: '0x3fa1d5AC45ab1Ff9CFAe227c5583Ec0484b54Ef9', - veOCEAN: '0x061955B6980A34fce74b235f90DBe20d76f087b1', - veDelegation: '0x96E3aE4247a01C3d40a261df1F8ead70E32E7C0c', - veFeeDistributor: '0x35F1e6765750E874EB9d0675393A1A394A4749b4', - veDelegationProxy: '0x51B1b14b8bfb43a2fB0b49843787Ca440200F6b7', - DFRewards: '0x4259c164eedA7483dda2b4b622D761A88674D31f', - DFStrategyV1: '0x1be9C72500B41c286C797D4FE727747Ae9C4E195', - veFeeEstimate: '0xCFeF55c6ae4d250586e293f29832967a04A9087d', - providerAddress: '0x68C24FA5b2319C81b34f248d1f928601D2E5246B' - }, { chainId: 32456, isDefault: false, diff --git a/content/onboarding/steps/claimTokens.json b/content/onboarding/steps/claimTokens.json deleted file mode 100644 index 7559dfee9..000000000 --- a/content/onboarding/steps/claimTokens.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "title": "Get some test tokens", - "subtitle": "To publish or consume the assets in the portal you'll need some GX and OCEAN test tokens to spend", - "body": "To request some tokens, you'll need to authorize a specific address.\n\n You can find all the necessary information by visiting the GEN-X Faucet.", - "image": "/images/onboarding/claim_tokens.png", - "buttonLabel": "Visit GEN-X Faucet" -} diff --git a/genxAddress.json b/genxAddress.json deleted file mode 100644 index 30afcaab4..000000000 --- a/genxAddress.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "genx": { - "chainId": 100, - "Ocean": "0xE945Bc2097d96B3FfB8e48bBb71ef7D3968f8597", - "OPFCommunityFeeCollector": "0x2e0C9e15A45c9884F7768BB852E7399B9153525d", - "startBlock": 1247152, - "Router": "0xc9f83F595C763e43Ddea97426E4030D03c9FFD70", - "FixedPrice": "0xFde80d4228B7dEf216E24f84e9BAc8458C5F232c", - "Staking": "0xE5517D71C61537e7693630f60Bd9E09f1215479a", - "ERC20Template": { - "1": "0x0301E8676e8bCa960dc95b8bd93D6AAf0B2F1020", - "2": "0xB3a2c32925b730348bb5177b1F8fBD1Ac90eBe63" - }, - "ERC721Template": { - "1": "0x9F13dE57BCf7462E6124b99C62a9F2CBc7860600" - }, - "Dispenser": "0x44cf54BA87fcE6882dF59ECe877a71ceaD5045a7", - "ERC721Factory": "0x16575f77c27A3437FE1bE56AB983f1bEb0DD14B2" - } -} diff --git a/networksMetadata.config.js b/networksMetadata.config.js index 7f1d90617..6443f9329 100644 --- a/networksMetadata.config.js +++ b/networksMetadata.config.js @@ -2,28 +2,6 @@ // see: https://github.com/ethereum-lists/chains const networksMetadata = [ - { - chainId: 100, - networkId: 100, - name: 'GEN-X Testnet', - chain: 'GEN-X', - rpc: ['https://rpc.genx.minimal-gaia-x.eu'], - faucets: [], - nativeCurrency: { - name: 'GX', - symbol: 'GX', - decimals: 18 - }, - infoURL: 'https://docs.genx.minimal-gaia-x.eu', - shortName: 'GEN-X', - explorers: [ - { - name: 'GEN-X Testnet Explorer', - url: 'https://explorer.genx.pontus-x.eu', - standard: '' - } - ] - }, { chainId: 32456, networkId: 32456, diff --git a/package.json b/package.json index 167f06a8c..657602230 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "type-check": "tsc --noEmit", "postinstall": "husky install && npm run copy:address", "copy:address": "node scripts/copy-addresses.js", - "codegen:apollo": "apollo client:codegen --endpoint=https://subgraph.v4.genx.minimal-gaia-x.eu/subgraphs/name/oceanprotocol/ocean-subgraph --target typescript --tsFileExtension=d.ts --outputFlat src/@types/subgraph/", + "codegen:apollo": "apollo client:codegen --endpoint=https://subgraph.test.pontus-x.eu/subgraphs/name/oceanprotocol/ocean-subgraph --target typescript --tsFileExtension=d.ts --outputFlat src/@types/subgraph/", "storybook": "cross-env NODE_ENV=test start-storybook -p 6006 --quiet", "storybook:build": "cross-env NODE_ENV=test build-storybook" }, diff --git a/scripts/copy-addresses.js b/scripts/copy-addresses.js index 04d7437cc..1b8e7d3f0 100644 --- a/scripts/copy-addresses.js +++ b/scripts/copy-addresses.js @@ -5,17 +5,13 @@ const addressJsonFile = join( __dirname, '../node_modules/@oceanprotocol/contracts/addresses/address.json' ) -const genxAddressesFile = join(__dirname, '../genxAddress.json') const addressJson = JSON.parse(readFileSync(addressJsonFile).toString()) -const genxAddresses = JSON.parse(readFileSync(genxAddressesFile).toString()) - const newObject = { - ...addressJson, - ...genxAddresses + ...addressJson } writeFileSync(addressJsonFile, JSON.stringify(newObject)) -console.log('Added GEN-X addresses to', addressJsonFile) +console.log('Added addresses to', addressJsonFile) diff --git a/src/@hooks/useNetworkMetadata/utils.ts b/src/@hooks/useNetworkMetadata/utils.ts index 9fbdc554b..a8f43a267 100644 --- a/src/@hooks/useNetworkMetadata/utils.ts +++ b/src/@hooks/useNetworkMetadata/utils.ts @@ -45,9 +45,6 @@ export function getNetworkDisplayName(data: EthereumListsChain): string { case 2021000: displayName = 'GAIA-X' break - case 100: - displayName = 'GEN-X Testnet' - break case 32456: displayName = 'Pontus-X Devnet' break diff --git a/src/components/@shared/FormInput/InputElement/Provider/index.tsx b/src/components/@shared/FormInput/InputElement/Provider/index.tsx index ed26a1f79..2718e1ed8 100644 --- a/src/components/@shared/FormInput/InputElement/Provider/index.tsx +++ b/src/components/@shared/FormInput/InputElement/Provider/index.tsx @@ -52,7 +52,7 @@ export default function CustomProvider(props: InputProps): ReactElement { const providerResponse = await axios.get(field.value.url, { cancelToken: newCancelToken() }) - const userChainId = chain?.id || 100 + const userChainId = chain?.id || 32457 const providerChain = providerResponse?.data?.chainId || providerResponse?.data?.chainIds @@ -92,7 +92,7 @@ export default function CustomProvider(props: InputProps): ReactElement { function handleDefault(e: React.SyntheticEvent) { e.preventDefault() - const oceanConfig = getOceanConfig(chain?.id || 100) + const oceanConfig = getOceanConfig(chain?.id || 32457) const providerUrl = oceanConfig?.providerUri || initialValues.services[0].providerUrl.url diff --git a/src/components/@shared/Onboarding/Steps/ClaimTokens.tsx b/src/components/@shared/Onboarding/Steps/ClaimTokens.tsx deleted file mode 100644 index 1388a26b3..000000000 --- a/src/components/@shared/Onboarding/Steps/ClaimTokens.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { ReactElement } from 'react' -import { OnboardingStep } from '..' -import StepBody from '../StepBody' -import StepHeader from '../StepHeader' -import content from '../../../../../content/onboarding/steps/claimTokens.json' - -export default function ClaimTokens(): ReactElement { - const { title, subtitle, body, image, buttonLabel }: OnboardingStep = content - - const actions = [ - { - buttonLabel, - buttonAction: () => { - const anchor = document.createElement('a') - anchor.href = 'https://faucet.genx.minimal-gaia-x.eu' - anchor.target = '_blank' - anchor.rel = 'noopener noreferrer' - anchor.click() - }, - loading: false, - completed: false - } - ] - - return ( -