AppGlobal
Algorand TypeScript / op / AppGlobal
constAppGlobal:object
Defined in: op.ts:186
Get or modify Global app state
Type declaration
Section titled “Type declaration”delete()
Section titled “delete()”delete(
a):void
delete key A from the global state of the current application
Parameters
Section titled “Parameters”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.)
Returns
Section titled “Returns”void
Native TEAL opcode: app_global_del
Min AVM version: 2
getBytes()
Section titled “getBytes()”getBytes(
a):bytes
global state of the key A in the current application
Parameters
Section titled “Parameters”state key.
Returns
Section titled “Returns”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()
Section titled “getExBytes()”getExBytes(
a,b): readonly [bytes,boolean]
X is the global state of application A, key B. Y is 1 if key existed, else 0
Parameters
Section titled “Parameters”Txn.ForeignApps offset (or, since v4, an available application id), state key.
Returns
Section titled “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.
Native TEAL opcode: app_global_get_ex
Min AVM version: 2
getExUint64()
Section titled “getExUint64()”getExUint64(
a,b): readonly [uint64,boolean]
X is the global state of application A, key B. Y is 1 if key existed, else 0
Parameters
Section titled “Parameters”Txn.ForeignApps offset (or, since v4, an available application id), state key.
Returns
Section titled “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.
Native TEAL opcode: app_global_get_ex
Min AVM version: 2
getUint64()
Section titled “getUint64()”getUint64(
a):uint64
global state of the key A in the current application
Parameters
Section titled “Parameters”state key.
Returns
Section titled “Returns”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
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Native TEAL opcode: app_global_put
Min AVM version: 2