Skip to content

Commit

Permalink
Merge pull request #710 from nevermined-io/feat/peaq_deployment
Browse files Browse the repository at this point in the history
feat: adding peaq network as pre-defined environment
  • Loading branch information
aaitor authored Aug 30, 2024
2 parents 1460215 + 0089b8b commit 1c7b11a
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 16 deletions.
29 changes: 22 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v3.0.31](https://github.com/nevermined-io/sdk-js/compare/v3.0.30...v3.0.31)

> 29 August 2024
- fix: avoid exception when global is not there yet from libs [`d97b748`](https://github.com/nevermined-io/sdk-js/commit/d97b748032654a0cfe318022fa82d6c6030168fa)
- chore: adding v3.0.30 Changelog updates [`8495e3f`](https://github.com/nevermined-io/sdk-js/commit/8495e3f4c1f94607727d8055aee684ec4163c4a5)

#### [v3.0.30](https://github.com/nevermined-io/sdk-js/compare/v3.0.29...v3.0.30)

> 29 August 2024
- docs: updating documentation [skip actions] [`1460215`](https://github.com/nevermined-io/sdk-js/commit/146021575dfa3e717ce9878ebb9a909bf8fdb221)
- feat: adding peaq network as pre-defined environment [`7fbd6c5`](https://github.com/nevermined-io/sdk-js/commit/7fbd6c5986b8b0322f7ca27e294d5dd59f68be78)
- Automated CHANGELOG.md update [`aa372ff`](https://github.com/nevermined-io/sdk-js/commit/aa372ff7727c3133a77ceb37ce1a89e86306d2c3)

#### [v3.0.29](https://github.com/nevermined-io/sdk-js/compare/v3.0.28...v3.0.29)

> 28 August 2024
Expand Down Expand Up @@ -426,7 +441,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- fix: wait tx for session keys an use bigint for blocknumbers in all the places [`a6188e7`](https://github.com/nevermined-io/sdk-js/commit/a6188e78eaeecb346ff0b067335c4c7783dfefb0)
- chore: adding v3.0.0 Changelog updates [`bcc2d13`](https://github.com/nevermined-io/sdk-js/commit/bcc2d13c3da67cee187b2bb1b8e2c74ebec40bb4)

### [v3.0.0](https://github.com/nevermined-io/sdk-js/compare/v3.0.0-rc9...v3.0.0)
#### [v3.0.0](https://github.com/nevermined-io/sdk-js/compare/v3.0.0-rc9...v3.0.0)

> 2 May 2024
Expand Down Expand Up @@ -913,7 +928,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- feat: add as an option in the config [`6f610b4`](https://github.com/nevermined-io/sdk-js/commit/6f610b4d6372c0d0843b70083b7018708f5a948d)
- chore: adding v2.0.0 Changelog updates [`4ddbf3d`](https://github.com/nevermined-io/sdk-js/commit/4ddbf3de548ed94c0a79341961693510151ce9bd)

### [v2.0.0](https://github.com/nevermined-io/sdk-js/compare/v2.0.0-rc9...v2.0.0)
#### [v2.0.0](https://github.com/nevermined-io/sdk-js/compare/v2.0.0-rc9...v2.0.0)

> 20 October 2023
Expand Down Expand Up @@ -1509,7 +1524,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- ci: testing with https services [`bb96077`](https://github.com/nevermined-io/sdk-js/commit/bb96077c9403ea7ae26195a51d8a92e144cea384)
- linting [`d2547ed`](https://github.com/nevermined-io/sdk-js/commit/d2547edfbfebb49b488c97c4ce9e6d6f2ee849e4)

### [v1.0.0](https://github.com/nevermined-io/sdk-js/compare/v1.0.0-rc9...v1.0.0)
#### [v1.0.0](https://github.com/nevermined-io/sdk-js/compare/v1.0.0-rc9...v1.0.0)

> 14 February 2023
Expand Down Expand Up @@ -2248,7 +2263,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

> 2 May 2022
- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248)
- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248)
- Adding v0.19.21 Changelog updates [`c93cdc5`](https://github.com/nevermined-io/sdk-js/commit/c93cdc55f139a43db4130ccb0f80924d2645a931)

#### [v0.19.21](https://github.com/nevermined-io/sdk-js/compare/v0.19.20...v0.19.21)
Expand Down Expand Up @@ -2511,7 +2526,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

> 18 January 2022
- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186)
- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186)
- [wip] Create agreement+pay in one transaction [`#183`](https://github.com/nevermined-io/sdk-js/pull/183)
- Adapting to contracts `v1.3.3` [`#177`](https://github.com/nevermined-io/sdk-js/pull/177)
- Adding v0.17.2 Changelog updates [`5eddda4`](https://github.com/nevermined-io/sdk-js/commit/5eddda43954e013e6e6f7344c9a877d801aacb5c)
Expand Down Expand Up @@ -3017,7 +3032,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Feature/sync develop [`#268`](https://github.com/nevermined-io/sdk-js/pull/268)
- Quick fix for non-eip1559 networks [`#266`](https://github.com/nevermined-io/sdk-js/pull/266)
- integrate Permissions and refactor search query [`#264`](https://github.com/nevermined-io/sdk-js/pull/264)
- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248)
- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248)
- Get the keeper version from the artifacts instead of package version [`#244`](https://github.com/nevermined-io/sdk-js/pull/244)
- replace `metadata-api` url by `marketplace-api` and sort type [`#243`](https://github.com/nevermined-io/sdk-js/pull/243)
- fixing issues with BigNumbers [`#246`](https://github.com/nevermined-io/sdk-js/pull/246)
Expand Down Expand Up @@ -3056,7 +3071,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Feature/190 add did to sec markets [`#191`](https://github.com/nevermined-io/sdk-js/pull/191)
- Adding utility methods for getting nft token uri [`#189`](https://github.com/nevermined-io/sdk-js/pull/189)
- Lint ... [`#187`](https://github.com/nevermined-io/sdk-js/pull/187)
- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186)
- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186)
- [wip] Create agreement+pay in one transaction [`#183`](https://github.com/nevermined-io/sdk-js/pull/183)
- Adapting to contracts `v1.3.3` [`#177`](https://github.com/nevermined-io/sdk-js/pull/177)
- Correct typo in route [`#184`](https://github.com/nevermined-io/sdk-js/pull/184)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nevermined-io/sdk",
"version": "3.0.29",
"version": "3.0.31",
"description": "Javascript SDK for connecting with Nevermined Data Platform ",
"main": "./dist/node/sdk.js",
"typings": "./dist/node/sdk.d.ts",
Expand Down
4 changes: 4 additions & 0 deletions src/nevermined/NvmApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
AppDeploymentLocal,
AppDeploymentMatic,
AppDeploymentOptimism,
AppDeploymentPeaq,
AppDeploymentStaging,
AppDeploymentTesting,
NeverminedAppOptions,
Expand All @@ -39,6 +40,7 @@ export enum NVMAppEnvironments {
Base = 'base',
Celo = 'celo',
Optimism = 'optimism',
Peaq = 'peaq',
Local = 'local',
Custom = 'custom',
}
Expand Down Expand Up @@ -956,6 +958,8 @@ export class NvmApp {
return new AppDeploymentCelo()
case NVMAppEnvironments.Optimism:
return new AppDeploymentOptimism()
case NVMAppEnvironments.Peaq:
return new AppDeploymentPeaq()
case NVMAppEnvironments.Local:
return new AppDeploymentLocal()
default:
Expand Down
42 changes: 34 additions & 8 deletions src/nevermined/resources/AppNetworks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class AppDeploymentStaging extends NeverminedAppOptions {
instanceName = 'appStaging'
appUrl = 'https://staging.nevermined.app'
chainId = 421614
web3ProviderUri = window.ethereum ? undefined : 'https://sepolia-rollup.arbitrum.io/rpc'
web3ProviderUri = isWindowEthereumDefined() ? undefined : 'https://sepolia-rollup.arbitrum.io/rpc'
marketplaceUri = 'https://marketplace-api.staging.nevermined.app'
graphHttpUri = 'https://api.thegraph.com/subgraphs/name/nevermined-io/public'
neverminedNodeUri = 'https://node.staging.nevermined.app'
Expand All @@ -44,7 +44,7 @@ export class AppDeploymentTesting extends NeverminedAppOptions {
instanceName = 'appTesting'
appUrl = 'https://testing.nevermined.app'
chainId = 421614
web3ProviderUri = window.ethereum ? undefined : 'https://sepolia-rollup.arbitrum.io/rpc'
web3ProviderUri = isWindowEthereumDefined() ? undefined : 'https://sepolia-rollup.arbitrum.io/rpc'
marketplaceUri = 'https://marketplace-api.testing.nevermined.app'
graphHttpUri = 'https://api.thegraph.com/subgraphs/name/nevermined-io/public'
neverminedNodeUri = 'https://node.testing.nevermined.app'
Expand All @@ -61,7 +61,7 @@ export class AppDeploymentArbitrum extends NeverminedAppOptions {
instanceName = 'appArbitrum'
appUrl = 'https://nevermined.app'
chainId = 42161
web3ProviderUri = window.ethereum ? undefined : 'https://arb1.arbitrum.io/rpc'
web3ProviderUri = isWindowEthereumDefined() ? undefined : 'https://arb1.arbitrum.io/rpc'
marketplaceUri = 'https://marketplace-api.arbitrum.nevermined.app'
graphHttpUri = 'https://api.thegraph.com/subgraphs/name/nevermined-io/public'
neverminedNodeUri = 'https://node.arbitrum.nevermined.app'
Expand All @@ -78,7 +78,7 @@ export class AppDeploymentGnosis extends NeverminedAppOptions {
instanceName = 'appGnosis'
appUrl = 'https://gnosis.nevermined.app'
chainId = 100
web3ProviderUri = window.ethereum ? undefined : 'https://rpc.gnosischain.com/'
web3ProviderUri = isWindowEthereumDefined() ? undefined : 'https://rpc.gnosischain.com/'
marketplaceUri = 'https://marketplace-api.gnosis.nevermined.app'
graphHttpUri = 'https://api.thegraph.com/subgraphs/name/nevermined-io/public'
neverminedNodeUri = 'https://node.gnosis.nevermined.app'
Expand All @@ -95,7 +95,7 @@ export class AppDeploymentMatic extends NeverminedAppOptions {
instanceName = 'appMatic'
appUrl = 'https://matic.nevermined.app'
chainId = 137
web3ProviderUri = window.ethereum ? undefined : 'https://polygon-rpc.com'
web3ProviderUri = isWindowEthereumDefined() ? undefined : 'https://polygon-rpc.com'
marketplaceUri = 'https://marketplace-api.matic.nevermined.app'
graphHttpUri = 'https://api.thegraph.com/subgraphs/name/nevermined-io/public'
neverminedNodeUri = 'https://node.matic.nevermined.app'
Expand All @@ -112,7 +112,7 @@ export class AppDeploymentBase extends NeverminedAppOptions {
instanceName = 'appBase'
appUrl = 'https://base.nevermined.app'
chainId = 8453
web3ProviderUri = window.ethereum ? undefined : 'https://1rpc.io/base'
web3ProviderUri = isWindowEthereumDefined() ? undefined : 'https://1rpc.io/base'
marketplaceUri = 'https://marketplace-api.base.nevermined.app'
graphHttpUri = 'https://api.thegraph.com/subgraphs/name/nevermined-io/public'
neverminedNodeUri = 'https://node.base.nevermined.app'
Expand All @@ -129,7 +129,7 @@ export class AppDeploymentCelo extends NeverminedAppOptions {
instanceName = 'appCelo'
appUrl = 'https://celo.nevermined.app'
chainId = 42220
web3ProviderUri = window.ethereum ? undefined : 'https://forno.celo.org'
web3ProviderUri = isWindowEthereumDefined() ? undefined : 'https://forno.celo.org'
marketplaceUri = 'https://marketplace-api.celo.nevermined.app'
graphHttpUri = 'https://api.thegraph.com/subgraphs/name/nevermined-io/public'
neverminedNodeUri = 'https://node.celo.nevermined.app'
Expand All @@ -146,7 +146,7 @@ export class AppDeploymentOptimism extends NeverminedAppOptions {
instanceName = 'appOptimism'
appUrl = 'https://optimism.nevermined.app'
chainId = 10
web3ProviderUri = window.ethereum ? undefined : 'https://optimism.drpc.org'
web3ProviderUri = isWindowEthereumDefined() ? undefined : 'https://optimism.drpc.org'
marketplaceUri = 'https://marketplace-api.optimism.nevermined.app'
graphHttpUri = 'https://api.thegraph.com/subgraphs/name/nevermined-io/public'
neverminedNodeUri = 'https://node.optimism.nevermined.app'
Expand All @@ -158,3 +158,29 @@ export class AppDeploymentOptimism extends NeverminedAppOptions {
nftContractCreditsAddress = '0xE24f60aE42F7Cc3B3357480C94165afD86B66583'
tokenAddress = '0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85'
}

export class AppDeploymentPeaq extends NeverminedAppOptions {
instanceName = 'appPeaq'
appUrl = 'https://peaq.nevermined.app'
chainId = 3338
web3ProviderUri = isWindowEthereumDefined() ? undefined : 'https://evm.peaq.network'
marketplaceUri = 'https://marketplace-api.peaq.nevermined.app'
graphHttpUri = 'https://api.thegraph.com/subgraphs/name/nevermined-io/public'
neverminedNodeUri = 'https://node.peaq.nevermined.app'
neverminedNodeAddress = '0x824dbcE5E9C96C5b8ce2A35a25a5ab87eD1D00b1'
verbose = true
gasMultiplier = 0
gasPriceMultiplier = 0
nftContractTimeAddress = '0xE24f60aE42F7Cc3B3357480C94165afD86B66583'
nftContractCreditsAddress = '0xE24f60aE42F7Cc3B3357480C94165afD86B66583'
tokenAddress = '0x0000000000000000000000000000000000000000'
}

export function isWindowEthereumDefined(): boolean {
try {
window.ethereum
return true
} catch {
return false
}
}

0 comments on commit 1c7b11a

Please sign in to comment.