(raw string)
| 1322 | } |
| 1323 | |
| 1324 | func parseRequiredMemoryType(raw string) (memcontract.Type, error) { |
| 1325 | typ, err := parseOptionalMemoryType(raw) |
| 1326 | if err != nil { |
| 1327 | return "", err |
| 1328 | } |
| 1329 | if typ == "" { |
| 1330 | return "", errors.New("memory.type_required: --type is required") |
| 1331 | } |
| 1332 | return typ, nil |
| 1333 | } |
| 1334 | |
| 1335 | func parseOptionalMemoryType(raw string) (memcontract.Type, error) { |
| 1336 | typ := memcontract.Type(strings.TrimSpace(raw)).Normalize() |
no test coverage detected