mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 12:51:05 +00:00
Remove gas function from the public API (#1503)
* Disallow importing `gas` function * Update srml/contract/src/wasm/prepare.rs Co-Authored-By: pepyakin <s.pepyakin@gmail.com>
This commit is contained in:
committed by
Bastian Köcher
parent
c2f7993d0f
commit
603392a9b9
@@ -202,6 +202,9 @@ define_env!(Env, <E: Ext>,
|
||||
|
||||
// Account for used gas. Traps if gas used is greater than gas limit.
|
||||
//
|
||||
// NOTE: This is a implementation defined call and is NOT a part of the public API.
|
||||
// This call is supposed to be called only by instrumentation injected code.
|
||||
//
|
||||
// - amount: How much gas is used.
|
||||
gas(ctx, amount: u32) => {
|
||||
charge_gas(&mut ctx.gas_meter, ctx.schedule, RuntimeToken::Explicit(amount))?;
|
||||
|
||||
Reference in New Issue
Block a user