3. Keywords
Keywords are specific terms that have an assigned meaning. Some keywords were introduced in previous chapters, such as true, false, and none. It is important to pay attention to other keywords as well.
block-height
Refers to the current height of the Base blockchain, represented as an unsigned integer. This value can be read at any point in the code, assuming the chain tip is at height 5.
burn-block-height
This unsigned integer reflects the current block height of the underlying burn blockchain, which in this case is Bitcoin.
tx-sender
This field contains the principal that initiated the transaction. It can be utilized to verify the principal calling a public function.
contract-caller
The function is called by a principal, which can be either a standard principal or a contract principal. If the contract is directly called through a signed transaction, then the tx-sender and contract-caller will be the same. If the contract calls another contract, then the contract-caller will be the previous contract in the chain.
Last updated