Error in user YAML: (<unknown>): did not find expected key while parsing a block mapping at line 1 column 1
---
kip: 6
title: "gasleft" Host Function for pWASM
author: Nikolay Volf (@NikVolf)
discussions-to: -
status: Draft
type: Standards Track
category: Core
created: 2018-08-17
---
For default calls with no gas costs specifed downstream, user code now cannot infer how much gas left in the current context of execution. Proposed "gasleft" extern will allow this.
After FORK_BLOCK
, allow a new function to be imported from module "env" with the name "gasleft".
fn gasleft() -> i64;
This function will return gas left in the current execution context (non-adjusted for Wasm, since the following call destination might be EVM or Wasm)
To be added.
Copyright and related rights waived via CC0.