> For the complete documentation index, see [llms.txt](https://noiho.gitbook.io/noiho/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://noiho.gitbook.io/noiho/developers/frontend-builders/integration-setup.md).

# Integration setup

What to load and what to check before your first write.

1. Load the merged BridgeDiamond ABI and address from the published deployment manifest.
2. Load the separate XMRn ERC-20/OFT ABI for approvals and balances.
3. Before writes, verify chainId, paused() == false, storageVersion() == 2, and that configured addresses are nonzero.
4. Use uint256 base units: XMR and XMRn have 12 decimals, native HYPE has 18, and percentage toll is basis points.
5. Simulate each write, submit it, wait for a successful receipt, then re-read the order. Submission is not confirmation.
6. Index lifecycle events, but reconcile against getOrder — events signal transitions, not the full order tuple.

```ts
const diamond = getContract({
  address: bridgeDiamondAddress,
  abi: bridgeDiamondAbi,
  client: { public: publicClient, wallet: walletClient },
})

const [paused, version] = await Promise.all([
  diamond.read.paused(),
  diamond.read.storageVersion(),
])
if (paused || version !== 2n) throw new Error("Diamond is not ready")
```
