Skip to content

Commit

Permalink
Merge pull request #118 from nevermined-io/feat/support-peaq
Browse files Browse the repository at this point in the history
feat: support peaq
  • Loading branch information
eruizgar91 authored Aug 28, 2024
2 parents 076f80c + 7518983 commit 07ab6ee
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nevermined-io/cli",
"version": "2.2.0",
"version": "2.2.1",
"main": "index.js",
"repository": "[email protected]:nevermined-io/cli.git",
"author": "Nevermined",
Expand All @@ -25,7 +25,7 @@
"ncli": "./dist/src/index.js"
},
"dependencies": {
"@nevermined-io/sdk": "3.0.12",
"@nevermined-io/sdk": "3.0.29",
"log4js": "^6.9.1",
"chalk": "^4.1.2",
"cross-fetch": "~3.1.5",
Expand Down
25 changes: 25 additions & 0 deletions resources/networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,5 +220,30 @@
"gasMultiplier": 0,
"gasPriceMultiplier": 0,
"externalNetwork": true
},
"appPeaq": {
"envDescription": "The Peaq network production environment where users can interact with Nevermined protocol.",
"envUrl": "https://peaq.nevermined.app/",
"envName": "Peaq",
"isProduction": true,
"nvm": {
"chainId": 3338,
"appUrl": "https://peaq.nevermined.app",
"web3ProviderUri": "https://evm.peaq.network",
"marketplaceUri": "https://marketplace-api.peaq.nevermined.app",
"graphHttpUri": "",
"neverminedNodeUri": "http://node.peaq.nevermined.app",
"neverminedNodeAddress": "0x824dbcE5E9C96C5b8ce2A35a25a5ab87eD1D00b1",
"verbose": true
},
"nativeToken": "PEAQ",
"networkName": "peaq-mainnet",
"contractsVersion": "3.5.7",
"tagName": "public",
"etherscanUrl": "https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fmpfn1.peaq.network#/explorer",
"erc20TokenAddress": "0x0000000000000000000000000000000000000000",
"gasMultiplier": 0,
"gasPriceMultiplier": 0,
"externalNetwork": true
}
}
6 changes: 5 additions & 1 deletion src/commands/app/registerAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,16 @@ export const registerAgent = async (
costInCredits, // default cost in credits for every succesful query to the agent
costInCredits, // min amount of credits to be consumed
maxCostInCredits, // max amount of credits to be consumed
argv.nftAddress || nvmApp.sdk.keeper.nftUpgradeable.address
)
} else {
ddo = await nvmApp.registerServiceAsset(
agentMetadata,
argv.subscriptionDid,
costInCredits
costInCredits,
undefined,
undefined,
argv.nftAddress || nvmApp.sdk.keeper.nftUpgradeable.address
)
}

Expand Down
3 changes: 2 additions & 1 deletion src/commands/app/registerFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ export const registerFiles = async (
const ddo = await nvmApp.registerFileAsset(
filesMetadata,
argv.subscriptionDid,
costInCredits
costInCredits,
argv.nftAddress || nvmApp.sdk.keeper.nftUpgradeable.address
)

const assetUrl = `${config.nvm.appUrl}/en/file/${ddo.shortId()}`
Expand Down

0 comments on commit 07ab6ee

Please sign in to comment.