Special Operands
The following lists show the special operands supported by Beo instructions.
Table of Special Operands
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
network.idBack 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 mainnetblock.height
block.heightBack 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
self.signerBack to Top
Description
Returns the user address that originated the transition.
Example Usage
assert.eq self.signer beo1...;self.caller
self.callerBack to Top
Description
Returns the address of the immediate caller of the program.
Example Usage
assert.eq self.caller beo1...;Last updated