Example Integration
Scenario: dApp requires:
KYC ≤ 6 months old.
Must match latest sanctions epoch.
EU residents only.
bytes32 constant POLICY_EU = keccak256("POOL.KYC2.EU");
bytes memory rule = abi.encode(
POLICY_EU,
userEASUID[msg.sender],
bytes32(0), // expected epoch root (latest)
180 days // max KYC age
);
(bool ok, uint32 reason) = policyEngine.isEligible(msg.sender, rule);
require(ok, _reason(reason));
Last updated
Was this helpful?