Skip to main content

cnft.createContract(CreateContract)

Create a Contract NFT draft by initializing the contract with counterparties and content, and paying the setup fee (ERC20). This sends a transaction from the contract controller. The contract controller must have an ONCHAINID identity with a valid KYC claim and hold at least the setup fee (1 PEAQ), or the call reverts with NoIdentityFound, UserNotKyxd, or Insufficient balance. Counterparties also need a valid KYC claim before they can sign.

CreateContract Type Parameters

Returns

Usage

TypeScript

JavaScript

Example outputs

The contract ID is deterministic: it is the keccak256 hash of the initiator, counterparties, content hash, and URL.