gcore::exec

Function value_available

Source
pub fn value_available() -> u128
Expand description

Get the total available value amount.

Note that this balance already includes the value received with the current message.

§Examples

Get self’s value balance in the program:

use gcore::exec;

#[unsafe(no_mangle)]
extern "C" fn handle() {
    let my_balance = exec::value_available();
}