Skip to main content
Brickken uses Protocol V2 for new tokenizations on networks with a V2 factory. Operations on an existing token use the protocol version of that token. The same POST /prepare-transactions endpoint and sign-and-send flow apply to both versions.

Which version a token uses

  • New tokens are V2. newTokenization creates a V2 token on every network where Protocol V2 is active. You do not choose: there is no version field to send, and Brickken picks the factory for the requested network.
  • Existing tokens keep their version. A token created on Protocol V1 stays on V1, and its operations keep following the V1 flow. Every later call branches on the token’s own version, so you never send a version either.
  • Networks are enabled one by one. In Sandbox, Ethereum Sepolia runs Protocol V2. Check get-network-info for any other network: universalEscrowAddress and paymentHandlerAddress are set where Protocol V2 is active and null where it is not. A network with no tokenization factory answers newTokenization with Tokenization is not available on the requested chain.
V2 ERC-7943 contracts check sender and recipient whitelists on chain. Privileged actions require an on-chain role on the signing wallet. Stablecoins use an ERC-20 contract. Send tokenType: "FUND" to create a fund. The asset keeps FUND as its business type and the factory uses contract type 4 (STO7943). REVENUE_SHARE, numeric contract types, and unknown business types return 400 on V2 newTokenization.

Every prepare is simulated

Before returning unsigned transactions, the API simulates them against the chain. A transaction that would revert is rejected at prepare time with the decoded reason, for example v2Tokenization simulation failed: <reason>, instead of failing after you sign and pay gas.

Method by method

newTokenization

newTokenization keeps its fields, with these differences on V2:
  • transactions in the response is a single transaction object, not an array.
  • info carries factoryAddress, plus feeToken and feeAmount: the token-creation fee, paid by the signer. The signer needs an allowance to factoryAddress for at least feeAmount of feeToken before you send, or the simulation fails.
  • preMints and initialHolders are rejected. Create the token first, then mintToken to the holders.
  • initialTokenSupply and shareholders are ignored: a V2 token starts with zero supply.
  • DEBT and BILL_FACTORING require a positive supplyCap and an explicit debtInterestRate. Enter the rate as a percentage from 0 to 100, with up to two decimal places. Zero is valid.

whitelist

A V2 whitelist is one multicall on the token that enables both sending and receiving for each address. The signer needs the token’s WHITELIST_ROLE, otherwise the prepare fails with Signer <address> does not have WHITELIST_ROLE on token <address>. get-whitelist-status reports an address as whitelisted only when it can both send and receive.

mintToken

Mints are grouped in one multicall on the token. When some recipients still need whitelisting, the response holds two transactions, the whitelist first and the mint second. Sign and send them in order.

approve, transferFrom, transferTo

Unchanged: standard ERC-20 calldata. The token still enforces its whitelists when the transfer executes.

burnToken

Burning a V2 token through the API is not available yet. A V2 token only lets a wallet that holds BURNER_ROLE burn, and issuer wallets do not hold that role, so burnToken on a V2 token answers 403 V2 burnToken requires BURNER_ROLE on the signer wallet before estimating any gas. V1 tokens are not affected.

newSto

newSto validates the offering terms before preparing a transaction. Publish both the Subscription Agreement and the By-laws. New start dates require five minutes of lead time, and offerings can last up to one year. See the V2 offering rules for cap, ticket, price, and supply validation. An offering can require several calls while Brickken configures the token and the Universal Escrow.
  • When nextAction is "wait-and-retry", including 202 responses, wait and repeat newSto with the same body. Any returned transaction ID refers to a transaction already tracked by Brickken.
  • If the response calls for signing, sign and send the returned transaction. After a confirmed tokenSetup, repeat newSto with the same body. The issuance transaction creates the offering.
  • If the offering terms change, the API can replace an unsigned issuance prepared with older terms. An issuance already broadcast must settle first.
  • A failed fee configuration returns 409. Contact Brickken if it fails.

newInvest

On V2 the investor buys from the network’s UniversalEscrow:
  • The investor must approve the payment token to the escrow first. Without that allowance the prepare fails with Insufficient payment token allowance. Prepare and confirm the approval before investing.
  • The minimum ticket applies, except when the amount left in the offering is smaller than it.
  • An investment larger than what is left is accepted, and the escrow takes only the remaining amount.

closeOffer

Finalizes the issuance on the escrow and withdraws the raised funds to the signer. An offering that is already closed answers 409 Cannot finalize issuance: IssuanceNotActive. If you already sent a close transaction, track its hash instead of preparing a new one.

claimTokens

One claim per investor, prepared and sent like any other transaction.

dividendDistribution

dividendDistribution on V2 supports STO7943 assets, including FUND. The signer needs the payment distributor role for the asset. Approve the payment token to the network’s paymentHandlerAddress from get-network-info before preparing the distribution.

Debt and Bill Factoring repayments

V2 DEBT and BILL_FACTORING assets use the same DTO7943 repayment flow. In the Brickken dashboard, Send Dividends prepares capital and interest repayments and shows confirmed repayments in the asset’s repayment history. Repayments use the payment token from the first confirmed offering. Keep that payment token for subsequent offerings on the same asset. The dashboard can resume an active repayment while its required steps confirm. The public API’s dividendDistribution method is limited to STO7943 on V2. Initiate DTO7943 repayments from the dashboard.

Changes for every token, V1 included

This release also changes behaviour that does not depend on the token’s version.
For newSto, whitelist, dividendDistribution and closeOffer, the API sets tokenizerEmail and signerAddress from your API key, and the token must belong to your own company. Otherwise the call fails with 403 API key does not own token symbol "<SYMBOL>" (or it does not exist).For newInvest and claimTokens, investorEmail is required. The API signs with the investor’s registered wallet, and the investor must already be related to one of your tokens: holding it, whitelisted on it, or invited to it.
get-allowance now reads allowance(ownerAddress, spenderAddress). Before this release the two addresses were swapped. The value is formatted with the payment token’s own decimals instead of 18, and missing data answers 404. Re-check any code that compensated for the old behaviour.
When every transaction in a send-transactions batch fails, the response now carries the error’s HTTP status (or 502) instead of 200 with success: false. Check the status code before the body.
get-transaction-status for a transaction that belongs to a different API key answers 400 Transaction not found.
  • get-network-info adds paymentHandlerAddress and universalEscrowAddress.
  • A missing offering answers 404 Sto not found.
  • get-stos, get-sto-by-id, and get-sto-balance report an offering as SCHEDULED before its start date. It still occupies the token’s active offering slot.
  • maxTokenSupply in get-token-info is a decimal serialized as a string.

Not available through the API yet

  • Burning a V2 token, as described above.
  • Freezing balances, forced transfers, and granting or inspecting on-chain roles.
  • Initiating capital and interest repayments for DEBT and BILL_FACTORING assets.
These actions remain in the Brickken dashboard. Contact tech@brickken.com if your integration needs one of them.

Tokenize an asset and run an STO

The full lifecycle, end to end.

Troubleshooting

Decode a failed call, from validation errors to raw revert data.