Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support peaq #118

Merged
merged 4 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading