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

Add batch withdraw and natspec #4

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

pandadefi
Copy link

No description provided.

contracts/StreamManager.vy Outdated Show resolved Hide resolved
contracts/StreamManager.vy Outdated Show resolved Hide resolved
contracts/StreamManager.vy Outdated Show resolved Hide resolved
contracts/StreamManager.vy Show resolved Hide resolved
contracts/StreamManager.vy Outdated Show resolved Hide resolved
contracts/StreamManager.vy Outdated Show resolved Hide resolved
contracts/StreamManager.vy Outdated Show resolved Hide resolved
contracts/StreamManager.vy Outdated Show resolved Hide resolved
contracts/StreamManager.vy Outdated Show resolved Hide resolved
contracts/StreamManager.vy Outdated Show resolved Hide resolved
contracts/StreamManager.vy Outdated Show resolved Hide resolved
contracts/StreamManager.vy Outdated Show resolved Hide resolved
contracts/StreamManager.vy Outdated Show resolved Hide resolved
contracts/StreamManager.vy Outdated Show resolved Hide resolved
apepay/__init__.py Outdated Show resolved Hide resolved
Copy link
Member

@fubuloubu fubuloubu left a comment

Choose a reason for hiding this comment

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

Looking much better

contracts/StreamManager.vy Outdated Show resolved Hide resolved


@external
def batch_withdraw(
Copy link
Member

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

Copy link
Author

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"

Copy link
Member

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

Copy link
Author

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?

Copy link
Member

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

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.

None yet

2 participants