> For the complete documentation index, see [llms.txt](https://docs.tropicalwater.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tropicalwater.xyz/architecture/development-quick-start.md).

# Development Quick Start

### Prerequisites

* [Foundry](https://getfoundry.sh/) — `forge`, `cast`, `anvil`
* Solidity `^0.8.24`

### Setup

```bash
git clone <repository-url>
cd opportunity-vault
git submodule update --init --recursive
forge install
forge build
```

### Run Tests

```bash

# All 507 tests
forge test

# Specific suite with verbosity
forge test --match-path "test/OpportunityOVault.broadcast.t.sol" -vvv

# Coverage report
forge coverage --report summary
```

**Test suite: 507 tests across 22 files — 100% pass, \~99% line coverage.**

### Basic Integration Example

```solidity
// 1. Approve vault to spend USDC
IERC20(USDC).approve(vaultAddress, depositAmount);

// 2. Deposit
uint256 shares = vault.deposit(depositAmount, msg.sender);

// 3a. Queue-based redemption (no fee, yield frozen at request)
vault.requestRedemption(shares);
// ... wait lockupPeriod ...
uint256 assets = vault.completeRedemption(receiver);

// 3b. Early redemption (instant, with fee)
(uint256 preview, uint256 fee) = vault.previewRedeemEarly(shares);
uint256 assets = vault.redeemEarly(shares, receiver, preview * 99 / 100); // 1% slippage tolerance

// 4. Bridge shares to another chain (OFT)
SendParam memory params = SendParam({
    dstEid: MONAD_EID,
    to: bytes32(uint256(uint160(receiver))),
    amountLD: shares,
    minAmountLD: shares,
    extraOptions: "",
    composeMsg: "",
    oftCmd: ""
});
MessagingFee memory fee = vault.quoteSend(params, false);
vault.send{value: fee.nativeFee}(params, fee, payable(msg.sender));
```

### Environment Configuration

```bash
cp .env.example .env

# Required for deployment:

# PRIVATE_KEY=<deployer key>

# RPC_ETHEREUM=<RPC URL>

# RPC_MONAD=<RPC URL>
```

### Deployment

```bash

# 2-chain: Ethereum (source) + Monad (destination)
forge script script/DeployEthereumMonad.s.sol --profile deploy --broadcast

# 4-chain: Polygon (source) + Arbitrum + Ethereum + Monad
forge script script/V3PolygonToArbitrumEthereumMonad.s.sol --profile deploy --broadcast
```

***

*Contract: `src/OpportunityOVault.sol` (768 lines, Solidity ^0.8.24) · Audit prep branch: `audit/prep-2026-06` · Commit: `09444edd4ed415a2e2539020028037919f6150af`*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tropicalwater.xyz/architecture/development-quick-start.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
