> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keystoneos.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Testnet Addresses

> Deployed contract addresses on testnets.

## v2 contract set - Ethereum Sepolia + Base Sepolia

The current-generation stack ([KeystoneSettlement](/smart-contracts/keystone-settlement), [KeystoneRouter](/smart-contracts/keystone-router), [ComplianceRegistry](/smart-contracts/compliance-registry) with an immutable 2-of-3 attester set) is deployed on **both** Ethereum Sepolia (chain ID 11155111) and Base Sepolia (chain ID 84532), deployed 2026-07-05.

<Note>
  The three addresses are byte-identical on both chains (fresh deployer, CREATE nonce symmetry). Always disambiguate by chain ID, never by address. Contract source is not verified on the block explorers; ABIs come from the contracts repository.
</Note>

| Contract                                   | Address (identical on both chains)           |
| ------------------------------------------ | -------------------------------------------- |
| ComplianceRegistry (2-of-3, immutable set) | `0x5afd350423E1D2fEba78CBa23a8f246227acbDF0` |
| KeystoneSettlement                         | `0x4D228fbD9E0Ff199D0Eab55312FEb54014F1eaEb` |
| KeystoneRouter                             | `0x06F0d3687b4DFC261eF36422E1E5E71e87A24D77` |

Explorers: [Etherscan (Sepolia)](https://sepolia.etherscan.io) and [BaseScan (Base Sepolia)](https://sepolia.basescan.org).

### LayerZero configuration

| Parameter                           | Value                                        |
| ----------------------------------- | -------------------------------------------- |
| LayerZero V2 endpoint (both chains) | `0x6EDCE65403992e310A62460808c4b910D972f10f` |
| Ethereum Sepolia EID                | `40161`                                      |
| Base Sepolia EID                    | `40245`                                      |
| Compliance threshold                | 2-of-3 (immutable)                           |
| `minDecisionWindow`                 | 3600 seconds                                 |
| `releaseMargin`                     | 900 seconds                                  |

Router peers are wired in both directions with enforced options for the `CONFIRMED`, `RELEASE`, and `ABORT` message types (200k `lzReceive` gas). A single-network and a cross-network DvP reference settlement have been executed against this deployment.

### v2 test tokens

| Token               | Symbol  | Chain            | Address                                      |
| ------------------- | ------- | ---------------- | -------------------------------------------- |
| KeyStone Test USD   | tKUSD   | Ethereum Sepolia | `0xD6da619850D1E19bc2125635Cd64Db80E0AF2e61` |
| KeyStone Test Asset | tKASSET | Base Sepolia     | `0xD6da619850D1E19bc2125635Cd64Db80E0AF2e61` |

(The same nonce symmetry gives both tokens the same address on their respective chains.)

## Previous generation (serving hosted testnet demos)

The hosted testnet environment still runs the previous-generation contracts below until the cut-over to the v2 set completes. These implement the retired SettlementCoordinator + KeystoneEscrow design.

### Ethereum Sepolia (v0.3.x)

| Contract                               | Address                                      | Etherscan                                                                               |
| -------------------------------------- | -------------------------------------------- | --------------------------------------------------------------------------------------- |
| KeystoneEscrow (retired design)        | `0xCe8c42CeB17c172acfa34f2c0fF990DC21bF4DC5` | [View](https://sepolia.etherscan.io/address/0xCe8c42CeB17c172acfa34f2c0fF990DC21bF4DC5) |
| SettlementCoordinator (retired design) | `0xB23c099919b2702697fC75C908e1c0D196Dc8958` | [View](https://sepolia.etherscan.io/address/0xB23c099919b2702697fC75C908e1c0D196Dc8958) |
| ComplianceRegistry (pre-M-of-N)        | `0xad8d42bc87c3ACA221ab02723CFB7c632B40B30a` | [View](https://sepolia.etherscan.io/address/0xad8d42bc87c3ACA221ab02723CFB7c632B40B30a) |

| Token              | Symbol | Decimals | Address                                      | Etherscan                                                                               |
| ------------------ | ------ | -------- | -------------------------------------------- | --------------------------------------------------------------------------------------- |
| KeyStone Test Bond | KBOND  | 18       | `0x75bc5a45994046C91197932581aF4a1Acd1Bf347` | [View](https://sepolia.etherscan.io/address/0x75bc5a45994046C91197932581aF4a1Acd1Bf347) |
| Test USDC          | TUSDC  | 6        | `0x423dF8546920Ba9F6Eca8f60B4CF6a43aBCA3252` | [View](https://sepolia.etherscan.io/address/0x423dF8546920Ba9F6Eca8f60B4CF6a43aBCA3252) |

### Base Sepolia (v0.3.x)

| Contract                                          | Address                                      | BaseScan                                                                                |
| ------------------------------------------------- | -------------------------------------------- | --------------------------------------------------------------------------------------- |
| KeystoneEscrow (retired design, cross-chain mode) | `0x7ded23f295cdf62758e15733c683ef08825b6d9f` | [View](https://sepolia.basescan.org/address/0x7ded23f295cdf62758e15733c683ef08825b6d9f) |

| Token     | Symbol | Decimals | Address                                      | BaseScan                                                                                |
| --------- | ------ | -------- | -------------------------------------------- | --------------------------------------------------------------------------------------- |
| Test USDC | TUSDC  | 6        | `0xd8a70E5789d6DE8e4B9A991974bF591bB9712324` | [View](https://sepolia.basescan.org/address/0xd8a70E5789d6DE8e4B9A991974bF591bB9712324) |

The full deployment history, including earlier retired deployments and demo-specific sets, lives in the [keystone-smart-contracts](https://github.com/KeyStone-OS/keystone-smart-contracts) repository (`testnet-addresses.md`).

## Contract descriptions

### KeystoneSettlement

Single contract owning escrow and the fixed settlement lifecycle: registration with bound recipients, wallet-bound commitment-key deposits, autonomous compliance-gated execution (single-chain) or a router-driven Prepared phase (cross-chain), operator abort, depositor-claimable timeout, and per-leg pull refunds. See [KeystoneSettlement](/smart-contracts/keystone-settlement).

### KeystoneRouter

Per-chain LayerZero V2 coordinator for cross-chain settlements. Collects funding confirmations from every participating chain and relays a single release-or-abort decision to each chain's KeystoneSettlement. See [KeystoneRouter](/smart-contracts/keystone-router).

### ComplianceRegistry

On-chain attestation of compliance screening results, authorized by an immutable M-of-N attester set (EIP-712 signatures). Stores hashed identifiers and Pass status only - no PII on-chain. Serves as the execution gate the KeystoneSettlement contract consults. See [ComplianceRegistry](/smart-contracts/compliance-registry).

### Test tokens

* **tKUSD / TUSDC** represent stablecoin payment legs (mintable ERC-20)
* **tKASSET / KBOND** represent tokenised assets and repo collateral (mintable ERC-20)

In production, settlements use real tokenized securities and stablecoins.

## Integration

To interact with these contracts directly, you need:

1. The contract ABI (available in the [keystone-smart-contracts](https://github.com/KeyStone-OS/keystone-smart-contracts) repository)
2. An EVM-compatible wallet library (ethers.js, web3.py, viem, etc.)
3. Testnet ETH for gas (available from [Sepolia faucets](https://sepoliafaucet.com) and the [Base Sepolia faucet](https://www.alchemy.com/faucets/base-sepolia))

See [KeystoneSettlement](/smart-contracts/keystone-settlement) for the commitment-based deposit flow.
