From 2049b7b2232881e55da5f8e25972458dacaf7bd9 Mon Sep 17 00:00:00 2001 From: enrique Date: Wed, 28 Aug 2024 16:24:01 +0200 Subject: [PATCH] feat: update to pass credits/time nft contract address as parameter --- src/commands/app/registerAgent.ts | 6 +++++- src/commands/app/registerFiles.ts | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/commands/app/registerAgent.ts b/src/commands/app/registerAgent.ts index 15f0a66..162cdcb 100644 --- a/src/commands/app/registerAgent.ts +++ b/src/commands/app/registerAgent.ts @@ -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 ) } diff --git a/src/commands/app/registerFiles.ts b/src/commands/app/registerFiles.ts index 477b930..94a54c3 100644 --- a/src/commands/app/registerFiles.ts +++ b/src/commands/app/registerFiles.ts @@ -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()}`