Deploy the token contract for an asset

Deploys the asset's token contract and registers it in one call.

Deployment lifecycle

The deployment is an asynchronous operation of type DEPLOY, readable at GET /api/transactions/{transactionId}; the contract is registered PENDING immediately, already holding the proxy address it will confirm at, and becomes ACTIVE when the deployment confirms on chain.

Token precision

decimals is not a field: every deployed token has 18, and the registry records that constant itself.

Existing contracts and retries

A deploy for an asset whose contract is PENDING, ACTIVE or INACTIVE is refused 400 — an existing contract is never overwritten. A FAILED deployment leaves the asset free to deploy again. assetId is case-insensitive.

Idempotency

An Idempotency-Key is required. Replaying a key returns 200 with the operation as it now stands, like POST /api/transactions and unlike the byte-for-byte replay of the customer and account registries.

Registration changes

This operation replaced registration. Hand-deployed contracts can no longer be registered over this API; the deployment is the API's own act and registration is its side effect.

Body Params

The organisation is taken from the access token. A tenantId sent in the body is ignored. There is no decimals field: every deployed token has 18, and the registry records that constant itself, so the conversion between an amount and base units can no longer be mis-registered.

string
required
length ≤ 16

Asset code the contract is deployed for. Case-insensitive.

string
required
length ≤ 64

The token's on-chain name, passed to the contract unread.

string
required
length ≤ 16

The token's on-chain symbol, passed to the contract unread.

string
required
0x[0-9a-fA-F]{40}

The address granted every role on the new token, including the one that authorises upgrades. Supply the address whose key will actually operate the organisation's token: an admin nobody controls is a token nobody can ever mint on, and the value is passed through unread.

Headers
string
required
^\d+\.\d+\.\d+$

The version of the Quant Flow API the request follows, as major.minor.patch (for example 1.0.0). The request is interpreted, and the response shaped, according to that version.

string
required
length ≤ 255

Caller-supplied key making the write at-most-once. Replay semantics are endpoint-specific: customer and account registry writes replay the original response and reject a changed payload with 422; transaction and deployment submissions return the current operation with 200 and ignore a changed payload. See the operation's response documentation. Use one key per intent. Missing, blank or longer than 255 characters is a 400.

Responses

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json