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

Method Serialization

core/payload/deploy_code.go:132–140  ·  view source on GitHub ↗
(sink *common.ZeroCopySink)

Source from the content-addressed store, hash-verified

130}
131
132func (dc *DeployCode) Serialization(sink *common.ZeroCopySink) {
133 sink.WriteVarBytes(dc.code)
134 sink.WriteByte(dc.vmFlags)
135 sink.WriteString(dc.Name)
136 sink.WriteString(dc.Version)
137 sink.WriteString(dc.Author)
138 sink.WriteString(dc.Email)
139 sink.WriteString(dc.Description)
140}
141
142//note: DeployCode.Code has data reference of param source
143func (dc *DeployCode) Deserialization(source *common.ZeroCopySource) error {

Callers 3

GetContractStateFunction · 0.95
TestDeployCode_SerializeFunction · 0.95
ToArrayMethod · 0.95

Calls 3

WriteVarBytesMethod · 0.80
WriteByteMethod · 0.80
WriteStringMethod · 0.80

Tested by 1

TestDeployCode_SerializeFunction · 0.76