PackageTrack

Go modules · #2413 by repository stars

github.com/onflow/cadence

v1.10.6onflow/cadence

Release timeline

7527 releases since 2020
20202026

Releases

  1. v1.7.1-0.20250911212433-fd8d532d0ae911 Sept 2025pre-release

    Nothing published for this version

  2. v1.7.1-0.20250911191053-34d2b84db97b11 Sept 2025pre-release

    Nothing published for this version

  3. v1.7.1-0.20250911153103-b0f71b8b79c011 Sept 2025pre-release

    Nothing published for this version

  4. v1.7.1-0.20250910205020-1850906d5f2210 Sept 2025pre-release

    Nothing published for this version

  5. v1.7.1-0.20250910204402-aa0635b602cd10 Sept 2025pre-release

    Nothing published for this version

  6. v1.7.1-0.20250910193033-bc8255c2e6a210 Sept 2025pre-release

    Nothing published for this version

  7. v1.7.1-0.20250910191036-841a8aa0dd2310 Sept 2025pre-release

    Nothing published for this version

  8. v1.7.1-0.20250909144957-b6804ac951a39 Sept 2025pre-release

    Nothing published for this version

  9. v1.7.1-0.20250908202939-d398660c43668 Sept 2025pre-release

    Nothing published for this version

  10. v1.7.08 Sept 2025
    Release notes2 sources agree

    The Cadence v1.7.0 release marks a major step forward for Cadence. This upgrade delivers powerful new features that make Cadence more precise, more consistent, and more approachable for both developers and AI agents. With improvements ranging from higher-precision numeric types to more descriptive, AI-friendly error messages, Cadence v1.7.0 strengthens its position as the most developer-friendly smart contract language in Web3.

    The upgrade advances the Cadence roadmap across three key dimensions: developer experience, consistency and precision in financial workloads, and AI-powered autonomy. Together, these improvements ensure that building on Flow with Cadence is faster, safer, and more aligned with the future of agent-assisted development.

    Introducing Fix128 and UFix128 for high-precision math

    Cadence extends its fixed-point number system with Fix128 and UFix128, 128-bit fixed-point types that support precision up to 24 decimal places. Until now, developers relied on Fix64/UFix64, which are limited to eight decimal places. For many financial workloads such as interest accrual, risk modeling, and per-second rate calculations, this level of precision could fall short and force developers to manually convert values into scaled integers, which could introduce errors. The new 128-bit types expand numeric range while dramatically increasing fractional precision (24 decimal places vs eight), enabling accurate, high-resolution financial computations without custom math scaffolding. All values from Fix64/UFix64 convert losslessly to their 128-bit counterparts. Converting in the other direction can result in a range error, which will abort the transaction, and/or lost precision, which developers must handle explicitly, hence errors cannot go unnoticed.

    This is the implementation of FLIP 341: Add 128-bit fixed-point types to Cadence.

    On Ethereum, tokens and DeFi protocols typically represent fractional values by storing large integers alongside a decimals field (e.g. 18), leaving rounding and precision management to application code. Cadence eliminates this burden by providing fixed-point types natively at both 64-bit and 128-bit precision, significantly reducing rounding-related errors in application code.

    Example:

    Solidity (integer math with decimals)

    // ERC-20 token with 18 decimals
    uint8 public constant decimals = 18;  
    
    // Balance stored as integer with scaling
    uint256 public balance = 1500 * (10 ** decimals);  
    // balance represents "1500.000000000000000000"
    
    // Annual interest rate, represented as integer with scaling
    // 5% = 0.05, so store 0.05 * 1e18
    uint256 public yearlyRate = 5 * (10 ** 16);  
    
    // Seconds in a year
    uint256 public constant SECONDS_PER_YEAR = 31_536_000;  
    
    // Per-second interest rate, using integer division
    uint256 public perSecondRate = yearlyRate / SECONDS_PER_YEAR;  
    
    // Updated balance after one second (simplified)
    uint256 public updated = balance * (10**18 + perSecondRate) / 10**18;
    

    Cadence (native fixed-point types)

    let preciseBalance: UFix128 = 1500.0
    
    let yearlyRate: UFix128 = 0.05   // 5% interest
    let perSecondRate = yearlyRate / 31536000.0  // seconds in a year
    
    let updated = preciseBalance * (1.0 + perSecondRate)
    

    Fix numeric type rounding inconsistency

    In the same vein as introducing higher-precision fixed-point numbers, Cadence has also unified the rounding behavior of its numeric types to remove inconsistencies. Previously, Fix64 and large integer types like Int128 and Int256 used Euclidean division semantics, which produced different results for negative values compared to smaller integer types. With this change, all numeric types, including Fix64, now consistently use truncation when handling division of negative numbers. This ensures predictable and uniform arithmetic across the language, reducing surprises for developers.

    This is the implementation of FLIP 342: Fix numeric type rounding inconsistency

    Example

    Before:

    Fix64(-0.00000005) / Fix64(2.0) == Fix64(-0.00000003)
    

    Now:

    Fix64(-0.00000005) / Fix64(2.0) == Fix64(-0.00000002)
    

    Descriptive, AI- and human-friendly Cadence errors

    Cadence already lends itself well to AI assistance, and this release strengthens that foundation by making compiler and linter errors far more descriptive and actionable. In the past, many errors such as those triggered by deprecated pre-1.0 keywords like pub only stated what was invalid, without suggesting how to fix it or linking to migration notes. This left both developers and AI agents without enough context to resolve issues automatically.

    Error messages have now been rewritten to explain the cause, suggest concrete fixes, and link directly to reference documentation. For example:

    Before:

    pub fun foo() {}
    // error: 'pub' is no longer a valid access keyword
    

    Now:

    pub fun foo() {}
    // error: 'pub' is no longer a valid access keyword
    // note: replace with 'access(all)' for the same effect
    // see: https://developers.flow.com/cadence/migration-guide
    

    These enriched messages are also exposed through the Cadence language server, so IDEs and agent-based tools like Cursor can automatically apply the recommended fix, follow the link, and validate the change. The result is faster feedback, fewer trips to documentation, and a smoother path for both humans and AI agents working with Cadence.

    Import Aliasing

    Previously, developers could not import two contracts with the same name in the same scope, which led to conflicts and forced duplication of code when working with multiple contracts such as different token implementations. To address this, Cadence now supports import aliasing, allowing developers to assign custom names to imported contracts. For example,

    import FUSD as FUSD1 from 0x02
    import FUSD as FUSD2 from 0x03
    

    This reduces code duplication, prevents naming conflicts, and improves readability. It is the implementation of FLIP 314: Import Aliasing.

    Cadence Runtime Transition: Interpreter → Compiler & VM

    Cadence is progressing from its current interpreter to a new compiler and virtual machine. Historically, programs were executed by an interpreter that traverses the Abstract Syntax Tree (AST), which enabled rapid language evolution but limited runtime performance. With the compiler, Cadence programs are translated into a lower-level bytecode executed by a dedicated VM. This reduces AST overhead for improved performance and establishes a unified runtime that simplifies backward compatibility, since contracts from different Cadence versions compile to a common instruction set. Existing smart contracts continue to function without modification as the language evolves. See here for more information.

    Once complete, the new compiler/VM backend will be deployed in an upcoming release, opening the door to performance gains and a more flexible path to long-term language evolution. Developers do not need to change how they write or deploy contracts. Compilation occurs automatically within the Cadence execution runtime.

    Key updates in this release:

    Full compiler and VM implementation

    Implementation of all Cadence language features in the compiler and VM is now complete.

    Compatibility verification

    Key book-keeping functions have been validated, including fee deduction, account storage limit checks, and minimum account balance checks. Executing these paths with the compiler and VM yields results identical to the interpreter. Significant progress has also been made on the correctness of user transaction execution, which remains the primary focus going forward.

    Performance improvements

    Early benchmarks already show meaningful performance gains, establishing a solid foundation for further optimization.


    Open source →
  11. v1.7.0-preview.3.0.20250912173409-6f3655f6614f12 Sept 2025pre-release

    Nothing published for this version

  12. v1.7.0-preview.3.0.20250911235025-59c7224d03ae11 Sept 2025pre-release

    Nothing published for this version

  13. v1.7.0-preview.3.0.20250911220337-53372f58950711 Sept 2025pre-release

    Nothing published for this version

  14. v1.7.0-preview.3.0.20250910165505-78310508ed3d10 Sept 2025pre-release

    Nothing published for this version

  15. v1.7.0-preview.3.0.20250910160332-534561a6632f10 Sept 2025pre-release

    Nothing published for this version

  16. v1.7.0-preview.3.0.20250910154354-c2f1368f60df10 Sept 2025pre-release

    Nothing published for this version

  17. v1.7.0-preview.3.0.20250908221726-c0da922adb728 Sept 2025pre-release

    Nothing published for this version

  18. v1.7.0-preview.3.0.20250908145518-289720494dbe8 Sept 2025pre-release

    Nothing published for this version

  19. v1.7.0-preview.3.0.20250905230558-22358e5f71cf5 Sept 2025pre-release

    Nothing published for this version

  20. v1.7.0-preview.3.0.20250905220329-b03c8096df0f5 Sept 2025pre-release

    Nothing published for this version

  21. v1.7.0-preview.3.0.20250905215214-41894c41e16c5 Sept 2025pre-release

    Nothing published for this version

  22. v1.7.0-preview.3.0.20250905215155-18575245d49e5 Sept 2025pre-release

    Nothing published for this version

  23. v1.7.0-preview.3.0.20250905212748-0017b98f95e65 Sept 2025pre-release

    Nothing published for this version

  24. v1.7.0-preview.3.0.20250905212716-58c07f2163c35 Sept 2025pre-release

    Nothing published for this version

  25. v1.7.0-preview.3.0.20250905211939-8fc85b87e7b75 Sept 2025pre-release

    Nothing published for this version

  26. v1.7.0-preview.3.0.20250905205043-5a003ac190965 Sept 2025pre-release

    Nothing published for this version

  27. v1.7.0-preview.3.0.20250905200858-db5ef91d28cc5 Sept 2025pre-release

    Nothing published for this version

  28. v1.7.0-preview.3.0.20250904194307-64648fae188d4 Sept 2025pre-release

    Nothing published for this version

  29. v1.7.0-preview.3.0.20250904185016-e5f67860c2124 Sept 2025pre-release

    Nothing published for this version

  30. v1.7.0-preview.3.0.20250904184454-22ff844c6b194 Sept 2025pre-release

    Nothing published for this version

  31. v1.7.0-preview.3.0.20250904172859-86555632e1434 Sept 2025pre-release

    Nothing published for this version

  32. v1.7.0-preview.3.0.20250904163129-63aec67e94b54 Sept 2025pre-release

    Nothing published for this version

  33. v1.7.0-preview.3.0.20250904161617-ad82c8a192084 Sept 2025pre-release

    Nothing published for this version

  34. v1.7.0-preview.3.0.20250904155926-6b94f943fd204 Sept 2025pre-release

    Nothing published for this version

  35. v1.7.0-preview.3.0.20250904155233-e224bda2ac1e4 Sept 2025pre-release

    Nothing published for this version

  36. v1.7.0-preview.3.0.20250903212159-7fbaf1551b763 Sept 2025pre-release

    Nothing published for this version

  37. v1.7.0-preview.33 Sept 2025pre-release

    Nothing published for this version

  38. v1.7.0-preview.2.0.20250916193458-f58987646ff816 Sept 2025pre-release

    Nothing published for this version

  39. v1.7.0-preview.2.0.20250915175914-731fb51c763a15 Sept 2025pre-release

    Nothing published for this version

  40. v1.7.0-preview.2.0.20250915173929-98e0a3c3849815 Sept 2025pre-release

    Nothing published for this version

  41. v1.7.0-preview.2.0.20250904192510-81bd472d2f694 Sept 2025pre-release

    Nothing published for this version

  42. v1.7.0-preview.2.0.20250904180710-76612d07fe9c4 Sept 2025pre-release

    Nothing published for this version

  43. v1.7.0-preview.2.0.20250904172532-55ca4c9814fc4 Sept 2025pre-release

    Nothing published for this version

  44. v1.7.0-preview.2.0.20250904155123-c95f3c4911224 Sept 2025pre-release

    Nothing published for this version

  45. v1.7.0-preview.2.0.20250904154749-29bf697b6bf74 Sept 2025pre-release

    Nothing published for this version

  46. v1.7.0-preview.2.0.20250903220035-71634fef4ecd3 Sept 2025pre-release

    Nothing published for this version

  47. v1.7.0-preview.2.0.20250903202931-2768911514193 Sept 2025pre-release

    Nothing published for this version

  48. v1.7.0-preview.2.0.20250903202356-cbe1be4323fd3 Sept 2025pre-release

    Nothing published for this version

  49. v1.7.0-preview.2.0.20250903201959-7ae7348b7f413 Sept 2025pre-release

    Nothing published for this version

  50. v1.7.0-preview.2.0.20250903194356-7a033274b5133 Sept 2025pre-release

    Nothing published for this version

  51. v1.7.0-preview.2.0.20250903183713-51c15e76b5363 Sept 2025pre-release

    Nothing published for this version

  52. v1.7.0-preview.2.0.20250903024058-7d887cd69a223 Sept 2025pre-release

    Nothing published for this version

  53. v1.7.0-preview.2.0.20250902214855-764ccd68d5192 Sept 2025pre-release

    Nothing published for this version

  54. v1.7.0-preview.2.0.20250902204032-f8ba0a7e03b12 Sept 2025pre-release

    Nothing published for this version

  55. v1.7.0-preview.2.0.20250902201729-f5d7ffb74db02 Sept 2025pre-release

    Nothing published for this version

  56. v1.7.0-preview.2.0.20250902192011-95a54f85d0812 Sept 2025pre-release

    Nothing published for this version

  57. v1.7.0-preview.2.0.20250902190745-829d594d25282 Sept 2025pre-release

    Nothing published for this version

  58. v1.7.0-preview.2.0.20250902182425-99a62d6c65672 Sept 2025pre-release

    Nothing published for this version

  59. v1.7.0-preview.2.0.20250902162100-7b9fc11d2bdb2 Sept 2025pre-release

    Nothing published for this version

  60. v1.7.0-preview.2.0.20250902154730-238efb6292da2 Sept 2025pre-release

    Nothing published for this version