Errors
Critical: uint64 vs uint256
// β WRONG - Will cause "range overflow" error
string memory ownershipJson = TokenizationJSONHelpers.uintRangeToJson(1, type(uint256).max);
// β
CORRECT - Use the FOREVER constant
string memory ownershipJson = TokenizationJSONHelpers.uintRangeToJson(
1,
TokenizationJSONHelpers.FOREVER // = type(uint64).max = 18446744073709551615
);Constant
Value
Use Case
Error Handling in Solidity
Basic Error Handling
Using TokenizationErrors Library
Common Errors and Solutions
1. Range Value Overflow
2. Address Cannot Be Empty
3. Failed to Unmarshal JSON
Type
Correct
Wrong
4. Collection Not Found
5. Insufficient Balance
6. Not Authorized / Permission Denied
7. Collection Archived
8. Invalid Range (start > end)
9. EVM Query Challenge Failed
10. Dynamic Store Not Found
11. Approval Not Found
12. Invalid Approval Criteria
Error Codes Reference
Code
Name
Description
Debugging Tips
1. Log JSON Before Sending
2. Validate JSON Externally
3. Test Individual Components
4. Check Precompile is Responding
5. Use Address Conversion for Debugging
JSON Format Quick Reference
Field Type
JSON Format
Example
Getting Help
Last updated