mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
Merge pull request #164 from oceanprotocol/feature/pacific-copy
default all connections to Pacific
This commit is contained in:
commit
a3838ba7c3
@ -1 +0,0 @@
|
|||||||
node_modules
|
|
@ -19,7 +19,8 @@
|
|||||||
"@typescript-eslint/member-delimiter-style": [
|
"@typescript-eslint/member-delimiter-style": [
|
||||||
"error",
|
"error",
|
||||||
{ "multiline": { "delimiter": "none" } }
|
{ "multiline": { "delimiter": "none" } }
|
||||||
]
|
],
|
||||||
|
"@typescript-eslint/no-explicit-any": "off"
|
||||||
},
|
},
|
||||||
"env": {
|
"env": {
|
||||||
"es6": true,
|
"es6": true,
|
||||||
|
17
.travis.yml
17
.travis.yml
@ -13,12 +13,12 @@ addons:
|
|||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
# run E2E tests against these values
|
# run E2E tests against these values
|
||||||
- REACT_APP_NODE_URI="https://nile.dev-ocean.com"
|
- REACT_APP_NODE_URI="https://pacific.oceanprotocol.com"
|
||||||
- REACT_APP_AQUARIUS_URI="https://aquarius.nile.dev-ocean.com"
|
- REACT_APP_AQUARIUS_URI="https://aquarius.commons.oceanprotocol.com"
|
||||||
- REACT_APP_BRIZO_URI="https://brizo.nile.dev-ocean.com"
|
- REACT_APP_BRIZO_URI="https://brizo.commons.oceanprotocol.com"
|
||||||
- REACT_APP_SECRET_STORE_URI="https://secret-store.nile.dev-ocean.com"
|
- REACT_APP_SECRET_STORE_URI="https://secret-store.oceanprotocol.com"
|
||||||
- REACT_APP_FAUCET_URI="https://faucet.nile.dev-ocean.com"
|
- REACT_APP_FAUCET_URI="https://faucet.oceanprotocol.com"
|
||||||
- REACT_APP_BRIZO_ADDRESS="0x4aaab179035dc57b35e2ce066919048686f82972"
|
- REACT_APP_BRIZO_ADDRESS="0x008c25ed3594e094db4592f4115d5fa74c4f41ea"
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- npm install -g npm
|
- npm install -g npm
|
||||||
@ -29,7 +29,10 @@ before_install:
|
|||||||
|
|
||||||
script:
|
script:
|
||||||
# - ./scripts/install.sh # runs automatically with npm ci
|
# - ./scripts/install.sh # runs automatically with npm ci
|
||||||
- ./scripts/test.sh
|
# executing `npm test` scripts individually here, so first one failing will exit the build
|
||||||
|
- npm run lint || travis_terminate 1
|
||||||
|
- ./scripts/test.sh || travis_terminate 1
|
||||||
|
- npm run test:e2e || travis_terminate 1
|
||||||
- ./scripts/coverage.sh
|
- ./scripts/coverage.sh
|
||||||
- ./scripts/build.sh
|
- ./scripts/build.sh
|
||||||
|
|
||||||
|
18
README.md
18
README.md
@ -23,7 +23,7 @@
|
|||||||
If you're a developer and want to contribute to, or want to utilize this marketplace's code in your projects, then keep on reading.
|
If you're a developer and want to contribute to, or want to utilize this marketplace's code in your projects, then keep on reading.
|
||||||
|
|
||||||
- [🏄 Get Started](#-Get-Started)
|
- [🏄 Get Started](#-Get-Started)
|
||||||
- [🏖 Remote Ocean: Nile](#-Remote-Ocean-Nile)
|
- [🏖 Remote Ocean: Pacific](#-Remote-Ocean-Pacific)
|
||||||
- [🐳 Use with Barge](#-Use-with-Barge)
|
- [🐳 Use with Barge](#-Use-with-Barge)
|
||||||
- [⛵️ Environment Variables](#️-Environment-Variables)
|
- [⛵️ Environment Variables](#️-Environment-Variables)
|
||||||
- [👩🔬 Testing](#-Testing)
|
- [👩🔬 Testing](#-Testing)
|
||||||
@ -52,15 +52,17 @@ npm start
|
|||||||
|
|
||||||
Open [http://localhost:3000](http://localhost:3000) to view the client in the browser. The page will reload if you make edits to files in either `./client` or `./server`.
|
Open [http://localhost:3000](http://localhost:3000) to view the client in the browser. The page will reload if you make edits to files in either `./client` or `./server`.
|
||||||
|
|
||||||
### 🏖 Remote Ocean: Nile
|
### 🏖 Remote Ocean: Pacific
|
||||||
|
|
||||||
To make use of all the functionality, you need to connect to the Ocean network. By default, the client will connect to Ocean components running within [Ocean's Nile test network](https://docs.oceanprotocol.com/concepts/testnets/#the-nile-testnet) remotely.
|
To make use of all the functionality, you need to connect to an Ocean network.
|
||||||
|
|
||||||
This means you need to connect with your MetaMask to the Nile network too. To do this:
|
By default, the client will connect to Ocean components running within [Ocean's Pacific network](https://docs.oceanprotocol.com/concepts/pacific-network/) remotely.
|
||||||
|
|
||||||
|
With your MetaMask, connect to the Pacific network. To do this:
|
||||||
|
|
||||||
1. select Custom RPC in the network dropdown in MetaMask
|
1. select Custom RPC in the network dropdown in MetaMask
|
||||||
2. under New Network, enter `https://nile.dev-ocean.com` as the custom RPC URL
|
2. under New Network, enter `https://pacific.oceanprotocol.com` as the custom RPC URL
|
||||||
3. Hit _Save_, and you’re now connected to Nile
|
3. Hit _Save_, and you’re now connected to Pacific
|
||||||
|
|
||||||
### 🐳 Use with Barge
|
### 🐳 Use with Barge
|
||||||
|
|
||||||
@ -100,6 +102,8 @@ To run all linting, unit and integration tests in one go, run:
|
|||||||
npm test
|
npm test
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The endpoints the integration tests run against are defined by your [Environment Variables](#️-Environment-Variables), and Cypress-specific variables in `cypress.json`.
|
||||||
|
|
||||||
### Unit Tests
|
### Unit Tests
|
||||||
|
|
||||||
For local development, you can start the test runners for client & server in a watch mode.
|
For local development, you can start the test runners for client & server in a watch mode.
|
||||||
@ -128,8 +132,6 @@ npm run test:e2e
|
|||||||
|
|
||||||
This will automatically spin up all required resources to run the integrations tests, and then run them.
|
This will automatically spin up all required resources to run the integrations tests, and then run them.
|
||||||
|
|
||||||
The endpoints Cypress runs against are defined by your [Environment Variables](#️-Environment-Variables), and Cypress-specific variables in `cypress.json`.
|
|
||||||
|
|
||||||
You can also use the UI of Cypress to run and inspect the integration tests locally:
|
You can also use the UI of Cypress to run and inspect the integration tests locally:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
#
|
#
|
||||||
# When none of the following variables are set,
|
# When none of the following variables are set,
|
||||||
# Commons will default connecting to Nile
|
# Commons will default connecting to Pacific
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
# Connect to Pacific
|
# Connect to Pacific
|
||||||
#
|
#
|
||||||
# REACT_APP_NODE_URI="https://pacific.oceanprotocol.com"
|
REACT_APP_NODE_URI="https://pacific.oceanprotocol.com"
|
||||||
# REACT_APP_AQUARIUS_URI="https://aquarius.pacific.dev-ocean.com"
|
REACT_APP_AQUARIUS_URI="https://aquarius.commons.oceanprotocol.com"
|
||||||
# REACT_APP_BRIZO_URI="https://brizo.pacific.dev-ocean.com"
|
REACT_APP_BRIZO_URI="https://brizo.commons.oceanprotocol.com"
|
||||||
# REACT_APP_SECRET_STORE_URI="https://secret-store.pacific.oceanprotocol.com"
|
REACT_APP_SECRET_STORE_URI="https://secret-store.oceanprotocol.com"
|
||||||
# REACT_APP_FAUCET_URI="https://faucet.pacific.dev-ocean.com"
|
REACT_APP_FAUCET_URI="https://faucet.oceanprotocol.com"
|
||||||
# REACT_APP_BRIZO_ADDRESS="0x008c25ed3594e094db4592f4115d5fa74c4f41ea"
|
REACT_APP_BRIZO_ADDRESS="0x008c25ed3594e094db4592f4115d5fa74c4f41ea"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Connect to Nile
|
# Connect to Nile
|
||||||
#
|
#
|
||||||
REACT_APP_NODE_URI="https://nile.dev-ocean.com"
|
# REACT_APP_NODE_URI="https://nile.dev-ocean.com"
|
||||||
REACT_APP_AQUARIUS_URI="https://nginx-aquarius.dev-ocean.com"
|
# REACT_APP_AQUARIUS_URI="https://aquarius.nile.dev-ocean.com"
|
||||||
REACT_APP_BRIZO_URI="https://nginx-brizo.dev-ocean.com"
|
# REACT_APP_BRIZO_URI="https://brizo.nile.dev-ocean.com"
|
||||||
REACT_APP_SECRET_STORE_URI="https://secret-store.dev-ocean.com"
|
# REACT_APP_SECRET_STORE_URI="https://secret-store.nile.dev-ocean.com"
|
||||||
REACT_APP_FAUCET_URI="https://faucet.nile.dev-ocean.com"
|
# REACT_APP_FAUCET_URI="https://faucet.nile.dev-ocean.com"
|
||||||
REACT_APP_BRIZO_ADDRESS="0x4aaab179035dc57b35e2ce066919048686f82972"
|
# REACT_APP_BRIZO_ADDRESS="0x4aaab179035dc57b35e2ce066919048686f82972"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Connect to Duero
|
# Connect to Duero
|
||||||
@ -47,7 +47,7 @@ REACT_APP_BRIZO_ADDRESS="0x4aaab179035dc57b35e2ce066919048686f82972"
|
|||||||
# Connect to Spree (local with Barge)
|
# Connect to Spree (local with Barge)
|
||||||
#
|
#
|
||||||
# REACT_APP_NODE_URI="http://localhost:8545"
|
# REACT_APP_NODE_URI="http://localhost:8545"
|
||||||
# REACT_APP_AQUARIUS_URI="http://aquarius:5000"
|
# REACT_APP_AQUARIUS_URI="http://localhost:5000"
|
||||||
# REACT_APP_BRIZO_URI="http://localhost:8030"
|
# REACT_APP_BRIZO_URI="http://localhost:8030"
|
||||||
# REACT_APP_SECRET_STORE_URI="http://localhost:12001"
|
# REACT_APP_SECRET_STORE_URI="http://localhost:12001"
|
||||||
# REACT_APP_FAUCET_URI="http://localhost:3001"
|
# REACT_APP_FAUCET_URI="http://localhost:3001"
|
||||||
|
@ -8,19 +8,20 @@ export const serviceUri =
|
|||||||
// OCEAN REMOTE CONNECTIONS
|
// OCEAN REMOTE CONNECTIONS
|
||||||
//
|
//
|
||||||
export const nodeUri =
|
export const nodeUri =
|
||||||
process.env.REACT_APP_NODE_URI || 'https://nile.dev-ocean.com'
|
process.env.REACT_APP_NODE_URI || 'https://pacific.oceanprotocol.com'
|
||||||
export const aquariusUri =
|
export const aquariusUri =
|
||||||
process.env.REACT_APP_AQUARIUS_URI || 'https://aquarius.nile.dev-ocean.com'
|
process.env.REACT_APP_AQUARIUS_URI ||
|
||||||
|
'https://aquarius.commons.oceanprotocol.com'
|
||||||
export const brizoUri =
|
export const brizoUri =
|
||||||
process.env.REACT_APP_BRIZO_URI || 'https://brizo.nile.dev-ocean.com'
|
process.env.REACT_APP_BRIZO_URI || 'https://brizo.commons.oceanprotocol.com'
|
||||||
export const brizoAddress =
|
export const brizoAddress =
|
||||||
process.env.REACT_APP_BRIZO_ADDRESS ||
|
process.env.REACT_APP_BRIZO_ADDRESS ||
|
||||||
'0x4aaab179035dc57b35e2ce066919048686f82972'
|
'0x008c25ed3594e094db4592f4115d5fa74c4f41ea'
|
||||||
export const secretStoreUri =
|
export const secretStoreUri =
|
||||||
process.env.REACT_APP_SECRET_STORE_URI ||
|
process.env.REACT_APP_SECRET_STORE_URI ||
|
||||||
'https://secret-store.nile.dev-ocean.com'
|
'https://secret-store.oceanprotocol.com'
|
||||||
export const faucetUri =
|
export const faucetUri =
|
||||||
process.env.REACT_APP_FAUCET_URI || 'https://faucet.nile.dev-ocean.com'
|
process.env.REACT_APP_FAUCET_URI || 'https://faucet.oceanprotocol.com'
|
||||||
|
|
||||||
//
|
//
|
||||||
// APP CONFIG
|
// APP CONFIG
|
||||||
|
@ -8,7 +8,7 @@ class About extends Component {
|
|||||||
return (
|
return (
|
||||||
<Route
|
<Route
|
||||||
title="About"
|
title="About"
|
||||||
description="A marketplace to find and publish open data sets in the Ocean Network."
|
description="A marketplace to find and publish open data sets in the Ocean Pacific Network."
|
||||||
>
|
>
|
||||||
<Content>
|
<Content>
|
||||||
<p>
|
<p>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { render, fireEvent, waitForElement } from '@testing-library/react'
|
import { render, fireEvent, waitForElement } from '@testing-library/react'
|
||||||
import mockAxios from 'jest-mock-axios'
|
import mockAxios from 'jest-mock-axios'
|
||||||
import { serviceUri } from '../../../config'
|
|
||||||
import Files from '.'
|
import Files from '.'
|
||||||
|
|
||||||
const onChange = jest.fn()
|
const onChange = jest.fn()
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"baseUrl": "http://localhost:3000",
|
"baseUrl": "http://localhost:3000",
|
||||||
"env": {
|
"env": {
|
||||||
"NODE_URI": "https://nile.dev-ocean.com",
|
"NODE_URI": "https://pacific.oceanprotocol.com",
|
||||||
"SEEDPHRASE": "taxi music thumb unique chat sand crew more leg another off lamp",
|
"SEEDPHRASE": "taxi music thumb unique chat sand crew more leg another off lamp",
|
||||||
"CONSUME_ASSET": "did:op:73f50d7449ca478aabd2f34116dbdb1acf4304a407aa4251ab75ce15257b63bd"
|
"CONSUME_ASSET": "did:op:8f0086cf21e84389ad69b3272c56bd0ddc12cd7d98db4e02b4075c481fc2d32d"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"start": "concurrently \"cd client && npm start\" \"cd server && npm start\"",
|
"start": "concurrently \"cd client && npm start\" \"cd server && npm start\"",
|
||||||
"start:commons-and-ganache": "concurrently 'npm run start:ganache' 'npm run start'",
|
"start:commons-and-ganache": "concurrently 'npm run start:ganache' 'npm run start'",
|
||||||
"build": "./scripts/build.sh",
|
"build": "./scripts/build.sh",
|
||||||
"test": "npm run lint && scripts/test.sh",
|
"test": "npm run lint && scripts/test.sh && npm run test:e2e",
|
||||||
"test:e2e": "start-test start:commons-and-ganache http-get://localhost:3000 cypress:run",
|
"test:e2e": "start-test start:commons-and-ganache http-get://localhost:3000 cypress:run",
|
||||||
"test:watch": "npm run lint && concurrently \"cd client && npm run test:watch\" \"cd server && npm run test:watch\"",
|
"test:watch": "npm run lint && concurrently \"cd client && npm run test:watch\" \"cd server && npm run test:watch\"",
|
||||||
"start:ganache": "ganache-cli -m 'stamp polar cup smart ill agree human episode reform trigger text forget' -i 5777",
|
"start:ganache": "ganache-cli -m 'stamp polar cup smart ill agree human episode reform trigger text forget' -i 5777",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#/usr/bin/env/sh
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
components="server client"
|
components="server client"
|
||||||
@ -10,7 +10,3 @@ do
|
|||||||
npm test
|
npm test
|
||||||
cd ..
|
cd ..
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Running End-to-End tests"
|
|
||||||
|
|
||||||
npm run test:e2e
|
|
||||||
|
@ -64,7 +64,7 @@ app.get('/', (req, res) => {
|
|||||||
app.use('/api/v1/urlcheck', UrlCheckRouter)
|
app.use('/api/v1/urlcheck', UrlCheckRouter)
|
||||||
|
|
||||||
/// catch 404
|
/// catch 404
|
||||||
app.use((req, res, next) => {
|
app.use((req, res) => {
|
||||||
res.status(404).send()
|
res.status(404).send()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user