Paraape
Contracts

Deploy

Mocks, protocol, a listed market, an unlisted pool, and the swap router.

Run from apps/contracts-solidity with Foundry. Chain ID is 46630. foundry.toml names the RPC robinhood_testnet.

Deployment addresses

This is the current Paraape deployment on Robinhood Chain testnet. A new DeployParaape replaces it. The factory was created in block 128515333. Transactions are on the testnet explorer.

Vaults call BoundedRiskEngine. The guardian on this factory is 0xC466cA95b3D16D1098bda50aEc65927eCdBD9807.

The factory was constructed against these existing contracts:

Demo markets from that factory:

Do not commit .env. Shell exports override the file. Before a script, unset stale addresses:

unset FACTORY_ADDRESS LOCKER_ADDRESS V4_ROUTER_ADDRESS V4_SWAP_ROUTER_ADDRESS DEMO_MEME_ADDRESS STYLUS_RISK_ENGINE
set -a && source .env && set +a

Leave STYLUS_RISK_ENGINE unset so the Solidity engine is deployed.

1. Mocks

Skip if USDG_ADDRESS and the Chainlink feed are already set.

forge script script/DeployTestnetMocks.s.sol:DeployTestnetMocks \
  --rpc-url robinhood_testnet --broadcast -vv

Paste mockUsdg into USDG_ADDRESS and ethUsdFeed into CHAINLINK_ETH_USD_FEED. Set WETH_USDG_POOL_ID to 32 zero bytes when WETH converts through Chainlink. WETH_ADDRESS and POOL_MANAGER_ADDRESS are required.

2. Protocol

forge script script/DeployParaape.s.sol:DeployParaape \
  --rpc-url robinhood_testnet --broadcast -vv

Save the logs:

LogEnv
riskEnginethe wrapper vaults call
observerPRICE_OBSERVER_ADDRESS for the keeper and indexer
priceSource
lockerLOCKER_ADDRESS
factoryFACTORY_ADDRESS and the indexer's MARKET_FACTORY_ADDRESS
routerV4_ROUTER_ADDRESS (liquidity)
swapRouterV4_SWAP_ROUTER_ADDRESS

Also save the factory creation block as MARKET_FACTORY_START_BLOCK.

A failed explorer verify does not undo the deploy. Retry verify later. Do not redeploy just to get a checkmark.

3. Listed demo market

DeployDemoMarket deploys a meme, adds full-range liquidity (default 1 billion tokens and 10,000 USDG), attests the lock, and calls createMarket.

forge script script/DeployDemoMarket.s.sol:DeployDemoMarket \
  --rpc-url robinhood_testnet --broadcast -vv

Logs meme, poolRef, and vault. The deployer needs at least DEMO_POOL_USDG of USDG. The script mints the LP tokens.

4. Unlisted pool

DeployMemePool does the same liquidity and lock, then stops. The log vault is the zero address. Underwrite opens the market. Default name is FRESH MEME, symbol FRESH. Override with MEME_NAME and MEME_SYMBOL.

forge script script/DeployMemePool.s.sol:DeployMemePool \
  --rpc-url robinhood_testnet --broadcast -vv

5. Swap router

DeployParaape already logs swapRouter. Run DeployV4SwapRouter only when that line is missing. It is not V4_ROUTER_ADDRESS.

Copy the new addresses into the indexer, keeper, demo-swap, and web env files, then restart those processes. Old vaults stay on the old factory.

To move the mock ETH/USD price, for WETH-quoted markets only:

forge script script/SetMockEthUsd.s.sol:SetMockEthUsd \
  --rpc-url robinhood_testnet --broadcast

Transactions are on https://explorer.testnet.chain.robinhood.com.

On this page