Skip to content

feat: enhance contracts error handling and validation#87

Merged
ISTIFANUS-N merged 8 commits intorinafcode:mainfrom
vestor-dev:error-handling-and-validation
Jan 30, 2026
Merged

feat: enhance contracts error handling and validation#87
ISTIFANUS-N merged 8 commits intorinafcode:mainfrom
vestor-dev:error-handling-and-validation

Conversation

@vestor-dev
Copy link
Contributor

@vestor-dev vestor-dev commented Jan 28, 2026

Title

feat: enhance governance and escrow error handling, add TeachLinkError enum

Description

  • Improved error handling in governance contract by adding specific error messages for various conditions.
  • Introduced GovernanceError enum for better clarity on governance-related errors.
  • Updated escrow contract to utilize TeachLinkError for consistent error handling across the contract.
  • Added validation checks for parameters in both governance and escrow functions to prevent invalid states.
  • Refactored functions to return Result types instead of panicking, improving contract robustness.

Closes #53

…r enum

- Improved error handling in governance contract by adding specific error messages for various conditions.
- Introduced GovernanceError enum for better clarity on governance-related errors.
- Updated escrow contract to utilize TeachLinkError for consistent error handling across the contract.
- Added validation checks for parameters in both governance and escrow functions to prevent invalid states.
- Refactored functions to return Result types instead of panicking, improving contract robustness.
@vestor-dev
Copy link
Contributor Author

@ISTIFANUS-N kindly review :)

@vestor-dev
Copy link
Contributor Author

@ISTIFANUS-N any update on this
pls kindly give me compliment points 🤲

@ISTIFANUS-N
Copy link
Contributor

@vestor-dev please fix the CI, its failing.

martinvibes added 2 commits January 29, 2026 19:54
- Run cargo fmt to fix all formatting issues
- Add clippy allow attributes for pedantic warnings in CI
- Fix unused variables and dead code warnings
- Fix deprecated Events::publish usage in governance
- Add should_panic attribute to test_initialize_with_zero_amounts
- Update CI workflow to allow necessary clippy warnings
- Add .clippy.toml configuration file
… initialize functions

- Renamed MockToken::initialize to MockToken::init_token to avoid symbol conflict
- Updated test files to use the new function name
- This fixes the compilation error in CI where both contracts' initialize symbols were conflicting
@vestor-dev
Copy link
Contributor Author

@ISTIFANUS-N kindly review the contract ci is now passing

@ISTIFANUS-N
Copy link
Contributor

@vestor-dev its still failing and theres conflicts to resolve.
please I am standby.

@ISTIFANUS-N
Copy link
Contributor

@vestor-dev update your branch.

@ISTIFANUS-N
Copy link
Contributor

almost there, run cargo clippy.

@ISTIFANUS-N
Copy link
Contributor

almost there, run cargo clippy.

@vestor-dev

martinvibes added 2 commits January 30, 2026 15:10
@vestor-dev
Copy link
Contributor Author

@ISTIFANUS-N Done
pls kindly give me compliment points 🤲

@ISTIFANUS-N
Copy link
Contributor

you have conflicts to resolve Sir @vestor-dev

@vestor-dev
Copy link
Contributor Author

@ISTIFANUS-N Conflicts Done
Hope there are no more conflicts 😂
pls kindly give me compliment points 🤲

@ISTIFANUS-N ISTIFANUS-N merged commit 749a6ce into rinafcode:main Jan 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement error handling and validation

2 participants