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

Function NewDeployCode

core/payload/deploy_code.go:62–77  ·  view source on GitHub ↗
(code []byte, vmType VmType, name, version, author, email, description string)

Source from the content-addressed store, hash-verified

60}
61
62func NewDeployCode(code []byte, vmType VmType, name, version, author, email, description string) (*DeployCode, error) {
63 dc := &DeployCode{
64 code: code,
65 vmFlags: byte(vmType),
66 Name: name,
67 Version: version,
68 Author: author,
69 Email: email,
70 Description: description,
71 }
72 err := validateDeployCode(dc)
73 if err != nil {
74 return nil, err
75 }
76 return dc, nil
77}
78
79func (dc *DeployCode) Address() common.Address {
80 if dc.address == common.ADDRESS_EMPTY {

Callers 3

NewDeployTransactionFunction · 0.92
NewDeployCodeTransactionFunction · 0.92
TestDeployCode_SerializeFunction · 0.85

Calls 1

validateDeployCodeFunction · 0.85

Tested by 1

TestDeployCode_SerializeFunction · 0.68