Keywords
block-heightβ
Introduced in: Clarity 1
output: uint
description:
Returns the current block height of the Stacks blockchain as an uint
example:
burn-block-heightβ
Introduced in: Clarity 1
output: uint
description:
Returns the current block height of the underlying burn blockchain as a uint
example:
chain-idβ
Introduced in: Clarity 2
output: uint
description:
Returns the 32-bit chain ID of the blockchain running this transaction
example:
contract-callerβ
Introduced in: Clarity 1
output: principal
description:
Returns the caller of the current contract context. If this contract is the first one called by a signed transaction, the caller will be equal to the signing principal. If contract-call?
was used to invoke a function from a new contract, contract-caller
changes to the calling contract's principal. If as-contract
is used to change the tx-sender
context, contract-caller
also changes to the same contract principal.
example:
falseβ
Introduced in: Clarity 1
output: bool
description:
Boolean false constant.
example:
is-in-mainnetβ
Introduced in: Clarity 2
output: bool
description:
Returns a boolean indicating whether or not the code is running on the mainnet
example:
is-in-regtestβ
Introduced in: Clarity 1
output: bool
description:
Returns whether or not the code is running in a regression test
example:
noneβ
Introduced in: Clarity 1
output: (optional ?)
description:
Represents the none option indicating no value for a given optional (analogous to a null value).
example:
stx-liquid-supplyβ
Introduced in: Clarity 1
output: uint
description:
Returns the total number of micro-STX (uSTX) that are liquid in the system as of this block.
example:
trueβ
Introduced in: Clarity 1
output: bool
description:
Boolean true constant.
example:
tx-senderβ
Introduced in: Clarity 1
output: principal
description:
Returns the original sender of the current transaction, or if as-contract
was called to modify the sending context, it returns that contract principal.
example:
tx-sponsor?β
Introduced in: Clarity 2
output: optional principal
description:
Returns the sponsor of the current transaction if there is a sponsor, otherwise returns None.
example:
Last updated