Algorand TypeScript
    Preparing search index...

    Variable AppGlobalConst

    AppGlobal: {
        delete(a: bytes): void;
        getBytes(a: bytes): bytes;
        getExBytes(a: uint64 | Application, b: bytes): readonly [bytes, boolean];
        getExUint64(a: uint64 | Application, b: bytes): readonly [uint64, boolean];
        getUint64(a: bytes): uint64;
        put(a: bytes, b: uint64 | bytes): void;
    } = ...

    Get or modify Global app state

    Type declaration

    • delete: function
      • delete key A from the global state of the current application

        Parameters

        • a: 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.)

        Returns void

        Native TEAL opcode: app_global_del Min AVM version: 2

    • getBytes: function
      • global state of the key A in the current application

        Parameters

        Returns 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: function
      • X is the global state of application A, key B. Y is 1 if key existed, else 0

        Parameters

        • a: uint64 | Application

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

        • 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.

        Native TEAL opcode: app_global_get_ex Min AVM version: 2

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

        Parameters

        • a: uint64 | Application

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

        • 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.

        Native TEAL opcode: app_global_get_ex Min AVM version: 2

    • getUint64: function
      • global state of the key A in the current application

        Parameters

        Returns 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: function