SanctionsCompliance
Author: transientlabs.xyz
Abstract contract to comply with U.S. sanctioned addresses
Uses the Chainalysis Sanctions Oracle for checking sanctions
State Variables
oracle
IChainalysisSanctionsOracle public oracle;
Functions
constructor
constructor(address initOracle);
_updateSanctionsOracle
Internal function to change the sanctions oracle
function _updateSanctionsOracle(address newOracle) internal;
Parameters
Name | Type | Description |
---|---|---|
newOracle | address | The new sanctions oracle address |
_isSanctioned
Internal function to check the sanctions oracle for an address
Disable sanction checking by setting the oracle to the zero address
function _isSanctioned(address sender, bool shouldRevertIfSanctioned) internal view returns (bool isSanctioned);
Parameters
Name | Type | Description |
---|---|---|
sender | address | The address that is trying to send money |
shouldRevertIfSanctioned | bool | A flag indicating if the call should revert if the sender is sanctioned. Set to false if wanting to get a result. |
Returns
Name | Type | Description |
---|---|---|
isSanctioned | bool | Boolean indicating if the sender is sanctioned |
Events
SanctionsOracleUpdated
event SanctionsOracleUpdated(address indexed prevOracle, address indexed newOracle);
Errors
SanctionedAddress
Sanctioned address by OFAC
error SanctionedAddress();