> For the complete documentation index, see [llms.txt](https://sapphiredao.gitbook.io/sapphiredao-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sapphiredao.gitbook.io/sapphiredao-docs/technical-docs/core-contracts.md).

# Core Contracts

List of core contracts

|                                                         Contracts                                                         |                                                                                                                                                                                                           Description                                                                                                                                                                                                           |                                                             Address                                                             |
| :-----------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------: |
|       [PaymentProcessorStorage.sol](/sapphiredao-docs/technical-docs/core-contracts/paymentprocessorstorage.sol.md)       | It is an ownable smart contract that acts as the persistent state and configuration layer for the payment processing system. It holds the next invoice ID, the fee rate and fee receiver, the WETH address fees are paid in, the authorized addresses, and the system-wide pause. Hold periods are not kept here: `SimplePaymentProcessor` fixes one at deployment and `IntermediatedPaymentProcessor` records one per invoice. | [`0xa5a8d53D9138D17F6C94c56846D50a850aFd14c9`](https://sepolia.basescan.org/address/0xa5a8d53D9138D17F6C94c56846D50a850aFd14c9) |
|        [SimplePaymentProcessor.sol](/sapphiredao-docs/technical-docs/core-contracts/simplepaymentprocessor.sol.md)        |                                                                                                                                            Enables sellers to create invoices, buyers to pay through escrow and funds to be securely released or refunded based on transaction state.                                                                                                                                           | [`0x0741D5d919900c216Db4184e2cA0aaE6f88f21C3`](https://sepolia.basescan.org/address/0x0741D5d919900c216Db4184e2cA0aaE6f88f21C3) |
|             [PaymentAutomation.sol](/sapphiredao-docs/technical-docs/core-contracts/paymentautomation.sol.md)             |                                                                                                                                Keeper adapter that drives SimplePaymentProcessor's due-task queue, exposing both a Chainlink CRE (`onReport`) and a Gelato Web3 Functions (`checker`) entrypoint.                                                                                                                               | [`0x3e2A316C3bc86B9cE91e702985cF7Ea611Db65d2`](https://sepolia.basescan.org/address/0x3e2A316C3bc86B9cE91e702985cF7Ea611Db65d2) |
| [IntermediatedPaymentProcessor.sol](/sapphiredao-docs/technical-docs/core-contracts/intermediatedpaymentprocessor.sol.md) |                                                                                                                                          Manages single and meta-invoices with escrow, dispute resolution, ERC20/native token support and intermediated-platform-controlled operations.                                                                                                                                         | [`0x5ea98074A1779E1242feefB6df54C6c0a4b16423`](https://sepolia.basescan.org/address/0x5ea98074A1779E1242feefB6df54C6c0a4b16423) |
|                        [Escrow.sol](/sapphiredao-docs/technical-docs/core-contracts/escrow.sol.md)                        |                                                                                                                             This contract is an escrow used by a payment processor to securely hold funds for a specific invoice. It supports ETH or token authorized only by the payment processor.                                                                                                                            |                                       Deployed per-invoice via CREATE2 (no fixed address)                                       |
|                 [EscrowFactory.sol](/sapphiredao-docs/technical-docs/core-contracts/escrowfactory.sol.md)                 |                                                                                                                               Abstract factory inherited by a payment processor to deploy Escrow contracts deterministically via CREATE2, so escrow addresses can be predicted before deployment.                                                                                                                               |                                                Abstract, not deployed on its own                                                |
|                         [Notes.sol](/sapphiredao-docs/technical-docs/core-contracts/notes.sol.md)                         |                                                                                                                                                            This contract stores encrypted order notes and tracks per-user opened state for SapphireDao payment flows                                                                                                                                                            | [`0xE818dA06Ceed4Ac6c6d4871a5Fc0226B8032834e`](https://sepolia.basescan.org/address/0xE818dA06Ceed4Ac6c6d4871a5Fc0226B8032834e) |
|                 [OracleManager.sol](/sapphiredao-docs/technical-docs/core-contracts/oraclemanager.sol.md)                 |                                                                                                                         Manages Chainlink price feeds and L2 sequencer uptime checks used by the IntermediatedPaymentProcessor to convert USD invoice prices into the equivalent payment token amounts.                                                                                                                         | [`0x1c8ab79AD43A601F18722E3B9f076fA96AD7Cd11`](https://sepolia.basescan.org/address/0x1c8ab79AD43A601F18722E3B9f076fA96AD7Cd11) |
|                      [MultiSig.sol](/sapphiredao-docs/technical-docs/core-contracts/multisig.sol.md)                      |                                                                                                                       Multisignature governance contract that gates privileged admin calls into the payment processors storage contract behind a propose/approve/execute flow across a defined signer set.                                                                                                                      | [`0x2AEFE8BDd278fCF4b010111d7aDD8ab50d859419`](https://sepolia.basescan.org/address/0x2AEFE8BDd278fCF4b010111d7aDD8ab50d859419) |
|                [MasterDeployer.sol](/sapphiredao-docs/technical-docs/core-contracts/masterdeployer.sol.md)                |                                                   Deploys the full payment processor system (MultiSig, Notes, SimplePaymentProcessor, PaymentAutomation, OracleManager, IntermediatedPaymentProcessor, Sweeper, PaymentProcessorStorage) deterministically via CREATE2, so PaymentProcessorStorage's address is predictable and can authorize both processors at construction.                                                  | [`0x02d56aF449ed28E552F1A8bda0f2e6c14Bb60230`](https://sepolia.basescan.org/address/0x02d56aF449ed28E552F1A8bda0f2e6c14Bb60230) |
|                       [Sweeper.sol](/sapphiredao-docs/technical-docs/core-contracts/sweeper.sol.md)                       |                                                                                                             Collects ERC20 tokens from many approved holders into a single destination in one transaction, gated by the PaymentProcessorStorage owner. Deployed by MasterDeployer alongside the rest of the system.                                                                                                             | [`0x23F53C2422AF06eb1B98f4B78f11F583a2435F5D`](https://sepolia.basescan.org/address/0x23F53C2422AF06eb1B98f4B78f11F583a2435F5D) |

### Privileged Addresses

Beyond the contracts themselves, a few externally-owned wallets hold privileged roles across the system:

|                                                                         Role                                                                         |                                                             Address                                                             |                                                                                                                                           Description                                                                                                                                           |
| :--------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| [Intermediated Platforms Operator](/sapphiredao-docs/technical-docs/core-contracts/paymentprocessorstorage.sol.md#setintermediatedplatformsoperator) | [`0x0f447989b14A3f0bbf08808020Ec1a6DE0b8cbC4`](https://sepolia.basescan.org/address/0x0f447989b14A3f0bbf08808020Ec1a6DE0b8cbC4) |                                                            The wallet the API backend uses to create, release, refund, and manage disputes on `IntermediatedPaymentProcessor` invoices on behalf of authorized third-party platforms.                                                           |
|                       [Fee Signer](/sapphiredao-docs/technical-docs/core-contracts/paymentprocessorstorage.sol.md#setfeesigner)                      | [`0x06124927895eF15c6f436988E47C73a80c220c3b`](https://sepolia.basescan.org/address/0x06124927895eF15c6f436988E47C73a80c220c3b) |                                                 The key whose signature authorizes the per-invoice fee receiver recorded on `acceptPayment`/`payInvoice`; see [Fee Receiver Privacy](/sapphiredao-docs/technical-docs/fee-receiver-privacy.md).                                                 |
|                                                              EIP-7702 Sponsor / Relayer                                                              | [`0x0f447989b14A3f0bbf08808020Ec1a6DE0b8cbC4`](https://sepolia.basescan.org/address/0x0f447989b14A3f0bbf08808020Ec1a6DE0b8cbC4) | Funds and submits the EIP-7702 delegated authorization that lets a stealth fee-receiver address pre-approve [Sweeper.sol](/sapphiredao-docs/technical-docs/core-contracts/sweeper.sol.md) without holding any native gas of its own. Off-chain infrastructure, not a contract-configured value. |
|                 [Emergency Pauser](/sapphiredao-docs/technical-docs/core-contracts/paymentprocessorstorage.sol.md#setemergencypauser)                | [`0x0f447989b14A3f0bbf08808020Ec1a6DE0b8cbC4`](https://sepolia.basescan.org/address/0x0f447989b14A3f0bbf08808020Ec1a6DE0b8cbC4) |                   The single trusted address allowed to trigger a 24-hour [emergency pause](/sapphiredao-docs/how-to-guide/manage-admin-transactions.md#example-emergency-pause) without going through the multisig, for when not enough admins are available to act in time.                   |
