@cdr-kit/contracts/CdrKitVault
CdrKitVault (factory)
The atomic factory: createVault mints the vault NFT, registers it as a Story IP asset, allocates the CDR slot, configures the read condition, and (optionally) attaches PIL license terms — all in one transaction.
address = 0xac592f165D8dD1f27A087bdB39c0b2f619FF6C8C
createVault signature
function createVault(
address readConditionAddr,
bytes calldata readConfig,
address[] calldata childConditions,
bytes[] calldata childConfigs,
uint256 licenseTermsId
) external payable returns (uint32 uuid, uint256 tokenId, address ipId);Events
Emits VaultCreated(tokenId, uuid, ipId, creator, licenseTermsId) — read the uuid from the tx receipt; never predict it (global counter).
Gas note
The factory nests a CDR precompile call (allocate) whose gas eth_estimateGas underestimates. Always set an explicit gas limit (3_000_000 is the SDK default).