Skip to content

AppGlobal

@algorandfoundation/algorand-typescript


@algorandfoundation/algorand-typescript / op / AppGlobal

Variable: AppGlobal

const AppGlobal: object

Defined in: packages/algo-ts/src/op.ts:185

Get or modify Global app state

Type declaration

delete()

delete key A from the global state of the current application

Parameters

a

bytes

Returns

void

See

Native TEAL opcode: app_global_del Min AVM version: 2

getBytes()

global state of the key A in the current application

Parameters

a

bytes

Returns

bytes

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

See

Native TEAL opcode: app_global_get Min AVM version: 2

getExBytes()

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

Parameters

a

uint64 | Application

b

bytes

Returns

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.

See

Native TEAL opcode: app_global_get_ex Min AVM version: 2

getExUint64()

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

Parameters

a

uint64 | Application

b

bytes

Returns

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.

See

Native TEAL opcode: app_global_get_ex Min AVM version: 2

getUint64()

global state of the key A in the current application

Parameters

a

bytes

Returns

uint64

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

See

Native TEAL opcode: app_global_get Min AVM version: 2

put()

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

Parameters

a

bytes

b

uint64 | bytes

Returns

void

See

Native TEAL opcode: app_global_put Min AVM version: 2