Documentation

Multi-Vehicle Deployment Guide

This guide walks you through how to deploy a Multi-Vehicle on the Railnet. For additional conceptual background, you can read: 👉 Technical Documentation

You will learn how to:

  • Deploy your External Access Control (Railnet’s RBAC system)
  • Deploy your Multi-Vehicle contract (the managed vault you will operate)
  • Read your Multi-Vehicle onchain data using Railnet GraphQL

Pre-requisites:

  • A wallet with funds: enough of a registered deposit asset (e.g. USDC) to cover the initial deposit the factory requires, and some ETH for gas
  • The FACTORY_SPAWN role on the factory’s access control

Steps:

1
Deploy EAC
2
Deploy Fee Manager
3
Deploy Vehicle
4
Confirm onchain

1. Deploy External Access Control (EAC)

Railnet uses an External Access Control contract to provide Role-Based Access Control (RBAC) across all vehicles you operate. It allows you to define roles and grant them to different addresses.

Railnet requires at least one External Access Control contract before deploying any Multi-Vehicle.

2. Deploy Fee Manager

The Fee Manager contract handles all fee-related operations for your Multi-Vehicle, including performance fees, management fees, deposit fees, and redemption fees. You can configure initial fees, maximum fee caps, and fee recipients.

3. Deploy Multi-Vehicle

Now you can deploy the Multi-Vehicle itself. This will deploy a new multi-vehicle contract, along with its associated engines.

3.1. Approve Token

When deploying a Multi-Vehicle, you must select a single deposit asset (e.g., USDC). The factory makes an initial deposit into the vault on your behalf, to protect against inflation attacks, and pulls it from your wallet during deployment. So you must first approve the Multi-Vehicle Factory to spend that amount on the ERC-20 token contract.

You do not choose the amount. The factory reads it per asset from the on-chain AssetRegistry (getInitialDepositAmount), and the form below fills in the exact figure for the asset you select. Two consequences:

  • Approve at least that amount. Approving less makes deployment revert with InsufficientAllowance.
  • The asset must be registered. An asset the AssetRegistry does not know returns an amount of zero, and deployment reverts with InvalidInitialDepositSize. You cannot deploy against an arbitrary ERC-20.

3.2. Spawn contract from the Multi-Vehicle Factory

4. Fetch Deployed Multi-Vehicle

Once deployed, you can query the Railnet Subgraph to verify your vehicle’s status and configuration.

Fetch Vehicle Details

Query
Variables