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

Method Deserialization

core/states/storage_key.go:39–52  ·  view source on GitHub ↗
(source *common.ZeroCopySource)

Source from the content-addressed store, hash-verified

37}
38
39func (this *StorageKey) Deserialization(source *common.ZeroCopySource) error {
40 if err := this.ContractAddress.Deserialization(source); err != nil {
41 return err
42 }
43 key, _, irregular, eof := source.NextVarBytes()
44 if irregular {
45 return common.ErrIrregularData
46 }
47 if eof {
48 return io.ErrUnexpectedEOF
49 }
50 this.Key = key
51 return nil
52}
53
54func (this *StorageKey) ToArray() []byte {
55 return common.SerializeToBytes(this)

Callers 1

Calls 2

NextVarBytesMethod · 0.80
DeserializationMethod · 0.65

Tested by 1