Add VerificationContract + tests #123
Add VerificationContract + tests #123
Conversation
Add warning message for invalid wallet parameter
Add IO Helper utility needed in more classes
@property | ||
def IsStandard(self): | ||
""" | ||
XXXUnknown. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to do sanity checking on the Script, which makes me think it's more like a IsValid
check. Eitherway, I don't know what could generate a 'non-standard'. If you have a good description please let me know
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any smart contract associated with an address is 'non-standard'
) | ||
|
||
@property | ||
def IsStandard(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#overwriting Contract.IsStandard because Script should not need to be unhexlified
return True | ||
|
||
@property | ||
def ScriptHash(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note I'm overriding this method from the VerificationCode
class because self.Script
should not be a hex string. I'm being strict on data types to prevent mismatches in the future (which i've already encountered quite some).
expected_address = 'AWLYWXB8C9Lt1nHdDZJnC5cpYJjgRDLk17' | ||
expected_isStandard = True | ||
# should we make this a proper ENUM like C#? | ||
expected_ParameterList = [bytes([ContractParameterType.Signature])] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need an opinion on the ContractParameter type. It's currently a class, but I think a proper enum could do as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI; it's actually an enum in C#
Does |
Yes, |
If you plan on replacing the existing |
I hope to not touch |
Looks good. I just worry about having very similar functionality implemented twice, once in If possible for now, we should keep |
Add IO Helper utility needed in more classes to come