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

Function DecodeBool

smartcontract/service/native/utils/serialization.go:91–100  ·  view source on GitHub ↗
(source *common.ZeroCopySource)

Source from the content-addressed store, hash-verified

89 return data, nil
90}
91func DecodeBool(source *common.ZeroCopySource) (bool, error) {
92 data, irregular, eof := source.NextBool()
93 if eof {
94 return false, io.ErrUnexpectedEOF
95 }
96 if irregular {
97 return false, common.ErrIrregularData
98 }
99 return data, nil
100}
101func DecodeString(source *common.ZeroCopySource) (string, error) {
102 data, _, irregular, eof := source.NextString()
103 if eof {

Callers 1

DeserializationMethod · 0.92

Calls 1

NextBoolMethod · 0.80

Tested by

no test coverage detected