Skip to content

Commit

Permalink
chore: remove gen-x from all files (#612)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinRohlf authored and moritzkirstein committed Oct 30, 2024
1 parent 8f09d32 commit ca50409
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 125 deletions.
2 changes: 1 addition & 1 deletion app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/'
}
},

Expand Down
31 changes: 0 additions & 31 deletions chains.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 0 additions & 7 deletions content/onboarding/steps/claimTokens.json

This file was deleted.

20 changes: 0 additions & 20 deletions genxAddress.json

This file was deleted.

22 changes: 0 additions & 22 deletions networksMetadata.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
8 changes: 2 additions & 6 deletions scripts/copy-addresses.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 0 additions & 3 deletions src/@hooks/useNetworkMetadata/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
31 changes: 0 additions & 31 deletions src/components/@shared/Onboarding/Steps/ClaimTokens.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/Publish/Pricing/Fees.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function Fees({
const { appConfig } = useMarketMetadata()

useEffect(() => {
getOpcFees(chain?.id || 100).then((response: OpcFeesData) => {
getOpcFees(chain?.id || 32457).then((response: OpcFeesData) => {
setOceanCommunitySwapFee(
response?.swapOceanFee
? new Decimal(response.swapOceanFee).mul(100).toString()
Expand Down

0 comments on commit ca50409

Please sign in to comment.