Skip to content
Open
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
27 changes: 15 additions & 12 deletions challenge/index.ts
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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)
console.log(result.return);