You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like none of these parameters are really necessary, since the addPatron function is called only by admin and patron profile data are stored at the different time without a transaction. So when patron has been added, server only needs to know the address.
So I think we could just have isPatron[*address*] structure instead of the mapping below. I think it's not really necessary for this contract to maintain patrons count, since server-side will be able to easily construct it just from PatronAdded events.
Seems like none of these parameters are really necessary, since the
addPatron
function is called only by admin and patron profile data are stored at the different time without a transaction. So when patron has been added, server only needs to know the address.streamtide-smart-contract/streamtide.sol
Lines 34 to 37 in 5740c35
Same goes here, only address as an argument would be sufficient
streamtide-smart-contract/streamtide.sol
Lines 114 to 116 in 5740c35
So I think we could just have
isPatron[*address*]
structure instead of the mapping below. I think it's not really necessary for this contract to maintain patrons count, since server-side will be able to easily construct it just fromPatronAdded
events.streamtide-smart-contract/streamtide.sol
Line 26 in 5740c35
And here instead of passing
patron_indexes
we would passpatronAddresses
. (Also please use camelCase everywhere)streamtide-smart-contract/streamtide.sol
Line 126 in 5740c35
And here instead of passing
patron_index
we would be passingpatronAddress
streamtide-smart-contract/streamtide.sol
Line 137 in 5740c35
The text was updated successfully, but these errors were encountered: