From cbcc532089594542304bab216d9e17fd536384c4 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 12 Nov 2024 11:13:41 -0500 Subject: [PATCH] fix disrepencies in TEALScript contract --- tealscript_contracts/kitchen-sink-tealscript.algo.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tealscript_contracts/kitchen-sink-tealscript.algo.ts b/tealscript_contracts/kitchen-sink-tealscript.algo.ts index 3ac1d3b..cc2d027 100644 --- a/tealscript_contracts/kitchen-sink-tealscript.algo.ts +++ b/tealscript_contracts/kitchen-sink-tealscript.algo.ts @@ -2,13 +2,13 @@ import { Contract } from "@algorandfoundation/tealscript"; export class KitchenSinkContract extends Contract { globalInt = GlobalStateKey(); - globalString = GlobalStateKey(); + globalString = GlobalStateKey({ key: "customKey" }); localBigInt = LocalStateKey>(); boxOfArray = BoxKey({ key: "b" }); - boxMap = BoxMap({ prefix: "" }); - boxRef = BoxKey({ key: "ff" }); + boxMap = BoxMap({ prefix: "" }); + boxRef = BoxKey({ key: "FF" }); useState(a: uint64, b: string, c: uint64) { this.globalInt.value *= a; @@ -22,7 +22,7 @@ export class KitchenSinkContract extends Contract { } } - createApp() { + createApplication() { this.globalInt.value = 4; this.globalInt.value = this.app.id; } @@ -31,13 +31,13 @@ export class KitchenSinkContract extends Contract { addToBox(x: uint64) { if (!this.boxOfArray.exists) { - this.boxOfArray.value = []; + this.boxOfArray.value = [x]; } else { this.boxOfArray.value.push(x); } } - addToBoxMap(x: uint64) { + addToBoxMap(x: string) { this.boxMap(this.txn.sender).value = x; }