On-Chain Adoption Guide
This guide explains how protocols can register their Safe Harbor adoption on-chain. Registering ensures your adoption is public, verifiable, and enforceable.
Why On-Chain Adoption Matters
On-chain registration:
- Makes your Safe Harbor adoption public and transparent.
- Signals to whitehats that your protocol is officially covered under the agreement.
- Publishes your terms (scope, bounty, contacts) on-chain in a way that’s traceable and verifiable, even if updated later.
Three Ways to Adopt On-Chain
Protocols can adopt on-chain using one of three methods:
- Direct adoption via SEAL’s self-adoption tool
- Through a multisig (e.g., Gnosis Safe)
- Foundry script or custom code
Important Note
- The address that registers represents your protocol on-chain.
- Most protocols use multisigs for this step.
1. SEAL Self-Adoption Website (Fastest Method)
- Navigate to the SEAL Self-Adoption Tool (coming soon).
- Fill in your scope details (Asset Recovery Address, Assets Under Scope, Bounty Terms, etc.).
- Choose one of the following:
- Direct adoption using a connected wallet (creates and registers your agreement immediately).
- Generate an Agreement for later registration (useful for multisig or custom workflows).
- Export JSON for use in Foundry scripts.
2. Multisig Adoption (Gnosis Safe)
If your protocol uses a multisig, you can adopt on-chain securely without writing custom code.
Steps:
- Generate your AgreementV2 contract:
- Use the SEAL Self-Adoption Tool to create an agreement contract payload for your scope.
- Deploy the agreement manually via your preferred method (SEAL tool or custom deploy).
- Open your Gnosis Safe and go to the Transaction Builder app.
- Enter the Safe Harbor Registry address:
- Default for most EVM chains:
[0x1eaCD100B0546E433fbf4d773109cAD482c34686](https://etherscan.io/address/0x1eaCD100B0546E433fbf4d773109cAD482c34686)
- Full address list: Registry Addresses.
- Default for most EVM chains:
- Select the method:
adoptSafeHarbor(address agreementAddress)
and input your deployed AgreementV2 contract address. - Add the transaction and simulate it:
- You should see a
SafeHarborAdoption
event with your multisig as theentity
.
- You should see a
- Collect signatures and execute.
3. Foundry Script / Custom Code
If you prefer deploying via code or need custom integrations, you can use SEAL’s Foundry script or write your own.
Using SEAL’s Foundry Script
- Repository: security-alliance/safe-harbor
- Script:
registry-contracts/script/v2/AdoptSafeHarborV2.s.sol
Steps:
- Generate your scope JSON via the SEAL tool or manually prepare it.
- Paste the JSON into:
registry-contracts/agreementDetailsV2.json
- Run the script:
- Deploys the AgreementV2 contract via the factory.
- Registers your adoption in SafeHarborRegistryV2.
- Optional: Modify the script to set a custom
owner
(e.g., your DAO multisig).
Manual Method
- Deploy your agreement directly:
AgreementFactoryV2.create(AgreementDetailsV2 memory details, address registry, address owner)
- Register it:
SafeHarborRegistryV2.adoptSafeHarbor(address agreementAddress)
- Use the deployed Registry & Factory Addresses
Key Contracts
- Agreement Factory: Deploys AgreementV2
- Safe Harbor Registry: Registers adoption
- Deployed Addresses: View Registry & Factory Addresses
If you ever need help or have any questions, don’t hesitate to reach out!
📬 Contact us at: [email protected]