Skip to content

AppGlobal

Algorand TypeScript


Algorand TypeScript / op / AppGlobal

const AppGlobal: object

Defined in: op.ts:186

Get or modify Global app state

delete(a): void

delete key A from the global state of the current application

bytes

state key. Deleting a key which is already absent has no effect on the application global state. (In particular, it does not cause the program to fail.)

void

Native TEAL opcode: app_global_del Min AVM version: 2

getBytes(a): bytes

global state of the key A in the current application

bytes

state key.

bytes

value. The value is zero (of type uint64) if the key does not exist.

Native TEAL opcode: app_global_get Min AVM version: 2

getExBytes(a, b): readonly [bytes, boolean]

X is the global state of application A, key B. Y is 1 if key existed, else 0

Txn.ForeignApps offset (or, since v4, an available application id), state key.

uint64 | Application

bytes

readonly [bytes, boolean]

did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.

Native TEAL opcode: app_global_get_ex Min AVM version: 2

getExUint64(a, b): readonly [uint64, boolean]

X is the global state of application A, key B. Y is 1 if key existed, else 0

Txn.ForeignApps offset (or, since v4, an available application id), state key.

uint64 | Application

bytes

readonly [uint64, boolean]

did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.

Native TEAL opcode: app_global_get_ex Min AVM version: 2

getUint64(a): uint64

global state of the key A in the current application

bytes

state key.

uint64

value. The value is zero (of type uint64) if the key does not exist.

Native TEAL opcode: app_global_get Min AVM version: 2

put(a, b): void

write B to key A in the global state of the current application

bytes

uint64 | bytes

void

Native TEAL opcode: app_global_put Min AVM version: 2