From 8ef9deb500e0d34684aebf7e73ac6677cd80a383 Mon Sep 17 00:00:00 2001 From: damilola dolor Date: Tue, 26 Mar 2024 12:36:40 +0100 Subject: [PATCH] Fix bug --- challenge/index.ts | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/challenge/index.ts b/challenge/index.ts index c9649b1..9b3296e 100644 --- a/challenge/index.ts +++ b/challenge/index.ts @@ -1,10 +1,10 @@ -import { HelloWorldClient } from './contracts/clients/helloWorldClient' -import * as algokit from '@algorandfoundation/algokit-utils' +import * as algokit from "@algorandfoundation/algokit-utils"; +import { HelloWorldClient } from "./contracts/clients/helloWorldClient"; -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: @@ -16,17 +16,20 @@ Hint: Read the Typed clients section in the documentation: https://developer.alg */ const appClient = new HelloWorldClient( { - resolveBy: 'creatorAndName', + 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: "0xdod" }, + { sendParams: { suppressLog: true } } +); -console.log(result.return) \ No newline at end of file +console.log(result.return);