Mock & Dependency Contracts

Mock and infrastructure contracts deployed on the BattleChain testnet

BattleChain testnet includes mock versions of common mainnet dependencies and real infrastructure contracts so you can deploy your exact production bytecode — only swapping constructor parameters like oracle addresses.

These MockV3Aggregator contracts implement the same interface as Chainlink price feeds. Contracts that consume latestRoundData() or getRoundData() on mainnet can point at these addresses on testnet without code changes.

All feeds use 8 decimals, matching Chainlink's standard for USD pairs.

Deployed Addresses

PairAddress
ETH/USD0xAA72F0168eE17aA93098eC6ECf2EEe72B46aca19
BTC/USD0xd87f56De7Fe8d2913B3B8e45C5fd983185286b66
LINK/USD0xEa8789e4f6a1d101AfF3093543FC8133c27987FD
USDC/USD0x469be0Db9E0E884a2D9E64a186008C684423B79C

Interface

Updating Prices

To set ETH/USD to $2,000:

cast send 0xAA72F0168eE17aA93098eC6ECf2EEe72B46aca19 \
  "updateAnswer(int256)" 200000000000 \
  --rpc-url $BATTLECHAIN_RPC_URL \
  --private-key $PRIVATE_KEY

The value 200000000000 is 2000 * 1e8 (8 decimals).


Test Tokens

Mintable ERC-20 tokens for protocols that need token dependencies (stablecoins, WBTC, LINK, etc.). Anyone can mint — no faucet required.

Deployed Addresses

TokenSymbolDecimalsAddress
Wrapped EtherWETH180x4CAc28Fc96bb8fa0e6F94ef0E579384902142f42
USD CoinUSDC60xb9bEab76Db81BdF8c863f2cA648dA8d3bB5CB1EE
Tether USDUSDT60x0d414B0CCef51a25cd32c93b869A9fF2e883a27E
Dai StablecoinDAI180x393cBd865554a543D992218d190EA9dcE47d9bC2
Wrapped BTCWBTC80xB90cb0F537F2E7D11b165a8C5C79B7a593aBE4f0
Chainlink TokenLINK180xDBCaD9c8f2757f1b7Fe7fC394bEB035018aEA9DC
My TokenMTK180xA55C81615ea60e870d7a4Dff8C662B4C39c56C80

Interface

Minting Tokens

To mint 1,000,000 USDC to yourself:

cast send 0xb9bEab76Db81BdF8c863f2cA648dA8d3bB5CB1EE \
  "mint()" \
  --rpc-url $BATTLECHAIN_RPC_URL \
  --private-key $PRIVATE_KEY

To mint a specific amount to any address:

cast send 0xb9bEab76Db81BdF8c863f2cA648dA8d3bB5CB1EE \
  "mint(address,uint256)" 0xYOUR_ADDRESS 5000000000 \
  --rpc-url $BATTLECHAIN_RPC_URL \
  --private-key $PRIVATE_KEY

The value 5000000000 is 5000 * 1e6 (USDC has 6 decimals).


Mock Venus Protocol

A mock Venus lending protocol deployment with a Comptroller and six vToken markets. Implements the same Compound-style interface (supply, borrow, redeem, repay) so contracts that integrate with Venus on mainnet work on testnet without code changes.

All markets are listed with a 0.75 collateral factor. The mock Comptroller always reports accounts as healthy with 1M liquidity — it does not enforce real collateral checks.

Deployed Addresses

ContractAddress
Comptroller0xAE582334FCf2f932ea1B4D0B484aC34A8184B2e8
vUSDC0x91442C344c069e9B62f068C6F7075E9B403840E0
vWETH0x2A7b8d39e8544517F0Ce0ff4ac895580c79ff692
vWBTC0x9F01733b6B26404495b38fe69f20D5A8252EFd14
vDAI0x7ea22541B90794ADa16E5b42A5FF2bf7489e587c
vBNB0x11e4B3Bbe7Fc26514b8D13383a3FB30E3Ced1F62
vUSDT0x2D9680c4cEfe5E36bFB0B78c48dd1d8A06090e8d

The vToken markets use the test tokens as their underlying assets. vBNB uses native ETH.

Interface

Supplying and Borrowing

To supply 1,000 USDC to vUSDC (approve first, then mint):

cast send 0xb9bEab76Db81BdF8c863f2cA648dA8d3bB5CB1EE \
  "approve(address,uint256)" \
  0x91442C344c069e9B62f068C6F7075E9B403840E0 1000000000 \
  --rpc-url $BATTLECHAIN_RPC_URL \
  --private-key $PRIVATE_KEY

cast send 0x91442C344c069e9B62f068C6F7075E9B403840E0 \
  "mint(uint256)" 1000000000 \
  --rpc-url $BATTLECHAIN_RPC_URL \
  --private-key $PRIVATE_KEY

To supply native ETH to vBNB:

cast send 0x11e4B3Bbe7Fc26514b8D13383a3FB30E3Ced1F62 \
  "mint()" \
  --value 1ether \
  --rpc-url $BATTLECHAIN_RPC_URL \
  --private-key $PRIVATE_KEY

Mock Uniswap V3

A mock Uniswap V3 deployment with the core factory, swap router, and position manager. Contracts that integrate with Uniswap V3 on mainnet can point at these addresses on testnet without code changes.

Deployed Addresses

ContractAddress
UniswapV3Factory0xd5DCFCab1B60C70F45D61597b351674b4b3C8CDc
SwapRouter0x4FC93149e329C15BfF627E967aaA487079D89d2F
NonfungiblePositionManager0x43d314e63223041C61460c9A2F5e597Ff7D1cd30

Use with the test tokens above (WETH, USDC, DAI, etc.) to create pools and test swap logic.


Mock Uniswap V4

A mock Uniswap V4 PoolManager deployment.

Deployed Addresses

ContractAddress
PoolManager0xB4CB4B877FcF85Db498B81EEa8F3A1136797F7

Mock KyberSwap Router

A mock KyberSwap aggregator router with admin-configurable exchange rates. Implements the same swap and swapSimpleMode interface so contracts that integrate with KyberSwap on mainnet work on testnet without code changes.

Simplifications:

  • No actual DEX aggregation or routing
  • Exchange rates are admin-set, not market-driven
  • No multi-hop routing (single pair swaps only)

Deployed Addresses

ContractAddress
MockKyberSwapRouter0x5A8Eec040E6CDD11cf78A154a5485677aEeb4d0b

Interface


Mock Euler V2

A mock Euler V2 deployment with the Ethereum Vault Connector (EVC) and two lending vaults.

Deployed Addresses

ContractAddress
EVC0xB5D56dECA76e65cC9332Af01971bC8ad018a1Fc1
eUSDC Vault0x9a6fb480a74e6BAEE31EAbe297384ceA1EBb4d81
eWETH Vault0x38aF9d1C638C43d4340a700A854721dD5cdCf974

The vaults use the test tokens as their underlying assets (USDC and WETH respectively).


Mock Morpho Blue

A mock Morpho Blue lending protocol deployment. Implements the core supply, borrow, collateral, and liquidation interface so contracts that integrate with Morpho on mainnet work on testnet without code changes.

Simplifications:

  • No interest accrual (rates always zero)
  • No oracle price validation (liquidation is admin-gated)
  • 1:1 share-to-asset ratio (no share price divergence)

Deployed Addresses

ContractAddress
MockMorpho0x102CdAF4B7097752f2Bb336c6cDf39f0aBBbb58c

Markets

Three markets are pre-configured with an 80% liquidation LTV. Markets are identified by their Id (keccak256 of the market parameters).

MarketId
USDC/WETH0x9c975e07b7926e2fc62ff54950968875656e5a416cedeb289bd55e3f83c422a2
USDC/WBTC0x222fa6bbdaa780faeb791457ebe4cbae616e488a622fba3d5d191bd93151a5b8
WETH/WBTC0xf3d5303bd0352a06c05b2c8903aa4f076b87e0d0c9e375487c59205d41e0e647

Market names are formatted as loanToken/collateralToken — e.g., USDC/WETH means borrow USDC against WETH collateral. All markets use the test tokens.

Interface

Supplying and Borrowing

To supply 1,000 USDC to the USDC/WETH market (approve first, then supply):

cast send 0xb9bEab76Db81BdF8c863f2cA648dA8d3bB5CB1EE \
  "approve(address,uint256)" \
  0x102CdAF4B7097752f2Bb336c6cDf39f0aBBbb58c 1000000000 \
  --rpc-url $BATTLECHAIN_RPC_URL \
  --private-key $PRIVATE_KEY

cast send 0x102CdAF4B7097752f2Bb336c6cDf39f0aBBbb58c \
  "supply((address,address,address,address,uint256),uint256,uint256,address,bytes)" \
  "(0xb9bEab76Db81BdF8c863f2cA648dA8d3bB5CB1EE,0x4CAc28Fc96bb8fa0e6F94ef0E579384902142f42,0x0000000000000000000000000000000000000001,0x0000000000000000000000000000000000000002,800000000000000000)" \
  1000000000 0 $YOUR_ADDRESS 0x \
  --rpc-url $BATTLECHAIN_RPC_URL \
  --private-key $PRIVATE_KEY

The value 1000000000 is 1000 * 1e6 (USDC has 6 decimals).


A mock Chainlink CCIP router for testing cross-chain messaging and token transfers.

Deployed Addresses

ContractAddress
MockCCIPRouter0xFA553888e385ECd9ab294e295C206b912a0F402E

Mock Teleporter Messenger

A mock Avalanche Teleporter messenger for BattleChain cross-chain dispatch and explicit delivery flows. Implements the full ITeleporterMessenger interface so contracts that use Teleporter on Avalanche mainnet work on BattleChain without code changes.

Sent messages are queued as pending and can be delivered to the destination contract via deliverMessage(), which calls receiveTeleporterMessage on the target. This lets you simulate the full send → deliver lifecycle without Avalanche Warp Messaging.

Limitations:

  • No Avalanche Warp Messaging or canonical Teleporter verification — delivery must be triggered explicitly through the mock's deliverMessage helpers
  • receiveCrossChainMessage is admin-only (no Warp precompile on BattleChain)
  • Fee collection accepts tokens but does not route to relayers automatically

Deployed Addresses

ContractAddress
MockTeleporterMessenger0x6f3C17caA459F8012669f24D294AF72c2F8d9CBF

Interface

Sending a Cross-Chain Message

# 1. Send a message (queues it as pending)
cast send 0x6f3C17caA459F8012669f24D294AF72c2F8d9CBF \
  "sendCrossChainMessage((bytes32,address,address,(address,uint256),uint256,address[],bytes))" \
  "(0x0000000000000000000000000000000000000000000000000000000000000001,0xYOUR_DESTINATION_ADDRESS,0xYOUR_DESTINATION_ADDRESS,(0x0000000000000000000000000000000000000000,0),200000,\[\],0x1234)" \
  --rpc-url $BATTLECHAIN_RPC_URL \
  --private-key $PRIVATE_KEY

Delivering a Message

Once a message has been sent, deliver it to the destination contract. This calls receiveTeleporterMessage on the destination address.

The sourceBlockchainID parameter must match what the receiving contract expects as the source chain — this is protocol-specific and may be a keccak256 hash rather than the raw chain ID.

# 2. Deliver the pending message (use the messageID returned from step 1)
cast send 0x6f3C17caA459F8012669f24D294AF72c2F8d9CBF \
  "deliverMessage(bytes32,bytes32)" \
  <MESSAGE_ID> \
  <SOURCE_BLOCKCHAIN_ID> \
  --rpc-url $BATTLECHAIN_RPC_URL \
  --private-key $PRIVATE_KEY

You can inspect the pending queue at any time:

# View all pending message IDs
cast call 0x6f3C17caA459F8012669f24D294AF72c2F8d9CBF \
  "pendingQueue()(bytes32[])" \
  --rpc-url $BATTLECHAIN_RPC_URL

Safe (Gnosis Safe)

The full Safe smart account infrastructure is deployed on BattleChain testnet. These are real Safe contracts (not mocks) — protocols that use Safe multisigs for governance, treasury, or access control can use the same addresses and deployment patterns as on mainnet.

Deployed Addresses

ContractAddress
Safe0x52AbFB25E19C3625178D885D5C75EFB9a99203EB
SafeL20x71314F3E6B1D9386A1de784B644Cf5D0Dde3bB97
SafeProxyFactory0x80DbD037C59521F393fDfE15504c6b6b7969F1a1
CreateCall0x670D1c4c5cc72193b352562Ed75B9ae8224E98b3
MultiSend0x69BEaBc6824ba1461F53800d9C3F29FFeC7cf408
MultiSendCallOnly0xa6a3C9103C062429e459D263bF5EcCd31Effd56C
SignMessageLib0x930833004d88b8bF3208a216323aFfdf9D40C14C
SafeToL2Setup0xeCd943c75D2344Fb0AC29D781EFE602E7d87f82B
TokenCallbackHandler0x232898253fABB3a1EB585bdEE4bE2a36f6D6fd64
CompatibilityFallbackHandler0xc6B2C6982A5643b7702894D4A0901b9371dd1283
ExtensibleFallbackHandler0x745c41Ae7AC9C23f173B45f5B47E692dC57c2ae2