Skip to content
On this page

Releases

v0.19.1

Date: 2024-02-14

This is a bugfix release for macOS.

v0.19.0

Date: 2024-02-12

Features

Core

  • The Nairobi protocol is now the default protocol.
  • SmartPy is now a Python library, installable with pip as a wheel. See installation for instructions.
  • Various improvements for error messages: better wording, more consistency, more location info.

Language

  • New features:
  • Removed the sp. prefix from SmartPy functions whose names coincide with Python built-ins: sum, map, min, max, range. Conversely, trace is now called sp.trace.
  • A new standard library featuring string-integer conversions, rational/fixed-point arithmetic, and more.

Scenario

  • More contract syntax in scenarios: sp.cast(x, t), types (sp.int, sp.option[t], etc.), None, sp.Some(x), and sp.variant.<field_name>(<value>).
  • SmartPy errors are now normal Python exceptions and as such can be caught with Python's try/except. This complements the existing _valid and _exception arguments.
  • SmartPy now has a comprehensive system for metadata management: JSON generation, source code uploading, IPFS helpers and source code validity checks.
  • Dynamic contracts: sc.dynamic_contract can now be used to refer to contracts created by other contracts via sp.create_contract.

Web IDE

  • Scenario output in GUI: the overall structure has been improved and more context information is included. Addresses now have a copy tooltip.
  • Automatic syntax completion in the IDE has been extended.

Documentation

Breaking changes

Templates are now shipped under smartpy.templates and are thus imported by from smartpy.templates import template_name. For an example, see test_import.py.

Modules

  • The SmartPy set syntax is now the same as in Python. Non-empty sets are written as {x, y, ...}, whereas set() is used for empty sets.
  • sp.get_and_update argument order has been changed to key, value, map.

Scenario

  • sp.test_scenario now takes a name as its first argument. This name is also used as the output directory. Arguments to @sp.add_test have been removed.
  • Contract instantiation now requires a scenario, as a consequence, it must occur after the call to sp.test_scenario.
  • The context arguments are now streamlined into the entrypoint call preceded by an underscore, e.g. c.ep(_sender=..., _now=..., _valid=..., _exception=...). .run() is removed. See calls to entrypoints.
  • The scenario utils have been renamed from sp.utils to sp.scenario_utils. (The functions in sp.utils are now part of the standard library.)

Deprecated

The following language elements have been deprecated.

  • Contract language:
    • trace, in favor of sp.trace
    • sp.sum, sp.map, sp.min, sp.max, sp.range, in favor of sum, map, min, max, range
  • Scenario:
    • sp.set_type_expr, in favor of sp.cast
    • sp.some(x), in favor of sp.Some
    • sp.none, in favor of None
    • TInt, TRecord etc., in favor of sp.int, sp.record etc.
    • Variant creation with sp.variant("<field_name>", <value>) in favor of sp.variant.<field_name>(<value>)

Bug fixes

  • Evaluation order of map key assignment: in m[x] = y, y is now evaluated first.
  • Evaluation order of .apply, .get_opt and .contains: m.contains(x), x is now evaluated before m.
  • Fix list comprehension interpretation when calling a lambda with effects.
  • State backtracking in simulator when an expected error fails to occur.

v0.18.3

Date: 2023-09-09

Change Log

  • New sp.modify_record function. See the manual for details.

  • sp.read_ticket now returns the ticket data as a record (with fields ticketer, contents, amount) instead of a triple. See the manual for details.

  • sp.join_tickets now takes two arguments instead of a pair, i.e. sp.join_tickets(t1, t2) instead of sp.join_tickets((t1, t2)). See the manual for details.

  • The current directory is now part of the PYTHONPATH, allowing imports of files in the same directory.

v0.18.2

Date: 2023-06-20

Change Log

  • sp.operations() has been renamed to sp.operations, so that it can appear on the left-hand side of an assignment. See operations for details.

  • New sp.set_delegate_operation. See manual operation management for details.

v0.18.1

Date: 2023-06-07

Change Log

  • Support for bitwise operations and shifting on sp.bytes.

  • Better error messages for arguments to sp.timestamp that are out of range.

  • Fixes a bug with the typing of sp.sum.

v0.18.0

Date: 2023-05-09

Changelog

  • List comprehensions are now supported: [x+1 for x in xs]

  • When calling a function that returns a unit value, f() is now accepted instead of _ = f().

  • When calling a function with a unit argument, f() is now accepted as a shorthand for f(()).

  • Removes a number of obsolete flags.

  • Removes support for legacy syntax. For the old version please refer to legacy.smartpy.io.

  • Bugfixes related to unused parameters, tuple matching, and inheritance.

v0.17.2

Date: 2023-04-27

Changelog

  • Native support for macOS on Apple silicon (M1/M2).

  • Fixes an issue with Kukai pairing.

v0.17.1

Date: 2023-03-27

Changelog

  • Fixes an issue with running the Docker-based CI on macOS.

v0.17.0

Date: 2023-03-18

Changelog

  • A new frontend with parsed syntax:

    • Control statements no longer have to be prefixed by sp.. You can now write if and for, just like in Python.

    • No need for sp.local and x.value anymore: to assign to a variable, you can now write x = 42, just like in Python.

    • In the __init__ function of a contract the storage can now be initialised through assignments, e.g. self.data.x = 42, just like in Python.

    • For further details, see the new manual.

  • A new deployment mechanism via Docker. This greatly simplifies installation and improves performance. See installation.

v0.16.0

Date: 2022-12-15

Changelog

  • Support for mutation testing. For performance reasons this feature is CLI-only.

  • Support for the Lima protocol, activated by default. New constructs sp.build_lambda(..., recursive=True) and sp.private_lambda(..., recursive=True). See templates lambdas and test_private_lambda. Return type of TICKET is now an option.

Breaking changes

Bug fixes

v0.15.0

Date: 2022-10-26

Changelog

  • Internal upgrades in our mockup tests, docker on MacOS.

  • Improvements in the Wallet, new account management.

  • Improvements in our Internal primitives.

Breaking changes

Bug fixes

  • Fixing layout renamings.

  • Fix automatic tab selection in editors.

v0.14.0

Date: 2022-09-26

Changelog

  • Kathmandu protocol is now by default

  • Fix fees and gas computation with Kathmandu

  • Restore tab stability in Michelson IDE

  • events handling sp.emit

Breaking changes

Bug fixes

v0.13.0

Date: 2022-08-19

Changelog

Breaking changes

Bug fixes

v0.12.0

Date: 20220802

Changelog

  • Lazy entry points. The sp.entrypoint_map() is now accessible.

  • New Michelson-like sp.add and sp.compare instructions.

  • New parameter_type argument in entrypoints.

  • Documentation of several key templates.

  • Ghostnet in explorer and origination.

Breaking changes

Bug fixes

  • Types fixed in minimal FA2 examples.

  • Fix bls-12-381 multiplication bug.

v0.11.1

Date: 2022-06-07

Changelog

  • Bring back search bar from documentation which had disappeared.
  • Renaming and cleanup of the baking swap template

Breaking changes

Bug fixes

v0.11.0

Date: 2022-06-05

Changelog

  • New doc target in SmartPy.sh.
  • Fix of many bugs in Explorer and switch to TzKT for contract operations indexer.
  • Many important internals improvements (typing, values, etc.).
  • FA2 library is no longer experimental. Minor improvements in library and documentation.
  • Support for Jakartanet and deprecation of Hangzhounet.

Breaking changes

  • Changes in internal s-expr manipulations.

Bug fixes

v0.10.1

Date: 2022-04-05

Changelog

  • Update Taquito to support Ithaca new operations in Origination.
  • sp.sub_mutez documentation.

Breaking changes

Bug fixes

v0.10.0

Date: 2022-04-01

Changelog

  • Support for Ithaca protocol (on by default).
  • Support for SUB_MUTEZ / sp.sub_mutez.
  • Support for map on options.

Breaking changes

Bug fixes

  • Fix generation of views in sp.create_contract.
  • Fix explorer with no named entry point.

v0.9.1

Date: 2022-03-04

Changelog

  • Important. New experimental FA2 library that will replace our legacy FA2 template.
  • Entry points get a new argument check_no_incoming_transfer to determine whether to check for a zero amount or not.
  • New default-check-no-incoming-transfer flag to determine the default value of check_no_incoming_transfer in entry points.
  • Add stop-on-error flag to control early termination on errors.
  • More explicit error reporting in contracts (specially for missing type information).
  • Contract id and accessors such as address, baker, data, typed, and balance are now only visible once in a scenario.
  • New ConseilJS version + better exception handling in explorer.
  • Automatically remove instructions after a sp.failwith.

Breaking changes

Bug fixes

  • The nodes page is better synchronized with SmartPy's nodes.

v0.9.0

Date: 2022-02-08

Changelog

  • New code optimizer rule to slightly shrink lazy entry points code when multiple lazy entry points are defined.
  • Removal of useless comments in generated Michelson code.
  • We can now properly define entry points and views with the same names.
  • Explorer / simulation. Parsing of parameters in micheline or JSON formats, with or without entry points.
  • Explorer / simulation. Parsing of Lambdas in micheline format.
  • Scenario compute can now change context (sender, source, now, level, etc.).

Breaking changes

Bug fixes

v0.8.10

Date: 2022-01-13

Changelog

  • Fix int / nat documentation.
  • Wallet updates to recent versions to fix origination issues on the mainnet.
  • Fix TZComet URL in explorer.

Breaking changes

Bug fixes

v0.8.9

Date: 2022-01-10

Changelog

Breaking changes

Bug fixes

  • Fix balance bug introduced in 0.8.8.

v0.8.8

Date: 2022-01-09

Changelog

Breaking changes

Bug fixes

  • Fix balance computations between operations created by an entry point.

v0.8.7

Date: 2021-12-31

Changelog

  • Improvements in SmartML install procedure in the CLI.
  • Improvements in error reporting, mostly in the SmartPy.io editor.

Breaking changes

Bug fixes

  • Fix originator bug with lazy entry points (older taquito version was failing).

v0.8.6

Date: 2021-12-29

Changelog

  • Some typos fixed in documentation.
  • Many improvements in state channel game platform (see documentation).

Breaking changes

Bug fixes

  • Views: fix the code optimizer on views that were wrongly annotated as non failing.
  • Views: fix a bug that mixed up view contracts with inheritance.
  • Explorer: fix operations.

v0.8.5

Date: 2021-12-16

Changelog

  • Documentation of operations and internals.
  • Documentation of all three view concepts (CPS, off-chain and on-chain).
  • Documentation of lambda effects / contexts.
  • Documentation of sp.cons in lists.
  • Links to new faucet wallet faucet importer.
  • Hangzhou is now the default protocol, introduction of Ithaca (equivalent to Hangzhou as of now).
  • Remove Granadanet and Introduce Ithacanet in the UI (origination, wallet and explorer).
  • New view-check-exception flag to control views error semantics.
  • New Admin Multisig template.

Breaking changes

  • The interpreter now checks that mutez don't become negative when subtracting them.
  • Layout information for record types is now checked.
  • Cleaner way to change the name of a view.

Bug fixes

v0.8.4

Date: 2021-11-19

Changelog

  • Support integer bit-wise operations & | on test interpreter;
  • Remove double-rewriting of views;
  • CONCAT is now resolved during type checking.

SmartTS:

  • Add compilation diagnostics.

Breaking changes

  • Decorators @sp.global_lambda and @sp.sub_entry_point were deprecated in favor of @sp.private_lambda, which centralizes both concepts;

Bug fixes

  • Properly load configuration flags in scenarios;
  • Explorer Page - Call parameters now include the entry point name when using the SmartPy wallet.

v0.8.3

Date: 2021-11-06

Changelog

  • Remove deprecated test network (florencenet);
  • Improve the precision of line numbers in error messages;
  • Make evaluation order of all binops right-to-left;
  • Reworks to sp.contract annotation and type checking. The default entry_point is better handled now;
  • Adds new contract-check-exceptionFlag;
  • Adds an FA2 guide;
  • Calling entry points in the explorer page now uses the entry point name instead of default.

SmartTS:

  • Adds support for nested imports.

Breaking changes

Bug fixes

  • Fix source and sender for follow-up calls;
  • Fix comparison between address values:
    • addresses of implicit accounts are strictly less than addresses of originated accounts
    • addresses of the same type are compared lexicographically
  • Fix a Brython bug for attributes called 'message';
  • Adds missing @smartpy/timelock dependency.

SmartTS:

  • Solves an issue related to variable resolution in test scenarios;

v0.8.2

Date: 2021-10-18

Changelog

  • SmartML dialect is now available in the online IDE; (API documentation)
  • A few templates have been added for the SmartML dialect;
  • Updates the mint entry point in FA2 template;
  • Adds the timelock feature;
  • In the online IDE, the editor and output panel can now be resizable. (Feature Request);
  • Hangzhou primitives have been added to Michelson IDE.

Breaking changes

Bug fixes

  • DIP n {...} is now valid when n is less or equal to the stack size;
  • The test interpreter now supports single annotated entry points.

SmartTS

  • Adds missing type resolutions for access expressions.

v0.8.1

Date: 2021-10-04

Changelog

Improves frontend loading times.

Breaking changes

Bug fixes

v0.8.0

Date: 2021-09-29

Changelog

  • Adds support for on-chain views; (SmartPy, SmartTS)
  • Adds support for global constants to be used as values; (SmartPy, SmartTS)
  • Various improvements to SmartML dialect.

Breaking changes

  • Method sp.to_constant was renamed to sp.resolve. This change is necessary to avoid confusion with the constants feature coming with H proposal.

Bug fixes

v0.7.5

Date: 2021-09-17

Changelog

  • An early version of the Ocaml dialect is available through the CLI;
  • Introduces mechanisms to test off-chain views directly in test scenarios;
  • The wallet page has been reworked;
  • SmartPy.io frontend bundle received a few optimizations.

Breaking changes

Bug fixes

  • Fix content forging in the origination page. (Strings with multiple spaces could cause the signature to be invalid.)

v0.7.4

Date: 2021-09-04

Changelog

Breaking changes

Bug fixes

  • Adds support for sp.TBounded arguments in tests.

v0.7.3

Date: 2021-09-02

Changelog

  • Removes Edonet node;
  • Adds type annotations to the metadata builder;

Python

  • Adds an helper method sp.utils.seconds_of_timestamp(<timestamp>) for extracting seconds of type sp.TNat from timestamps;
  • Adds documentation for overload multiplication sp.mul(<expr1>, <expr2>);

Typescript

  • Adds <int>.abs() instruction;
  • Makes origination parameters less restrictive in test scenarios;
  • Adds an helper method <timestamp>.toSeconds() for extracting seconds of type TNat from timestamps;

Breaking changes

Bug fixes

Typescript

  • Fixes a few exceptions related to variants;
  • Fixes the documentation related to the unpack instruction;
  • Fixes a few exceptions occurring in access expressions;

v0.7.2

Date: 2021-08-21

Changelog

Typescript

  • Add Sp.ediv expression;
  • Extend inlining support;
  • Add update script to the boilerplate;
  • Add better support for as <type> expressions;
  • Add more type checks to the linter.

State channels

  • Misc interface changes.

Breaking changes

Bug fixes

  • Fix TTimestamp type-checking in Typescript dialect;
  • Fix TAddress linting in Typescript dialect;
  • Improve the messages of some cryptic errors.

v0.7.1

Date: 2021-08-18

Changelog

  • Better error handling;

Breaking changes

Bug fixes

  • Fix lambda packing/unpacking with records and variants;
  • Fix Sp.createContract return type in the typescript dialect.

v0.7.0

Date: 2021-08-09

Changelog

  • Includes a beta version of the Typescript syntax called SmartTS;
  • New documentation, it now uses a new system to allow multiple syntaxes;
  • Inlined Michelson in SmartPy is now interpreted.

Breaking changes

Bug fixes

v0.6.11

Date: 2021-07-10

Changelog

Breaking changes

Bug fixes

  • Metadata builder now works when using lazy entry points;

  • Option types now work as expected in explorer.html

v0.6.10

Date: 2021-07-08

Changelog

  • The online IDE now uses monaco editor, it offers new features to ease the development experience;

  • Compiler: The Michelson compiler no longer generates IF_SOME macros since they are not handled optimally by the Tezos client.

Breaking changes

  • Contracts now enforce that initial flags do not appear in contracts (they were not taken into account but they could appear in contracts). They can only appear in the first steps of scenarios.

  • sp.now and sp.level now keep the state from previous calls as default, instead of resetting to zero.

Bug fixes

  • Fix token_supply configuration in the FA2 template;

v0.6.9

Date: 2021-06-30

Changelog

  • Adds exception testing, users are now able to link:reference.html#_registering_and_displaying_calls_to_entry_points[test error messages] emitted by failed contract calls;
  • File names in error location;
  • Online IDE now divides tests and compilation targets into two distinct sections;

Bug Fixes

v0.6.8

Date: 2021-06-09

Changelog

  • SmartPy CLI now shows all created operations in log.txt (it used to only show recursive operations).
  • More documentation and examples of lazy and updatable entry points.

Bug Fixes

  • Fix CLI originate-contract command.