It should be easy to add custom review logic to each new Status being set in reviewRecipients() (e.g. do sth on Status.Reject).
It should be easy to differentiate a new Status from an old Status. Currently in reviewRecipients() it is not straight forward to see which statuses are new and which are not, because a row with 64 statuses is passed as param and set to storage directly.
It should be possible and easy to access the recipient id of the new Status being set.
It should be easy to override reviewRecipients() to use a different permission logic.
We should keep the gas optimization of using a bitmap for recipients statuses.
Some ideas implemented so far:
[x] merge and pack recipientToStatusIndexes into Recipient struct
[x] add mapping containing the recipientIndex --> recipientId information.
[x] iterate all the statuses in reviewRecipient and call an internal customizable function. Only if an immutable var was set to true to save gas when this is not needed.
The idea of these changes is that:
reviewRecipients()
(e.g. do sth on Status.Reject).reviewRecipients()
it is not straight forward to see which statuses are new and which are not, because a row with 64 statuses is passed as param and set to storage directly.reviewRecipients()
to use a different permission logic.Some ideas implemented so far:
recipientIndex
-->recipientId
information.