Closed rareweasel closed 2 years ago
queuedRewards
Isn't it possible to read the value on every block?
_amount
Can't be zero and should match the transfer amount.
queuedRewards
Isn't it possible to read the value on every block?
_amount
Can't be zero and should match the transfer amount.
I meant when we set queuedRewards = 0
or queuedRewards = _amount
:
Yes, it is possible to call the function to get value in the subgraph, but it makes too much slower the sync process (more if we call it every block). That's why it would be better if we emit an event.
I prefer we don't add the other event, on one hand, we have a more gas expensive tx on the other it takes longer to index, I prefer we don't spend more gas.
And if we move this event at the end of the function to include both values _amount
and queuedRewards
?
I know we added an event in this pr, but I wonder how can we know we set
queuedRewards
to0
here or here or_amount
here.