icetea-labs / icetea_chain

A smart contract & decentralized bot engine, with a focus on usability and developer-friendly.
https://icetea.io
MIT License
93 stars 9 forks source link

Gas calculation for Javascript #83

Open thith opened 5 years ago

thith commented 5 years ago

Currently, gas calculation is not fully implemented for Javascript contracts.

First version: we need to integrate gas calculation into functionEntryGuard and loopEntryGuard.

Future version: we could use a gas map for each type of AST statement. Similar to how Wasm module does.

thith commented 5 years ago

Relate to #53.

ghost commented 5 years ago

bce2f929399f3e9ed36e05040786a0f7f5be5ec3

thith commented 5 years ago

bce2f92

We need to implement gas map for each type of AST statement. Current gas calculation is kind of basic.