From 5d6d6956db57f5f842ef84aeda55d33cd6bf7f3b Mon Sep 17 00:00:00 2001 From: keerthilochankumar Date: Fri, 29 Mar 2024 18:12:51 +0530 Subject: [PATCH] solved challenge-3 --- challenge/index.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/challenge/index.ts b/challenge/index.ts index c9649b1..0b56d9a 100644 --- a/challenge/index.ts +++ b/challenge/index.ts @@ -1,11 +1,10 @@ import { HelloWorldClient } from './contracts/clients/helloWorldClient' import * as algokit from '@algorandfoundation/algokit-utils' -const algod = algokit.getAlgoClient() -const indexer = algokit.getAlgoIndexerClient() -const kmd = algokit.getAlgoKmdClient() -const deployer = await algokit.getLocalNetDispenserAccount(algod, kmd) - +const algod = algokit.getAlgoClient(); +const indexer = algokit.getAlgoIndexerClient(); +const kmd = algokit.getAlgoKmdClient(); +const deployer = await algokit.getLocalNetDispenserAccount(algod, kmd); /* FIX THE BUG: @@ -14,19 +13,19 @@ There are 2 bugs in the below code. Find and fix them. Hint: Read the Typed clients section in the documentation: https://developer.algorand.org/docs/get-details/algokit/features/generate/?from_query=algokit%20utils#1-typed-clients */ + const appClient = new HelloWorldClient( { resolveBy: 'creatorAndName', findExistingUsing: indexer, sender: deployer, - creatorAddress: deployer, + creatorAddress: deployer.addr, }, - indexer, + algod, ) await appClient.create.createApplication({}); - // TODO: change YOUR_NAME to your name or nickname -const result = await appClient.helloWorld({name: "YOUR_NAME"}, {sendParams: {suppressLog: true}}) +const result = await appClient.helloWorld({name: "lochan"}, {sendParams: {suppressLog: true}}) console.log(result.return) \ No newline at end of file