Expand description

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

Structs

Index for a batch promise from within the runtime. Used to combine promises within a contract.

Functions

Aborts the current contract execution without a custom message. To include a message, use panic_str.
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.
The id of the account that owns the current contract.
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.
Add full access key with batch promise.
Add access key with only function call priviledges
Create account with the batch promise.
Delete account with batch promise.
Delete access key with batch promise.
Deploy contract with the batch promise.
Call a function within the batch promise.
Stake tokens with the promise.
Transfer tokens with the promise.
Create a batch promise and return the index of that promise.
Schedule a promise after the provided promise index.
the given amount and gas.
Attaches the callback that is executed after promise pointed by promise_idx is complete.
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.