-
Notifications
You must be signed in to change notification settings - Fork 112
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 ExpenditurePayoutClaimed event #1157
Conversation
c5cc8e5
to
19efb73
Compare
I will note that, the way that this is currently structured, the payout value is different for these two events (see the test). One includes the network fee, and one does not. Should the new event use the same value as the old one? |
@area hmm... that's an interesting question. I'm inclined to say the event should be the larger number (i.e. include the fee), since that would make it possible to use the event to track current balances and will probably be more useful for a UI. |
How are you envisaging using the event to track current balances? Can't the current balance of whatever you're interested in just be queried? |
19efb73
to
056a696
Compare
@area sure, but if the intention is to reduce the need for queries then being able to prepare a UI using the event log seems advantageous. Also, you can use the underlying ERC20 transfer event if you need to get the actual amount the user received. Emitting the value prior to the network key will keep the expenditure-related events to be internally consistent, i.e. agnostic to the network fee. |
056a696
to
ebf7627
Compare
From @jakubcolony
I agreed with Jakub's conclusion that there is no way to uniquely identify a claimed payout (especially if there are multiple payouts for the same amount / destination), short of tracing the transaction which we really don't want to expect people to to, and agree that the easiest way to solve this is to add the
ExpenditurePayoutClaimed
event.There's some crossover here with #1150; when that is complete there will only be one type of payout on the core contracts, so perhaps with this merged, the even there could go back to
PayoutClaimed
with an adjusted signature; alternatively, we could start this event named PayoutClaimed which would be a little confusing to begin with but correct moving forward.