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
refactor: Replace assert with if + revert using custom errors
- Replaced all `assert` statements with `if` checks followed by `revert` and custom errors from `Errors.sol`
- Implemented specific custom errors:
- `InvalidArrayLength(uint256 expected, uint256 actual)`
- `InvalidBooleanType()`
- `ExpectedMajorByteString()`
- `ExpectedNegativeBigNumTag()`
- `ExpectedLowValue27()`
- Ensured proper import of `Errors.sol` across relevant CBOR modules
- Preserved original indentation and code formatting for readability
- Improves error handling consistency and prevents `Panic` exceptions
This change aligns with Solidity best practices by using custom errors for more efficient and descriptive error handling.
/// @title This library is a set of functions meant to handle CBOR parameters serialization and return values deserialization for Account actor exported methods.
/// @title This library is a set of functions meant to handle CBOR parameters serialization and return values deserialization for Miner actor exported methods.
0 commit comments