Skip to main content

Environment Variables

Environment Variables are variables globally available in @contract class It's advised to use those variables under @contructor and @message methods

block#

block.timestamp (u64)#

current block timestamp as seconds since unix epoch

block.number (u32)#

current block number

msg#

msg.value (u128)#

seal_value_transferred

msg.sender (AccountId)#

sender of the message (current call)

msg.sig (u8)#

first four bytes of the calldata (i.e. function identifier)

msg.data (u8)#

complete calldata