Special Operands

The following lists show the special operands supported by Beo instructions.

Table of Special Operands

Name
Description

block.height

Returns height of the block within the finalize scope

self.signer

Returns the user address that originated the transition

self.caller

Returns the address of the immediate caller of the program

network.id

Returns the ID of the network on which the program is executed

Specification

The following is the specification for each special operands in the Beo Virtual Machine (AVM).

network.id

Back to Top

Description

Returns the ID of the network on which the program is executed. This can be useful for managing network-specific program behavior. The network.id command must be called within a finalize block.

Currently supported network IDs are:

  • 0: Mainnet

  • 1: Testnet

  • 2: Canarynet

Example Usage

assert.eq network.id 0u64;  // For mainnet

block.height

Back to Top

Description

Returns the height of the block within the finalize scope. The block.height command must be called within a finalize block.

Example Usage

assert.eq block.height 100u64;

self.signer

Back to Top

Description

Returns the user address that originated the transition.

Example Usage

assert.eq self.signer beo1...;

self.caller

Back to Top

Description

Returns the address of the immediate caller of the program.

Example Usage

assert.eq self.caller beo1...;

Last updated