Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 861 Bytes

kip-6.md

File metadata and controls

34 lines (23 loc) · 861 Bytes
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
---

GASLEFT Host Function for pWASM

Motivation

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.

Specification

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)

Implementation

To be added.

Copyright

Copyright and related rights waived via CC0.