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

# Integration quickstart

Prepare and simulate a vault transaction using verified contracts and current state.

To prepare a vault transaction, first verify the contracts, check the amount the user can transact, and simulate the exact call. After submission, use the receipt and vault events to confirm the result.

## 1. Select the network and verified deployment

Start by verifying where the transaction will run.

Use HyperEVM chain ID `999` and the production addresses in [Contract addresses](/build/contract-addresses.md). Cross-check the official production application and current implementation before signing. Staging also uses chain `999`, so select the deployment environment explicitly; chain ID alone cannot distinguish the two.

## 2. Load matching interfaces

Use interfaces that match the deployed contracts so the client encodes and decodes calls correctly.

Use the published ABIs for the exact deployment generation. At minimum, load the vault share token, VaultLens, CircuitBreaker, and USDC interfaces.

## 3. Read state and capacity

Check the vault and user state before offering a transaction.

Read the vault asset, live config, state snapshot, NAV, share supply, user balance, and the relevant Lens and CircuitBreaker capacity.

Choose the direct vault or router path before quoting capacity and allowance. Direct deposits/mints attribute policy to the receiver; native router deposits/mints use the caller. Exits attribute to the share owner. Check confirmed Standard account mode before treating zero capacity as an economic limit.

## 4. Preview and simulate

Estimate the result, then test the exact call with the intended account and receiver.

For deposits, compare requested USDC with both Lens and route capacity, calculate expected shares, verify allowance, then simulate the supported route call. For redemptions, compare shares with both capacity reads, preview assets, verify share authorization, and simulate. Use `previewMint` for exact shares and `previewWithdraw` for exact net assets. Account-agnostic previews use configured fees; simulate the selected account to reflect fee exemptions. Direct USDC allowance goes to the vault, router allowance to CircuitBreaker. Direct exit by the owner needs no allowance; an operator needs the owner's share allowance.

## 5. Request a wallet signature

Show the user what they are authorizing before opening the wallet.

Present chain, verified contract, function, assets or shares, receiver, expected result, fee treatment, and simulation status. Never request a signature when a required read is stale, incompatible, or unavailable.

## 6. Confirm and index

Submission is not completion. Wait for the receipt and confirm the expected vault events.

Use the successful receipt and vault events as settlement evidence. Router calls also emit routed events; direct calls do not. Deduplicate standard ERC-4626 and Ensemble events for the same operation. Indexed history may lag and should preserve block, transaction hash, and log index.

## Related guides

Use the following guides for contract roles, grouped reads, and transaction policy.

Read [Contract architecture](/build/contract-architecture.md), [VaultLens](/build/vaultlens.md), and [CircuitBreaker integration](/build/circuitbreaker-integration.md).
