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

Function DeserializeCallParam

vm/crossvm_codec/vmcall_codec.go:32–39  ·  view source on GitHub ↗

input byte array should be the following format version(1byte) + type(1byte) + data...

(input []byte)

Source from the content-addressed store, hash-verified

30//input byte array should be the following format
31// version(1byte) + type(1byte) + data...
32func DeserializeCallParam(input []byte) (interface{}, error) {
33 if bytes.HasPrefix(input, []byte{0}) == false {
34 return nil, ERROR_PARAM_FORMAT
35 }
36
37 source := common.NewZeroCopySource(input[1:])
38 return DecodeValue(source)
39}

Callers 2

WASMInvokeFunction · 0.92

Calls 2

NewZeroCopySourceFunction · 0.92
DecodeValueFunction · 0.85

Tested by

no test coverage detected