diff --git a/index.js b/index.js index 9cbac819..593a4177 100644 --- a/index.js +++ b/index.js @@ -189,7 +189,11 @@ exports.evm2wast = function (evmCode, opts = { if (opts.chargePerOp) { segment += `(call $useGas (i64.const ${op.fee})) ` } - gasCount += op.fee + // do not charge gas for interface methods + // TODO: implement proper gas charging and enable this here + if (opint < 0x30 || (opint > 0x45 && opint < 0xa0)) { + gasCount += op.fee + } segmentStackDeta += op.on if (segmentStackDeta > segmentStackHigh) {