input byte array should be the following format version(1byte) + type(1byte) + data...
(input []byte)
| 30 | //input byte array should be the following format |
| 31 | // version(1byte) + type(1byte) + data... |
| 32 | func 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 | } |
no test coverage detected