Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StrictHash #236

Merged
merged 1 commit into from
Apr 20, 2016
Merged

StrictHash #236

merged 1 commit into from
Apr 20, 2016

Conversation

cbrwizard
Copy link
Contributor

Adds a StrictHash builtin contract, which checks that the argument is
a hash, and every key passed is present in the given contract.

#235

@cbrwizard
Copy link
Contributor Author

If there are any issues - please tell me, I will be glad to fix/adjust them!

@@ -393,6 +393,25 @@ def validate_hash(hash)
end
end

# Use this to specify the Hash characteristics with strict check of keys'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you elaborate on "strict check of keys' presence"? It would be nice to say "the contracts fails if there are any extra keys that don't have contracts on them".

@egonSchiele
Copy link
Owner

@cbrwizard this looks awesome! Thank you for adding documentation and tests. I left two small comments for you, it is good to merge after those are fixed.

@cbrwizard
Copy link
Contributor Author

@egonSchiele thanks, here is an update!

Adds a StrictHash builtin contract, which checks that the argument is
a hash, and every key passed is present in the given contract.

egonSchiele#235
@egonSchiele egonSchiele merged commit e94f129 into egonSchiele:master Apr 20, 2016
@egonSchiele
Copy link
Owner

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants