-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add batch withdraw and natspec #4
base: main
Are you sure you want to change the base?
Conversation
098c124
to
0a57b84
Compare
0a57b84
to
fb18951
Compare
96838e2
to
c0fa54d
Compare
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.
Looking much better
|
||
|
||
@external | ||
def batch_withdraw( |
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.
Might be more expedient to pass in token: ERC20
to this method, save the memory cost
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 still need to load the token on every iteration to asser the stream uses the same token
assert token.address == self.streams[creator][stream_id].token.address, "token must be the same for all streams"
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.
yep, but can save an SLOAD by passing it in as calldata
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.
And the SLOAD is more expensive than writing one more address on-chain?
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.
Oh, no no, I mean add it as an input argument
Co-authored-by: El De-dog-lo <3859395+fubuloubu@users.noreply.github.com>
fc9b04d
to
d882184
Compare
23d8e10
to
9ab76af
Compare
No description provided.