code-423n4 / 2022-10-thegraph-findings

0 stars 0 forks source link

QA Report #130

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago
  1. Don’t use statement == true or statement == false in conditions. Use statement or !statement instead. https://github.com/code-423n4/2022-10-thegraph/blob/main/contracts/gateway/L1GraphTokenGateway.sol#L214
  2. The check for contract here can be bypassed with create2/selfdestruct. https://github.com/code-423n4/2022-10-thegraph/blob/main/contracts/gateway/L1GraphTokenGateway.sol#L142
pcarranzav commented 2 years ago
  1. the == true increases readability in this case (imo), because the statement is part of an || statement
  2. This is simply an additional check to prevent human error in an admin interface