Vault Factory

This reference is only needed for tax token + vault launches (VaultPortal.newTokenV6WithVault).

Step 1 β€” Choose a vault factory

Determine the vault factory address to use. For official factories the vaultData encoding is known (see table below) and Step 2 can be skipped. For any other factory, proceed to Step 2 to read the schema on-chain.

Official vault factories (BNB mainnet)

Name
Factory address
vaultData summary

SplitVault

0xfab75Dc774cB9B38b91749B8833360B46a52345F

ABI-encode Recipient[] β€” up to 10 {address, bps} entries summing to 10 000

Gift Vault (FlapXVault)

0x025549F52B03cF36f9e1a337c02d3AA7Af66ab32

ABI-encode {string xHandle} β€” lowercase X (Twitter) handle of the fee manager

Any vault factory address is accepted β€” unregistered or unverified factories can be used, but the resulting vault will be marked unverified in the UI.

Step 2 β€” Read the factory's vaultData schema

Call vaultDataSchema() on the factory contract to determine what fields are required and how vaultData must be encoded.

vaultDataSchema() returns a VaultDataSchema struct (from IVaultSchemasV1.sol):

struct VaultDataSchema {
    string description;       // describes what the vault does and what data it expects
    FieldDescriptor[] fields; // ordered list of fields β€” one entry per value to encode
    bool isArray;             // true β†’ vaultData is abi.encode(tuple[]), false β†’ abi.encode(tuple)
}

struct FieldDescriptor {
    string name;         // machine-readable field name
    string fieldType;    // ABI type string: "string", "address", "uint16", "uint256", "bool", "bytes", "bytes32", "time"
    string description;  // human-readable label/tooltip
    uint8  decimals;     // if > 0, multiply numeric value by 10^decimals before encoding
}

Resolve a value for each entry in schema.fields, applying decimals scaling to any numeric field, then proceed to Step 3.

Step 3 β€” Encode vaultData

SplitVault example

Gift Vault (FlapXVault) example

Store the hex-encoded vaultData bytes β€” they go directly into the NewTokenV6WithVaultParams.vaultData field.

Last updated