Contract:
0x8BFBAA48cB579600FBDe29aAAf04965C3FDBDac0(Arbitrum Sepolia)
Frontend: https://intent-lp-hook.vercel.app
Chain ID: 421614
- MetaMask (or any WalletConnect wallet)
- ETH on Arbitrum Sepolia — you have ~0.224 ETH (enough for ~20+ txs)
- USDC on Arbitrum Sepolia — you have ~20 USDC (from Circle faucet)
| Action | Gas Cost | Notes |
|---|---|---|
| Swap Simulator (Simulated mode) | Free | No tx needed — uses sample data |
| Swap Simulator (Live mode) | Free | Read-only previewSwap() call |
| Register Intent | ~85,000 gas | 1 tx — ~0.0003 ETH |
| Approve USDC | ~46,000 gas | 1 tx — one-time |
| Deposit USDC | ~60,000 gas | 1 tx — ~0.0002 ETH |
| Claim Rewards | ~50,000 gas | 1 tx — ~0.0002 ETH |
| Set Reward Rate | ~35,000 gas | 1 tx — ~0.0001 ETH |
| Bridge Intent | ~200,000 gas | Heaviest — ~0.0007 ETH |
Full test run costs < 0.002 ETH total. Your 0.224 ETH covers ~100 test cycles.
This is the fastest way to verify the hook logic — zero cost, zero txs.
- Go to https://intent-lp-hook.vercel.app/swap
- Connect your wallet
- Enter a volume and click Simulate
- The app uses sample intent data to preview results
| Volume | Expected Result |
|---|---|
| 0.05 ETH | Violation (below min 0.1) |
| 5 ETH | Compliant (within window) |
| 75 ETH | Violation (above max 50) |
- Click the Live toggle (visible when connected)
- Queries the deployed contract's
previewSwap()directly — free, read-only - If no intents exist yet on-chain, it falls back to sample data
- Open https://intent-lp-hook.vercel.app/register
- Connect your wallet (Arbitrum Sepolia)
- Set conditions:
- Min Swap Volume:
0.1ETH - Max Swap Volume:
50ETH - Max Slippage:
100bps (1%) - Active Hours:
9→17UTC
- Min Swap Volume:
- Review the Intent Preview card
- Click Register Intent → Confirm MetaMask tx (~$0.001)
- ✅ Success screen: "Intent Registered!"
- Check the success green banner
- Navigate to
/bridge— the "Active Intent Found" banner confirms it's stored on-chain - Go back to
/swapand toggle Live — now your real intent is queried
- Go to https://intent-lp-hook.vercel.app/rewards
- View stats: Your USDC balance, Pending Rewards, Reward Pool — all read-only
- Approve USDC (one-time, ~46K gas)
- Deposit some of your 20 USDC into the reward pool
- Set Rate (USDC per second distribution rate)
- Wait a moment for accrual, then Claim your pending USDC
Requires an active intent (step 2) and USDC balance.
- Go to https://intent-lp-hook.vercel.app/bridge
- Confirm the green "Active Intent Found" banner
- Fill the form (use 10 USDC input to conserve balance):
- Input Amount:
10USDC - Output Amount:
9.8USDC - Destination Chain: Arbitrum One (42161)
- Recipient: your address (auto-filled)
- Input Amount:
- Click Bridge Intent → Confirm MetaMask tx
- ✅ "Bridge submitted! Your intent is deactivated on this chain."
- Go back to
/register→ simulate → intent is no longer counted - Go to
/bridge→ shows "No active intent found"
Best way to test everything — uses Foundry's local EVM, zero real gas cost.
forge test --match-path test/IntentLPHook.t.sol -vvvforge test --match-path test/IntentLPHookIntegration.t.sol -vvvmake test-v# Terminal 1: Fork Arbitrum Sepolia
anvil --fork-url $ARBITRUM_SEPOLIA_RPC_URL
# Terminal 2: Deploy to fork
forge script script/Deploy.s.sol \
--rpc-url http://localhost:8545 \
--broadcast \
--private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
# Terminal 3: Frontend on localhost
cd frontend && npm run devThen use http://localhost:5173 with MetaMask on localhost:8545 (chain ID 31337) — all txs are free.
| Step | Method | Gas Cost | Time |
|---|---|---|---|
| 1 | Run make test-v (63 forge tests) |
Zero | 30s |
| 2 | Swap Simulator on live site | Zero | 30s |
| 3 | Register one intent (live) | ~0.0003 ETH | 15s |
| 4 | Live mode swap preview | Zero | 10s |
| 5 | Rewards read-only check | Zero | 10s |
| 6 | Bridge intent (optional) | ~0.0007 ETH | 20s |
- Wallet funded — 0.224 ETH + 20 USDC on Arbitrum Sepolia ✅
- Network added to MetaMask (Arbitrum Sepolia, Chain ID 421614)
- Frontend loaded at https://intent-lp-hook.vercel.app
- Run
make test-v— all 63 tests pass - Swap Simulator — test compliant + violating volumes
- Toggle Live on-chain preview
- Register intent (1 tx, ~0.0003 ETH)
- Live mode confirms intent counted
- Rewards page — view balances (read-only)
- Bridge intent (1 tx, ~0.0007 ETH)
- Verify deactivation after bridge
- Backup plan ready: local anvil fork + local frontend
- Total gas spent: ~0.001 ETH — leaves 0.223 ETH remaining
| Problem | Fix |
|---|---|
| "No contract deployed on this chain" | Switch MetaMask to Arbitrum Sepolia (421614) |
| Transaction keeps pending | Increase gas limit or use a higher max priority fee |
| "No active intent found" | Register an intent first on /register |
| USDC approval fails | Ensure you have enough USDC balance |
| Bridge confirmation shows wrong amounts | Check USDC decimals (6, not 18) |
| Live mode shows zero intents | No one has registered an intent in that pool — switch to sample data |