scout icon indicating copy to clipboard operation
scout copied to clipboard

`Zero-or-test-address` upgrades

Open faculerena opened this issue 2 years ago • 1 comments

  • Check if the address passed is using in mapping.get(). This is not a problem
  • Check if 0x...0 is hardcoded.
  • Following the last point, we can check for all addresses with known public key (as Alice, Bob...)

Discussion question:

  • OpenBrush has a AccountIdExt that thas the is_zero() method. Should we support this as a check?
  • Emit Events have any issue using a 0 address? Or we can make the emit_event() whitelisted?

Check if the detection is done in an #[ink(message)]. The detector could not trigger in private functions, as the check should be done in the public one.

faculerena avatar Aug 07 '23 18:08 faculerena

Following #130 and M3 issues.

faculerena avatar Aug 07 '23 18:08 faculerena