- BETH
- Guides
- Mint BETH
Mint BETH
BETH overview · BETH environments and prerequisites
Outcome
Section titled “Outcome”Create a BETH deposit account, select its deposit account ID, deposit ETH to the Ethereum bridge, and verify that the corresponding BETH becomes available to the intended Canton party.
Before you start
Section titled “Before you start”- Complete the BETH environment preflight.
- Use a supported Canton participant and authenticated party.
- Install and validate the BETH DAR packages required for minting.
- Confirm that the party has the required Minter credential.
- Confirm that the BitSafe API of the selected environment is reachable.
- Use a pinned
bitsafe-token-librelease and compatible shared Canton libraries. - Confirm the approved Ethereum network and the bridge contract address. For Devnet and Testnet, get Sepolia ETH from a Sepolia faucet.
- Use an Ethereum account that can call a contract and that holds ETH for the deposit and for gas.
Minting has additional prerequisites beyond ordinary BETH transfers. Do not begin from the Send BETH setup alone.
1. Confirm the Minter credential
Section titled “1. Confirm the Minter credential”Use the credential example or the approved application interface to:
- Check whether the party already holds the required credential.
- Find an eligible pending credential offer if none exists.
- Accept only the intended offer through the approved flow.
- Record the resulting credential contract identifier securely for the current operation.
Do not copy a real credential contract identifier into documentation or support tickets.
2. Retrieve current account rules
Section titled “2. Retrieve current account rules”Retrieve the deposit and withdrawal account rules from the BitSafe API of the selected environment:
GET /beth/v1/account-contract-rulesThe response holds da_rules for deposit accounts and wa_rules for withdrawal accounts. Each rule has a template_id, a contract_id, and a created_event_blob.
Verify that:
- The response belongs to the selected environment.
- The package and template references match the approved DAR set.
- The returned rules are current for the intended party and operation.
Treat rules as runtime data. Do not hard-code them into a long-lived integration.
3. Create a deposit account
Section titled “3. Create a deposit account”Create a deposit account using:
- The authenticated Canton party.
- The approved Minter credential.
- The current deposit-account rules.
- A unique command or request identifier where the interface supports one.
Verify that the resulting account is owned by the intended party before continuing.
4. Select the deposit account ID
Section titled “4. Select the deposit account ID”BETH doesn’t have a separate deposit address for each account. Instead, every deposit goes to the one Ethereum bridge contract of the environment. The deposit account ID tells the attestors which account to credit.
Select the deposit account ID:
- If the deposit account has an
idvalue, use that value. - Otherwise, use the contract ID of the deposit account.
The ID stays the same when a completed deposit recreates the account contract. Use the same ID for every deposit to the account. Do not replace it with the newest contract ID.
Before depositing ETH:
- Confirm the Ethereum network and chain ID.
- Confirm the bridge contract address for the selected environment.
- Confirm the ID belongs to the expected deposit account.
- Record the account and ID association in the integration’s reconciliation data.
5. Deposit ETH
Section titled “5. Deposit ETH”Call depositETH(bytes depositAccountId) on the bridge contract. Pass the deposit account ID as UTF-8 bytes, and send the approved test amount as the transaction value. Use the transaction hash to monitor Ethereum finality.
The amount must be a whole multiple of 100000000 wei (0.0000000001 ETH), because BETH has 10 decimal places. The bridge rejects any other amount. The bridge also rejects a plain ETH transfer, so a deposit must call depositETH. The amount must also be within the deposit account’s own limits. beth::mint::deposit_call checks these limits.
6. Monitor the mint lifecycle
Section titled “6. Monitor the mint lifecycle”Track the deposit account and BETH state until the approved completion condition is met. Monitor:
Depositevent emitted by the bridge contract.The bridge emits the five-field layout after its upgrade.
bitsafe-token-lib0.6.0 decodes only that layout.Ethereum block finalized.
Verification or attestation state.
Mint submitted on Canton.
BETH holding created for the intended party.
Terminal failure or escalation state.
7. Verify the result
Section titled “7. Verify the result”A successful mint should be verified in two places:
- The deposit workflow shows the approved completed state.
- The intended Canton party’s BETH balance or holdings increase by the expected amount.
Reconcile the Ethereum transaction, deposit account, mint result, Canton update, and resulting holdings without exposing secrets.
Source example
Section titled “Source example”The repository includes a guided example:
cargo run --example beth_credentialscargo run --example beth_mint_flowThe beth_mint_flow example does not send ETH. It prints the depositETH transaction, which you sign and send with your own Ethereum wallet.
Use these commands only with the reviewed source tag and an approved environment. Link to the source for exhaustive implementation details rather than duplicating the full code.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Check | Safe next action |
|---|---|---|
| No eligible credential | Party, environment, registrar, and pending offers | Stop and use the approved credential-request path. |
| Account rules unavailable | BitSafe API, authentication, environment, and service status | Do not reuse cached rules unless the support policy permits it. |
| Deposit account creation fails | DAR compatibility, credential, party rights, rule identifiers, and Canton response | Capture sanitized identifiers and the version set. |
| Deposit transaction fails | Bridge pause state, deposit limits, amount unit, and depositETH call data | Correct the input before another attempt. |
| ETH deposit is not detected | Chain ID, bridge contract address, deposit account ID, transaction hash, finality state, and event topic0 | Do not send a second deposit until the first transaction is reconciled. |
| Deposit is final but BETH is absent | Deposit account ID, verification state, mint status, Canton update, and target party | Escalate with sanitized account, transaction, and update identifiers. |
Read topic0 from the deposit transaction’s receipt at the proxy address before choosing a filter or decoder.
The SDK event reference explains topics and historical log decoding.
Technical sources
Section titled “Technical sources”Related pages
Section titled “Related pages”- Install and validate BETH DARs
- BETH authentication
- BETH errors, retries, and troubleshooting
- BETH compatibility and release notes
Next step
Section titled “Next step”Prepare for failures safely: BETH errors, retries, and troubleshooting.
Ask the docs
Answers come only from this documentation and can be wrong. Check the linked pages.
Ask a question about BitSafe, CBTC or the developer guides. For example: