Module nesdie::env[][src]

Expand description

Higher level environment functions which act as a safe wrapper around sys.

Functions

The balance attached to the given account. This includes the attached_deposit that was attached to the transaction

The balance locked for potential validator staking.

The balance that was attached to the call that will be immediately deposited before the contract execution starts

Current block index.

Current block timestamp, i.e, number of non-leap-nanoseconds since January 1, 1970 0:00:00 UTC.

Current epoch height.

Hashes the random sequence of bytes using keccak256.

Hashes the random sequence of bytes using keccak512.

Log the UTF-8 encodable message.

Terminates the execution of the program with the UTF-8 encoded message.

The amount of gas attached to the call that can be used to pay for the gas fees.

Reads the content of the register_id. If register is not used or the buffer is not large enough, an error will be returned.

Returns the size of the register. If register is not used returns None.

Hashes the random sequence of bytes using sha256.

Returns true if the contract state exists and false otherwise.

Load the state of the given object. Read raw bytes under the static state key.

Write bytes under the static state key.

Returns the storage cost per byte.

Reads the most recent value that was evicted with storage_write or storage_remove command.

Checks if there is a key-value in the storage.

Reads the value stored under the given key.

Removes the value stored under the given key. If key-value existed returns true, otherwise false.

Current total storage usage of this smart contract that this account would be paying for.

Writes key-value into storage. If another key-value existed in the storage with the same key it returns true, otherwise false.

The gas that was already burnt during the contract execution (cannot exceed prepaid_gas)

For a given account return its current stake. If the account is not a validator, returns 0.

Returns the total stake of validators in the current epoch.

Sets the blob of data as the return value of the contract.