Skip to content

Commit

Permalink
Merge 8f9c7cf into 0287a01
Browse files Browse the repository at this point in the history
  • Loading branch information
ylv-io authored Feb 5, 2025
2 parents 0287a01 + 8f9c7cf commit 4b3adc3
Show file tree
Hide file tree
Showing 7 changed files with 199 additions and 50 deletions.
148 changes: 148 additions & 0 deletions broadcast/135-upgrade_faucet_id.s.sol/7887/run-1738769861.json

Large diffs are not rendered by default.

84 changes: 42 additions & 42 deletions broadcast/135-upgrade_faucet_id.s.sol/7887/run-latest.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions script/migrations/135-upgrade_faucet_id.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ contract UpgradeKintoIDScript is MigrationHelper {
abi.encode(_getChainDeployment("KintoWalletFactory"), _getChainDeployment("Faucet"))
);

address impl = _deployImplementationAndUpgrade("KintoID", "V10", bytecode);
saveContractAddress("KintoIDV10-impl", impl);
address impl = _deployImplementationAndUpgrade("KintoID", "V11", bytecode);
saveContractAddress("KintoIDV11-impl", impl);

KintoID kintoID = KintoID(_getChainDeployment("KintoID"));
address nioGovernor = _getChainDeployment("NioGovernor");
Expand Down
6 changes: 3 additions & 3 deletions src/KintoID.sol
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ contract KintoID is
* @param _days Number of days to consider for monitoring freshness
* @return bool True if sanctions were monitored within the specified period
*/
function isSanctionsMonitored(uint32 _days) public view virtual override returns (bool) {
function isSanctionsMonitored(uint256 _days) public view virtual override returns (bool) {
return block.timestamp - lastMonitoredAt < _days * (1 days);
}

Expand All @@ -467,7 +467,7 @@ contract KintoID is
*/
function isSanctionsSafe(address _account) public view virtual override returns (bool) {
// If the sanction is not confirmed within SANCTION_EXPIRY_PERIOD, consider the account sanctions safe
return isSanctionsMonitored(7)
return isSanctionsMonitored(EXIT_WINDOW_PERIOD)
&& (
_kycmetas[_account].sanctionsCount == 0
|| (sanctionedAt[_account] != 0 && (block.timestamp - sanctionedAt[_account]) > SANCTION_EXPIRY_PERIOD)
Expand All @@ -483,7 +483,7 @@ contract KintoID is
*/
function isSanctionsSafeIn(address _account, uint16 _countryId) external view virtual override returns (bool) {
// If the sanction is not confirmed within SANCTION_EXPIRY_PERIOD, consider the account sanctions safe
return isSanctionsMonitored(7)
return isSanctionsMonitored(EXIT_WINDOW_PERIOD)
&& (
!_kycmetas[_account].sanctions.get(_countryId)
|| (sanctionedAt[_account] != 0 && (block.timestamp - sanctionedAt[_account]) > SANCTION_EXPIRY_PERIOD)
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/IKintoID.sol
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ interface IKintoID {

function isKYC(address _account) external view returns (bool);

function isSanctionsMonitored(uint32 _days) external view returns (bool);
function isSanctionsMonitored(uint256 _days) external view returns (bool);

function isSanctionsSafe(address _account) external view returns (bool);

Expand Down
3 changes: 2 additions & 1 deletion test/artifacts/7887/addresses.json
Original file line number Diff line number Diff line change
Expand Up @@ -263,5 +263,6 @@
"CRV-impl": "0x0635494DF1e6643eEC19C4eA113b3F242519ee4E",
"CRV": "0xC90000A619e56D12B9da6858509BA497B64e77eC",
"BridgerL2V12-impl": "0xB0AC6E846079FA2A984298C056F304070EA24e31",
"BridgerL2V13-impl": "0xfcdF95304e95aFb40d14300d39c258dB45194734"
"BridgerL2V13-impl": "0xfcdF95304e95aFb40d14300d39c258dB45194734",
"KintoIDV11-impl": "0x4aC06254558e144C41461a319822993900cE2eE4"
}
2 changes: 1 addition & 1 deletion test/harness/KintoIdHarness.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {KintoID} from "@kinto-core/KintoID.sol";
contract KintoIdHarness is KintoID {
constructor(address _walletFactory, address _faucet) KintoID(_walletFactory, _faucet) {}

function isSanctionsMonitored(uint32) public view virtual override returns (bool) {
function isSanctionsMonitored(uint256) public view virtual override returns (bool) {
return true;
}
}

0 comments on commit 4b3adc3

Please sign in to comment.