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

Suggesting updates on the doc of Escrow.deposit and Escrow.withdraw #3369

Closed
DocCon-team opened this issue Apr 28, 2022 · 3 comments
Closed

Comments

@DocCon-team
Copy link

DocCon-team commented Apr 28, 2022

Hi,

The Escrow.deposit function emits a Deposited event, which is not stated in its doc.
Similarly, the Escrow.withdraw function emits a Withdrawn event, which is not stated in its doc either.

A potential fix could be adding "Emits a {Deposited} event" to the doc of Escrow.deposit, and adding "Emits a {Withdrawn} event" to Escrow.withdraw.

emit Deposited(payee, amount);

emit Withdrawn(payee, payment);

These events can also transitively emit in the functions PullPayment._asyncTransfer and PullPayment.withdrawPayments, because they call Escrow.deposit and Escrow.withdraw respectively.

_escrow.deposit{value: amount}(dest);

Could you please check it?

Thanks.

@Amxx
Copy link
Collaborator

Amxx commented Apr 28, 2022

Hello @DocCon-team

I'll add the details in Escrow.sol.
About the PullPayment, calling withdrawPayments or _asyncTransfer will indeed trigger an event, but at another address (the escrow and the PullPayment are two different contract) so the wording should reflect that.

@DocCon-team
Copy link
Author

Thanks for the clarification.

@frangio
Copy link
Contributor

frangio commented May 4, 2022

Fixed in #3365

@frangio frangio closed this as completed May 4, 2022
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

No branches or pull requests

3 participants