diff --git a/bindings/go/evmc/evmc.go b/bindings/go/evmc/evmc.go index 0ba5e7f..8039490 100644 --- a/bindings/go/evmc/evmc.go +++ b/bindings/go/evmc/evmc.go @@ -185,6 +185,17 @@ func (instance *Instance) Version() string { return C.GoString(instance.handle.version) } +type Capability uint32 + +const ( + CapabilityEVM1 Capability = C.EVMC_CAPABILITY_EVM1 + CapabilityEWASM Capability = C.EVMC_CAPABILITY_EWASM +) + +func (instance *Instance) HasCapability(capability Capability) bool { + return bool(C.evmc_vm_has_capability(instance.handle, uint32(capability))) +} + func (instance *Instance) SetOption(name string, value string) (err error) { r := C.set_option(instance.handle, C.CString(name), C.CString(value))