-
Notifications
You must be signed in to change notification settings - Fork 60
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
put market in memory instead of calldata #152
Conversation
@MathisGD suggested to actually move from calldata to memory: #144 (comment) But for completeness, we'd have to expose a calldata-based getter anyway, right? On a side note, this PR looks ridiculous but we'll actually use such function/library in the test suite - perhaps we could include some change to illustrate it. |
But
Yes.
Yes I'll adapt |
So bad that Solidity doesn't allow giving the same name to all the functions...
I find it more elegant to keep them in the same library. Also, we might need them in Blue at some point.
From the library's perspective, I find it more elegant to remain consistent and always specify the variable location. But it does burden Blue's code... Maybe we can shorten the names? Something like
I agree that we should keep |
Can be better yers but I think |
|
I'm ok with |
another option is to indeed use |
This is neat! So we can minimize changes in Blue (if we really want to lol). But is there a syntax for it in Solidity, for internal library functions? |
I'll try it! EDIT: seems impossible indeed... |
Did you try it ? I'm not so sure If it's not, I'm in favor of using memory everywhere and don't apply this change which is very ugly. |
In our case, indeed, specifying |
So should I go back to |
I'm ok with |
db1afdb
id
lib function for memory or storage variables
Fixes #144
Few questions:
id
toidCalldata
or something similar?