Skip to content
Lattice

ISafeHarborRegistry

Git Source

Title: ISafeHarborRegistry

Authors: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80), Vendored minimal subset of SEAL Safe Harbor's SafeHarborRegistry (https://github.com/security-alliance/safe-harbor).

Minimal vendored interface for the SEAL SafeHarborRegistry (registry v3.0.0), used by SafeHarborAdopter. Adoption is keyed by msg.sender — the adopter is whoever calls adoptSafeHarbor, so a diamond must make the call itself to be recorded as the adopter.

The deployed registry address is chain-specific and supplied by the deployer; never hardcoded.

Functions

adoptSafeHarbor

Records agreementAddress as the agreement adopted by msg.sender.

function adoptSafeHarbor(address agreementAddress) external;

Parameters

NameTypeDescription
agreementAddressaddressThe agreement contract to adopt.

getAgreement

Returns the agreement adopted by adopter (reverts SafeHarborRegistry__NoAgreement if none).

function getAgreement(address adopter) external view returns (address);

Parameters

NameTypeDescription
adopteraddressThe adopter to query.

Returns

NameTypeDescription
<none>addressThe adopted agreement address.

Events

SafeHarborAdoption

Emitted when an adopter records an agreement.

event SafeHarborAdoption(address indexed adopter, address agreementAddress);

Parameters

NameTypeDescription
adopteraddressThe adopting entity (msg.sender).
agreementAddressaddressThe adopted agreement contract.

Errors

SafeHarborRegistry__NoAgreement

Thrown by getAgreement when the queried adopter has no agreement.

error SafeHarborRegistry__NoAgreement();