Closed kastolars closed 5 years ago
There are actually quite a few cases in ValidateContract
that returns both false and nil. (Zero-value contracts, unauthorized minting, invalid signature...etc.) Should we still make the changes and just edit its test to check for non-nil errors for these cases?
@HarryL5004 So there is another issue I put up #220 that will remove the unauthorized minters feature for Phase 1. Once that is done, there will only be one "true" case, which we can just substitute for a nil
and then every false
case can be an error with a message. The idea here is to have the table manipulation functions govern how the contracts get processed, whereas the purpose of validation should be to reject functions not worth even considering for processing.
Completed
...from
bool, error
to justerror
. It appears to be redundant that in pretty much every case where there is a false return we also return an error message and for the valid return we returnnil
.