Skip to content

Commit

Permalink
feat: clean up some mumbai references
Browse files Browse the repository at this point in the history
  • Loading branch information
eruizgar91 committed Jul 8, 2024
1 parent 3be845e commit 2daae61
Show file tree
Hide file tree
Showing 9 changed files with 946 additions and 56 deletions.
915 changes: 915 additions & 0 deletions docs/environments/nvm-dev-envs.html

Large diffs are not rendered by default.

30 changes: 3 additions & 27 deletions docs/environments/nvm-dev-envs.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The network fee in Nevermined testnets is **1%** and the receiver of that fee is

## Arbitrum - Sepolia

### Public Mumbai deployment (v3)
### Public Arbitrum sepolia deployment (v3)

This is a **public** network deployment (`TAG_NAME=public`) of the Nevermined Contracts v3 in the Arbitrum Sepolia network. You can use this network if you want to integrate with Nevermined in a Arbitrum Testnet.

Expand All @@ -31,34 +31,10 @@ The **ABIs of the contracts** to connect via SDK can be download from here: http

| Environment | Network | Contracts Version | Tag | Component | URL | Comments |
|-------------|---------|-------------------|-----|-----------|-----|----------|
| [public-v3-mumbai](https://artifacts.nevermined.network/421614/public/contracts_v3.5.6.json) | Arbitrum Sepolia | 3.5.6 | public | Node | https://node.testing.nevermined.app | |
| public-v3-mumbai | Mumbai | - | public | Marketplace API | https://marketplace-api.testing.nevermined.app | |
| [public-v3-arbitrum-sepolia](https://artifacts.nevermined.network/421614/public/contracts_v3.5.6.json) | Arbitrum Sepolia | 3.5.6 | public | Node | https://node.testing.nevermined.app | |
| public-v3-arbitrum-sepolia | Arbitrum Sepolia | - | public | Marketplace API | https://marketplace-api.testing.nevermined.app | |

All the contract events are exposed via [The Graph](https://thegraph.com/). You can find all the `Arbitrum Sepolia` Nevermined Subgraphs here (search by Nevermined):

https://thegraph.com/hosted-service


## Polygon - Mumbai

### Public Mumbai deployment (v3)

This is a **public** network deployment (`TAG_NAME=public`) of the Nevermined Contracts v3 in the Polygon Mumbai network. You can use this network if you want to integrate with Nevermined in a Polygon Testnet.

The **addresses** of the Nevermined Contracts can be found here: https://artifacts.nevermined.network/80001/public/contracts_v3.5.6.json

The **ABIs of the contracts** to connect via SDK can be download from here: https://artifacts.nevermined.network/80001/public/contracts_v3.5.6.tar.gz

| Environment | Network | Contracts Version | Tag | Component | URL | Comments |
|-------------|---------|-------------------|-----|-----------|-----|----------|
| [public-v3-mumbai](https://artifacts.nevermined.network/80001/public/contracts_v3.5.6.json) | Mumbai | 3.5.6 | public | Node | https://node.mumbai.nevermined.app | |
| public-v3-mumbai | Mumbai | - | public | Marketplace API | https://marketplace-api.mumbai.nevermined.app | |

All the contract events are exposed via [The Graph](https://thegraph.com/). You can find all the `Polygon Mumbai` Nevermined Subgraphs here (search by Nevermined):

https://thegraph.com/hosted-service

For example for Nevermined Polygon Mumbai:

https://thegraph.com/hosted-service/subgraph/nevermined-io/publicmumbaiv2neverminedtoken

12 changes: 6 additions & 6 deletions docs/nevermined-sdk/example.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@ import { NeverminedOptions } from '@nevermined-io/sdk'
import { ethers } from 'ethers'

// The web3 endpoint of the blockchain network to connect to, could be an Infura endpoint, Quicknode, or any other web3 provider
export const web3ProviderUri = process.env.REACT_APP_NODE_URI || 'https://matic-mumbai.chainstacklabs.com'
export const web3ProviderUri = process.env.REACT_APP_NODE_URI || 'https://sepolia-rollup.arbitrum.io/rpc'

// The url to a Nevermined node. It could be your own if you run a Nevermined Node
export const neverminedNodeUri =
process.env.REACT_APP_GATEWAY_URI || 'https://node.mumbai.public.nevermined.network'
process.env.REACT_APP_GATEWAY_URI || 'https://node.testing.nevermined.app'

// The public address of the above Node
export const neverminedNodeAddress =
process.env.REACT_APP_GATEWAY_ADDRESS || '0x5838B5512cF9f12FE9f2beccB20eb47211F9B0bc'

// The url of the marketplace api if you connect to one. It could be your own service if you run a Marketplace API
export const marketplaceUri = 'https://marketplace-api.mumbai.public.nevermined.network'
export const marketplaceUri = 'https://marketplace-api.testing.nevermined.app'

// The url of the The Graph deployment of Nevermined
const graphHttpUri = process.env.GRAPH_HTTP_URI || 'https://api.thegraph.com/subgraphs/name/nevermined-io/public'

// represent USDC token in mumbai that can be claimed in the faucet https://calibration-faucet.filswan.com/#/dashboard
export const erc20TokenAddress = process.env.ERC20_TOKEN_ADDRESS || '0xe11a86849d99f524cac3e7a0ec1241828e332c62'
// represent USDC token in arbitrum-sepolia that can be claimed in the faucet https://faucet.circle.com/
export const erc20TokenAddress = process.env.ERC20_TOKEN_ADDRESS || '0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d'

// The Chain Id of the network where we are connecting
export const acceptedChainId = process.env.REACT_APP_ACCEPTED_CHAIN_ID || '80001' // for Mumbai
export const acceptedChainId = process.env.REACT_APP_ACCEPTED_CHAIN_ID || '421614'

// The React application URL
export const rootUri = process.env.REACT_APP_ROOT_URI || 'http://localhost:3445'
Expand Down
28 changes: 14 additions & 14 deletions docs/nevermined-sdk/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,50 +34,50 @@ There are multiple environments of Nevermined available, before connecting you n
You can find a full list of the environments available in the [Environments section](../environments/).


This will download the artifacts for the latest contracts in _mumbai_ and store them in a folder called `./artifacts`:
This will download the artifacts for the latest contracts in arbitrum_sepolia and store them in a folder called `./artifacts`:

```bash
wget -c https://artifacts.nevermined.network/80001/public/contracts_v3.0.0.tar.gz -O -| tar -xz --one-top-level=./artifacts
wget -c https://artifacts.nevermined.network/421614/public/contracts_v3.5.7.tar.gz -O -| tar -xz --one-top-level=./artifacts
```

Next we need to chose the nevermined environment we want to connect to.

<Tabs>
<TabItem label="mumbai" value="mumbai" default>
<TabItem label="arbitrum-sepolia" value="arbitrum-sepolia" default>

```typescript
import { Config } from '@nevermined-io/sdk'

const config: NeverminedOptions = {
// The web3 endpoint of the blockchain network to connect to, could be an Infura endpoint, Quicknode, or any other web3 provider
web3ProviderUri: 'https://rpc-mumbai.maticvigil.com',
web3ProviderUri: 'https://sepolia-rollup.arbitrum.io/rpc',
// The url of the marketplace api if you connect to one. It could be your own service if you run a Marketplace API
marketplaceUri: 'https://marketplace-api.mumbai.public.nevermined.network',
marketplaceUri: 'https://marketplace-api.testing.nevermined.app',
// The url to a Nevermined node. It could be your own if you run a Nevermined Node
neverminedNodeUri: 'https://node.mumbai.public.nevermined.network',
neverminedNodeUri: 'https://node.testing.nevermined.app',
// The public address of the above Node
neverminedNodeAddress: '0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0',
neverminedNodeAddress: '0x5838B5512cF9f12FE9f2beccB20eb47211F9B0bc',
marketplaceAuthToken: undefined,
// Folder where are copied the ABIs of the Nevermined Smart Contracts
artifactsFolder: './artifacts',
}
```

</TabItem>
<TabItem label="matic" value="matic">
<TabItem label="arbitrum-one" value="arbitrum-one">

```typescript
import { Config } from '@nevermined-io/sdk'

const config: NeverminedOptions = {
// The web3 endpoint of the blockchain network to connect to, could be an Infura endpoint, Quicknode, or any other web3 provider
web3ProviderUri: 'https://rpc-mainnet.maticvigil.com',
web3ProviderUri: 'https://arb1.arbitrum.io/rpc',
// The url of the marketplace api if you connect to one. It could be your own service if you run a Marketplace API
marketplaceUri: 'https://marketplace-api.public.nevermined.network',
marketplaceUri: 'https://marketplace-api.arbitrum.nevermined.app',
// The url to a Nevermined node. It could be your own if you run a Nevermined Node
neverminedNodeUri: 'https://node.public.nevermined.network',
neverminedNodeUri:'https://node.arbitrum.nevermined.app',
// The public address of the above Node
neverminedNodeAddress: '0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0',
neverminedNodeAddress: '0x0b5297b97655A29dE245700864F5591741e50d2c',
marketplaceAuthToken: '',
// Folder where are copied the ABIs of the Nevermined Smart Contracts
artifactsFolder: './artifacts',
Expand Down Expand Up @@ -109,7 +109,7 @@ console.log(await nevermined.utils.versions.get())
// version: '1.0.0',
// commit: '9d31ebc27fe6c7c8a573abd283c632e5c70e687c',
// status: 'Working',
// network: 'mumbai',
// keeperVersion: '3.0.0',
// network: 'arbitrum-sepolia',
// keeperVersion: '3.5.7',
// }
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc",
"artifacts:download": "./scripts/download-artifacts.sh v3.0.0 mumbai",
"artifacts:download": "./scripts/download-artifacts.sh v3.5.7 arbitrum-sepolia",
"lint": "eslint ./src",
"lint:fix": "npm run lint -- --fix"
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/download-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fi

REPO_URL=https://artifacts.nevermined.network
declare -A NETWORKS_MAP
NETWORKS_MAP=( ["mainnet"]="1" ["rinkeby"]="4" ["kovan"]="42" ["matic"]="137" ["mumbai"]="80001" ["celo-alfajores"]="44787" ["celo"]="42220" ["aurora"]="1313161554" ["aurora-testnet"]="1313161555" )
NETWORKS_MAP=( ["mainnet"]="1" ["rinkeby"]="4" ["kovan"]="42" ["matic"]="137" ["celo-alfajores"]="44787" ["celo"]="42220" ["arbitrum-one"]="42161" ["arbitru-sepolia"]="421614" ["aurora"]="1313161554" ["aurora-testnet"]="1313161555" )

SCRIPT_DIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
UNPACK_DIR="$SCRIPT_DIR/../static/contracts"
Expand Down
9 changes: 4 additions & 5 deletions src/components/config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { AuthToken, NeverminedOptions } from '@nevermined-io/catalog'
import { NeverminedOptions } from '@nevermined-io/sdk'
import { Chains, Wagmi } from '@nevermined-io/providers'

export const appConfig = (): NeverminedOptions => ({
web3ProviderUri: 'https://matic-mumbai.chainstacklabs.com',
neverminedNodeUri: 'https://node.mumbai.public.nevermined.network',
web3ProviderUri: 'https://sepolia-rollup.arbitrum.io/rpc',
neverminedNodeUri: 'https://node.testing.nevermined.app',
verbose: 2,
neverminedNodeAddress: '0x5838B5512cF9f12FE9f2beccB20eb47211F9B0bc',
graphHttpUri: 'https://api.thegraph.com/subgraphs/name/nevermined-io/public',
marketplaceAuthToken: AuthToken.fetchMarketplaceApiTokenFromLocalStorage().token,
marketplaceUri: 'https://marketplace-api.mumbai.public.nevermined.network',
marketplaceUri:'https://marketplace-api.testing.nevermined.app',
artifactsFolder: `${location.protocol}//${location.host}/contracts`,
})

Expand Down
2 changes: 1 addition & 1 deletion src/components/demo/catalog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export const DemoCatalog = () => {
config.web3Provider = typeof window !== 'undefined'
// eslint-disable-next-line
? (window as any)?.ethereum
: new ethers.providers.JsonRpcProvider('https://matic-mumbai.chainstacklabs.com')
: new ethers.providers.JsonRpcProvider('https://sepolia-rollup.arbitrum.io/rpc')

const client = Wagmi.createClient(
ConnectKit.getDefaultClient({
Expand Down
2 changes: 1 addition & 1 deletion src/components/demo/sdk.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export const DemoSDK = () => {
config.web3Provider = typeof window !== 'undefined'
// eslint-disable-next-line
? (window as any)?.ethereum
: new ethers.providers.JsonRpcProvider('https://matic-mumbai.chainstacklabs.com')
: new ethers.providers.JsonRpcProvider('https://sepolia-rollup.arbitrum.io/rpc')

return (
<>
Expand Down

0 comments on commit 2daae61

Please sign in to comment.