Gas metering injector for eWASM in Golang.
go get -u github.com/yyh1102/go-wasm-metering
Inject meter func to wasm.
package main
import "github.com/yyh1102/go-wasm-metering"
func main(){
wasm, err:=ioutil.ReadFile("xxx.wasm")
if err!=nil{
panic(err)
}
opts := &metering.Options{}
meterWasm:=metering.MeterWasm(wasm,opts)
fmt.Println(meterWasm)
}
Apache-2.0