MCPcopy Create free account
hub / github.com/DNAProject/DNA / ParseNativeParamBool

Function ParseNativeParamBool

cmd/utils/native_param.go:226–238  ·  view source on GitHub ↗
(builder *neovm.ParamsBuilder, param string)

Source from the content-addressed store, hash-verified

224}
225
226func ParseNativeParamBool(builder *neovm.ParamsBuilder, param string) error {
227 var b bool
228 switch strings.ToLower(param) {
229 case "true":
230 b = true
231 case "false":
232 b = false
233 default:
234 return fmt.Errorf("invalid bool value")
235 }
236 builder.EmitPushBool(b)
237 return nil
238}
239
240func ParseNativeParamAddress(builder *neovm.ParamsBuilder, param string) error {
241 if param == "" {

Callers 1

ParseNativeParamsFunction · 0.85

Calls 2

ErrorfMethod · 0.80
EmitPushBoolMethod · 0.80

Tested by

no test coverage detected