Skip to content

lowesyang/go-wasm-metering

Repository files navigation

go-wasm-metering

Gas metering injector for eWASM in Golang.

Install

go get -u github.com/yyh1102/go-wasm-metering

Usage

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)
}

License

Apache-2.0

About

Gas metering injector for eWASM in Golang.

Resources

License

Stars

Watchers

Forks

Packages

No packages published