General
Why does Starknet use account contracts instead of EOAs?
Starknet implements native account abstraction, meaning all accounts are smart contracts. This provides:- Flexible signature validation: Support for different signature schemes
- Custom transaction logic: Batching, session keys, social recovery
- Gas abstraction: Pay fees in different tokens
- Enhanced security: Multi-sig, spending limits, etc.
What’s the difference between class_hash and contract_address?
| Concept | Description | Analogy |
|---|---|---|
| class_hash | Unique identifier for contract code | Like a class/template |
| contract_address | Unique identifier for contract instance | Like an object/instance |
class_hash but have different addresses and state.
Do I need to deploy my own Endpoint?
No. LayerZero deploys and maintains the Endpoint contract on each supported chain. You only need to:- Deploy your OApp/OFT contract
- Reference the existing Endpoint address in your constructor
- Configure your security settings (DVNs, peers, etc.)
What’s the difference between STRK and ETH on Starknet?
Starknet supports two fee tokens:| Token | Purpose | Notes |
|---|---|---|
| STRK | Native Starknet token | Primary fee token on Starknet |
| ETH | Bridged Ethereum | Still supported as a fee token |
Development
How do I encode addresses for crosschain messages?
LayerZero usesBytes32 for addresses to support different address sizes across VMs:
How do I batch multiple configuration calls?
Multicall is implemented at the account-contract level: a single INVOKE can execute multiple calls atomically when the account supports it. Most major account implementations (Ready Wallet, formerly Argent; Braavos; OpenZeppelin Account) expose multicall by default. If an account contract does not implement multicall, batching is not available for that account.What is the shared decimals limit?
OFTs use shared decimals (default: 6) to maintain consistency across chains with different token decimal precision:| Local Decimals | Shared Decimals | Conversion Rate | Max Precision |
|---|---|---|---|
| 18 | 6 | 10^12 | 0.000001 |
| 8 | 6 | 10^2 | 0.000001 |
| 6 | 6 | 1 | 0.000001 |
- Amounts smaller than the conversion rate become “dust” and are removed
- Always use
quote_oftto see exact received amounts before sending
Why is my constructor setting the wrong owner?
When deploying via the Universal Deployer Contract (UDC),get_caller_address() returns the UDC address, not your account.
Wrong:
How do I check my OApp configuration?
Query configuration via the Endpoint or your OApp:Deployment
What tooling do I use to deploy Starknet contracts?
Use Starknet Foundry (sncast):
Can I use Hardhat or Foundry (EVM) for Starknet?
No. Starknet uses Cairo, not Solidity. You need Starknet-specific tools:| EVM Tool | Starknet Equivalent |
|---|---|
| Hardhat | Scarb + sncast |
| Foundry | Starknet Foundry (sncast + snforge) |
| Remix | N/A (use Scarb locally) |
How do I verify my contract?
Usesncast verify or block explorers:
Using sncast (recommended):
- Voyager: Go to contract → “Verify & Publish”
- Starkscan: Go to contract → “Verify Contract”
Crosschain
How long do crosschain transfers take?
Transfer time depends on:- Source chain finality: Time for DVNs to verify
- DVN verification: Usually 1-5 minutes after finality
- Executor delivery: Near-instant after verification
Why did my crosschain message fail?
Common reasons:- Insufficient gas: Increase enforced options
- Peer not set: Configure bidirectional peers
- Contract paused: Unpause the destination contract
- Rate limit exceeded: Check OFTMintBurnAdapter limits
- Application error: Bug in
_lz_receivelogic
LzReceiveAlert event details.
Can I retry a failed message?
If a message failed execution (not verification), you can:- Fix the issue on the destination contract
- Use recovery operations if needed:
clear: Clear a blocking messagenilify: Reset verificationskip: Skip unverified message
Security
What are the default security settings?
If you don’t configure custom settings:| Setting | Default |
|---|---|
| DVN | LayerZero Labs DVN |
| Executor | LayerZero Labs Executor |
| Send Library | ULN302 |
| Receive Library | ULN302 |
Should I use multiple DVNs?
Recommended for production. Multiple DVNs provide:- Increased security (multiple independent verifiers)
- Resilience (no single point of failure)
- Trust minimization
What’s the difference between owner and delegate?
| Role | Permissions | Use Case |
|---|---|---|
| Owner | Full control (peers, ownership) | Long-term custody |
| Delegate | Configuration only (DVNs, options) | Operational management |
Costs
What fees are involved in crosschain transfers?
- Source chain gas: Pay for the
sendtransaction - LayerZero fees: DVN and Executor fees (quoted via
quote_send) - Destination gas: Paid by Executor, funded by step 2
quote_send to get the total LayerZero fee before sending.
Why are my fees higher than expected?
Fee factors:- Options: Higher gas limits = higher fees
- Message size: Larger payloads cost more
- Destination chain: Different chains have different costs
- DVN count: More DVNs = higher verification costs
- Using appropriate gas limits (not excessive)
- Minimizing message payload size
- Using efficient encoding
Troubleshooting
Where can I get help?
- Documentation: You’re here! Check other sections.
- LayerZero Scan: Track and debug transactions
- Discord: LayerZero Community
- GitHub: Report issues on the relevant repository
How do I debug a transaction?
- Get transaction hash from sncast output
- Check status:
- View on explorer: Voyager or Starkscan
- Check events: Look for error events
- Simulate locally: Use
snforge test