Function gstd::exec::pay_program_rent

source ·
pub fn pay_program_rent(program_id: ActorId, value: u128) -> Result<(u128, u32)>
Expand description

Pay specified rent for the program. The result contains the remainder of rent value and the count of paid blocks.

Examples

use gstd::exec;

#[no_mangle]
extern "C" fn handle() {
    let (_unused_value, paid_block_count) =
        exec::pay_program_rent(exec::program_id(), 1_000_000).expect("Unable to pay rent");
}