credbull / credbull-defi

Credbull main repository. Includes our EVM smart contracts, services and tests.
https://credbull.io/
MIT License
6 stars 1 forks source link

Replace address(0) check errors with condition specific ones. #67

Closed jplodge-pro closed 3 months ago

jplodge-pro commented 3 months ago

Replace all IErrors.ZeroAddress error reversions with one specific to the condition at hand.

Resolves #63

Secondarily

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
credbull-defi-app ❌ Failed (Inspect) Jun 27, 2024 8:04am
Krishnakumarskr commented 3 months ago

Adding the slack conversation here:

ZeroAddress check is a common check that we do across the contracts. Very generic concept in solidity. But, giving an explicit error message for incorrect custodian or asset address will implies that there are some other condition to those addresses other than zero. But, that's not the case, we are just checking for zero address.

Have to discuss whether this change is mandatory or not. Because, if we are doing this, then we need to create a custom error for all address we will be using, like for operator, owner etc... I think a common error message for zero address should work.