Deployment Issues
Docker on M1 Chips
Workaround options:-
Use native Foundry installation: Instead of Docker, install Foundry directly using the official installation script:
-
Use Rosetta: Run Docker with Rosetta 2 emulation:
- Build on different architecture: Build the Docker image on an x86_64 machine and push to a registry.
Environment Configuration
If deployment scripts fail, verify all required environment variables are set:V1 Required Variables
V1 Required Variables
V2 Required Variables
V2 Required Variables
For V2 deployments, see the V2 deployment section for a complete list of required environment variables.
Attestation Service Issues
Rate Limiting
Solution: Implement proper rate limiting in your application:Attestation Pending Too Long
If an attestation remains inpending status for an extended period:
- Verify the transaction was confirmed: Check that your
depositForBurntransaction was successfully mined - Check the correct network: Ensure you’re querying the right attestation service (sandbox vs. production)
- Wait for finality: Attestations require block finality, which varies by chain
- Verify message hash: Ensure the message hash was correctly extracted from transaction logs
Transaction Issues
Gas Estimation Failures
If gas estimation fails when calling CCTP functions:Check token allowance
Check token allowance
Ensure you’ve approved the TokenMessenger contract before calling
depositForBurn:Verify sufficient balance
Verify sufficient balance
Confirm your address has enough USDC for the transfer amount plus fees.
Check contract pause status
Check contract pause status
The contract may be paused. Check the
paused state:Validate parameters
Validate parameters
Ensure all parameters meet requirements:
- Amount > 0
- Recipient address is not zero
- Max fee < amount
- Min fee requirements met (V2)
“Invalid Message Version” Error
This error occurs when message versions don’t match:- V1 contracts: Use message version 0
- V2 contracts: Use message version 1
”Nonce Already Used” Error
This error means the message has already been processed on the destination chain. Causes:- Message was already received and processed
- Duplicate transaction submission
Testing and Debugging
Running Tests with Debug Logs
Use Foundry’s verbosity flags to see detailed test output:Contracts must import
lib/forge-std/src/console.sol to use console.log() statements.Static Analysis
Run Mythril for security analysis:Common Error Messages
'Amount must be nonzero'
'Amount must be nonzero'
You’re attempting to burn 0 tokens. Ensure the amount is greater than 0.
'Mint recipient must be nonzero'
'Mint recipient must be nonzero'
The recipient address is set to zero. Provide a valid destination address.
'Max fee must be less than amount'
'Max fee must be less than amount'
The max fee equals or exceeds the transfer amount. Reduce the max fee.
'Insufficient max fee' (V2)
'Insufficient max fee' (V2)
The max fee is below the minimum required fee. Calculate minimum fee:
'Pausable: paused'
'Pausable: paused'
Contract operations are paused. Wait for the contract to be unpaused by the pauser role.
'Invalid destination domain'
'Invalid destination domain'
The destination domain is not configured. Verify the domain ID and ensure remote token messenger is registered.
'Denylistable: account is on denylist' (V2)
'Denylistable: account is on denylist' (V2)
Your address (msg.sender or tx.origin) is on the denylist. Contact support if you believe this is an error.
'Signature threshold exceeds attesters'
'Signature threshold exceeds attesters'
The signature threshold is set higher than the number of enabled attesters. This is a configuration error during initialization.
Integration Testing
Running Anvil Tests
Test your integration locally with Anvil:anvil/ directory.
Linting
Run Solhint to catch common issues:Need More Help?
FAQ
Frequently asked questions
Security
Report security vulnerabilities