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
For purposes of this smart-contract there's no actual need to maintain arrays of admins and blacklisted. It's enough to just maintain isAdmin[*address*] and isBlacklisted[*address*] mappings. Looping through those lists cost unnecessary gas fees.
Function addAdmin should emit adminAdded event
Function removeAdmin should emit adminRemoved event
Function addBlacklisted should emit blacklistedAdded event (I suggest we rename addToBlacklist to addBlacklisted)
Function removeBlacklisted should emit blacklistedRemoved event
With these events we'll be able to construct list of admins and blacklisted on server-side so the whole list can be displayed in the UI.
For purposes of this smart-contract there's no actual need to maintain arrays of
admins
andblacklisted
. It's enough to just maintainisAdmin[*address*]
andisBlacklisted[*address*]
mappings. Looping through those lists cost unnecessary gas fees.Function
addAdmin
should emitadminAdded
eventFunction
removeAdmin
should emitadminRemoved
eventFunction
addBlacklisted
should emitblacklistedAdded
event (I suggest we renameaddToBlacklist
toaddBlacklisted
)Function
removeBlacklisted
should emitblacklistedRemoved
eventWith these events we'll be able to construct list of admins and blacklisted on server-side so the whole list can be displayed in the UI.
streamtide-smart-contract/streamtide.sol
Lines 19 to 20 in 5740c35
The text was updated successfully, but these errors were encountered: