Function
NewDeployCode
(code []byte, vmType VmType, name, version, author, email, description string)
Source from the content-addressed store, hash-verified
| 60 | } |
| 61 | |
| 62 | func 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 | |
| 79 | func (dc *DeployCode) Address() common.Address { |
| 80 | if dc.address == common.ADDRESS_EMPTY { |