-
Notifications
You must be signed in to change notification settings - Fork 2
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
Brian/bounds library #4
Conversation
} | ||
|
||
/* ============ Functions ============ */ | ||
function isValid(Bounds memory _bounds) internal pure returns(bool) { |
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.
Interesting that this one is memory while the other ones are storage. I wonder if we should have both versions for every function
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.
We can call the storage one isWithinS
or isWithinStorage
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.
Thinking about it, would it work for these to be memory? I think that when a storage element is passed in as a parameter, its automatically turned to memory.
Also, libraries in general, should aim to be in memory so it can be used by a larger variety of purposes
contracts/lib/BoundsLibrary.sol
Outdated
@@ -0,0 +1,40 @@ | |||
/* | |||
Copyright 2019 Set Labs Inc. |
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.
2020
No description provided.