(source *common.ZeroCopySource)
| 37 | } |
| 38 | |
| 39 | func (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 | |
| 54 | func (this *StorageKey) ToArray() []byte { |
| 55 | return common.SerializeToBytes(this) |