Open thith opened 5 years ago
Currently, gas calculation is not fully implemented for Javascript contracts.
vm/js/babel/functionEntryGuard.js
vm/js/babel/loopEntryGuard.js
vm/js/gascost.js
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.
Relate to #53.
bce2f929399f3e9ed36e05040786a0f7f5be5ec3
bce2f92
We need to implement gas map for each type of AST statement. Current gas calculation is kind of basic.
Currently, gas calculation is not fully implemented for Javascript contracts.
vm/js/babel/functionEntryGuard.js
: guard against recursive function re-entriesvm/js/babel/loopEntryGuard.js
: guard against too many loops re-entriesvm/js/gascost.js
: not used yetFirst 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.