-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KYC Sanction Expiration #320
Conversation
… in KintoID contract.
KYC Sanction Expiration
🚨 Report Summary
For more details view the full report in OpenZeppelin Code Inspector |
src/KintoID.sol
Outdated
@@ -343,7 +357,24 @@ contract KintoID is | |||
* @return true if the account has KYC token. | |||
*/ | |||
function isKYC(address _account) external view override returns (bool) { | |||
return balanceOf(_account) > 0 && isSanctionsSafe(_account); | |||
if (balanceOf(_account) == 0) { | |||
// If the account doesn't have a KYC token |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we should just return false in this case, if there is no NFT it should be false
…fying isKYC and isSanctionsSafe logic.
…and update unit test for sanctions check.
Slither reportTHIS CHECKLIST IS NOT COMPLETE. Use |
… test for unconfirmed sanctions handling.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #320 +/- ##
==========================================
- Coverage 90.57% 89.04% -1.53%
==========================================
Files 41 41
Lines 2016 2483 +467
==========================================
+ Hits 1826 2211 +385
- Misses 190 272 +82
|
…logic and improved readability.
… for KintoID contract.
…error handling, and updated function comments for clarity and consistency.
…tests, and add governance role management for KintoID and NioGovernor.
Description
This pull request introduces several enhancements and modifications to the KintoID contract, focusing on governance, sanction management, and role definitions. It also updates the IKintoID interface to reflect these changes.
Implementation Details:
GOVERNANCE_ROLE
to define a governance role within the contract.walletFactory
andfaucet
, which are now public and override existing definitions.walletFactory
address by making it private and adding a notice for its deprecation.sanctionedAt
to track the timestamp of the last sanction applied to each user.revokeKYC
function to set thesanctionedAt
timestamp to the current block timestamp when a KYC is revoked.addSanction
function to update thesanctionedAt
timestamp when a sanction is added.isKYC
function to include logic for checking if an account is sanctions safe and handling the 3-day confirmation period for sanctions.isSanctionsSafe
function to incorporate the 3-day confirmation logic for sanctions and to check if an account is monitored for sanctions.confirmSanction
that allows the governance role to reset the sanction timestamp, making the sanction indefinite.isIndividual
function's return description from "indivdual" to "individual".IKintoID
interface to include the newGOVERNANCE_ROLE
function.Type of change
Checklist:
main
, or there's a description of how to mergeIssue Resolution