Near-One / rainbow-bridge

🌈🌈🌈 NEAR <> Ethereum Decentralized Bridge
GNU General Public License v3.0
327 stars 100 forks source link

feat(contracts-eth): don't allow zero-address initialization in `AdminControlled ` #866

Open ashutoshvarma opened 1 year ago

ashutoshvarma commented 1 year ago

Fix #844

Note: -

Instead of adding a new require(_admin != address(0) (and copying the comment to describe why) I used existing verifyAdminAddress() to reduce redundancy but the existing method name and require error message might not be appropriate. Also, the fact that newAdmin != admin will hit first rather than zero address check.