gear
gear copied to clipboard
Gas reservation inside program
Problem to Solve
Need to provide an ability to reserve some gas from given to use it for future actions inside the program (even over multiple execution, but it's relies on user-space).
It may look like this:
use gcore::exec; // or any other module
#[no_mangle]
pub unsafe extern "C" fn handle() {
let reservation_id = exec::reserve_gas(5_000);
}
Using this stored reservation_id program will be able to use that gas.
Possible Solution
Need to expand ValueTree functionality to be able split off not only for messages, but for reservations also.