SmartPy is a Python library for constructing Tezos smart contracts.

We maintain several releases of both https://SmartPy.io and of the corresponding command line interface https://SmartPy.io/cli.

SmartPy.io

The Current Release

The current release: https://SmartPy.io.
Alternative server: https://alt.SmartPy.io.

Recent History

2021-07-10
2021-07-08
  • New release 0.6.10 is https://smartpy.io/releases/20210708-4662b0f8b1fe2186a243078f9f1ba0a4aa1c6f16.

    • 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. Flags

      • 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;

2021-06-30
2021-06-09
2021-06-04
  • New release 0.6.7 is https://smartpy.io/releases/20210604-7f97dba13e914cb1915b7cea16b844208abf51e9.

    • Add granadanet test network RPC;

    • Published SmartML module on npm;

    • (Bug fixes):

      • Fixes order of operations created inside @sp.sub_entry_point, this bug would cause the order of operations to be inverted;

        When creating new operations inside a `@sp.sub_entry_point`:
        ```
            sp.set_delegate(sp.source)
            sp.set_delegate(sp.none)
        ```
        The following behavior would occur:
          +--------+-----------+
          | Calls  | Emissions |
          +--------+-----------+
          | A, B   | B, A      |
          +--------+-----------+
        Correct behavior:
          +--------+-----------+
          | Calls  | Emissions |
          +--------+-----------+
          | A, B   | A, B      |
          +--------+-----------+
2021-05-26
2021-05-21
2021-05-12
  • New release 0.6.4 is https://smartpy.io/releases/20210512-c6a32a4036fa73e6f262c4035e87cdf9739b6679.

    • Adds helper methods, contained in sp.utils:

      • sp.utils.same_underlying_address(a, b) which allows underlying address comparisons.

        • e.g.) It returns a boolean informing if KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF%foo has the same underlying address as KT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF;

      • sp.utils.mutez_to_nat(m) which converts a TMutez amount to TNat;

      • sp.utils.nat_to_mutez(n) and sp.utils.nat_to_tez(n) convert TNat to TMutez;

    • IO methods are now available at sp.io.* namespace:

      • sp.io.import_script_from_script

      • sp.io.import_template

      • sp.io.import_script_from_url

      • sp.io.import_stored_contract

    • FA2 template was updated, it now includes on-chain/off-chain token_metadata;

    • (Bug fixes):

      • Adds non-negativity checks to sp.nat and sp.mutez;

      • ConseilJS now supports escaping sequences \n, \\, \".

    • (Breaking changes):

      • Florence is now the default protocol.

      • sp.mutez(n) and sp.tez(n) are now literals only, sp.utils.nat_to_mutez(n) and sp.utils.nat_to_tez(n) are used for non-constant expressions;

2021-04-29
2021-04-28
2021-04-27
  • New release 0.6.1 is https://smartpy.io/releases/20210427-b20fef5af73cea46ccbe8557cfaaa4643bf5cc04.

    • New flags.

    • protocol is now an initial flag.

    • Toplevel parameter annotation in generated Michelson code for single entry point contracts. This is controlled by a single-entry-point-annotation flag which is true by default.

    • Exception launched when an entry point parameter is unused. This is controlled by a warn-unused flag. No type defaulting anymore.

    • sp.init is now an alias for more explicit sp.init_storage; new sp.update_initial_storage for initializing storage in contracts.

    • FA1.2 template example with metadata.

    • typed contract access including entry points.

    • delphinet.smartpy.io node removed from origination and explorer pages.

    • The origination page now uses known network types instead of CUSTOM when connecting to kukai.

    • Improvements to contract linkage in scenarios after using UNPACK.

    • Efficiency improvements to recursion in jsoo.

    • (Bug fixes):

      • Fix amount field in origination page. (It did not work when an amount was specified)

    • (Breaking change): sp.private_entry_point is now done through optional parameter sp.entry_point(private = True).

2021-04-05
  • New release is https://smartpy.io/releases/20210405-4dc8e0b9b9fc5c58a933b461dbb10f643329716b.

    • Misc improvements in error messages.

    • Grouping of multiple operations in web output.

    • Fix c.set_initial_balance(expression) in contract testing when using sp.sub_entry_point or sp.global_lambdas.

    • (Breaking change): sp.create_contract / scenario.dynamic_contract change of interface (from types to models).

2021-03-26
  • New release is https://smartpy.io/releases/20210326-d2f24290eef00fe8cc3d482f052165a71a635fa3.

    • Support lambda unpacking in the interpreter. No further execution of these michelson lambdas in the interpreter yet.

    • Documentation of Michelson inlining.

    • Multiple operations blocks in the UI.

    • Fix of inner call validity issue.

    • Use little endian in bls12_381_fr encoding.

    • Delphinet is now deprecated.

2021-03-22
2021-03-06
2021-03-04
2021-02
  • New release is

    • Some small breaking changes in tickets operations.

    • Some changes in the flag system.

    • Complete removal of the run-obsolete and compile-obsolete commands in the CLI.

    • Better interaction with dynamically created contracts in test scenarios.

2021-02-18
2021-02-17
2021-02-12
2021-01-21
2021-01-18
2021-01-05
2020-12-24
2020-12-15
2020-12-13
2020-12-03
2020-11-30
2020-11-28
2020-11-26
2020-11-14
2020-11-09
2020-11-08
2020-10-28
2020-10-25
2020-10-24
2020-10-23
2020-10-17
2020-10-14
2020-10-13
2020-10-12
2020-10-10
2020-10-06
2020-10-03
2020-09-26
2020-09-24
2020-09-22
2020-09-20
2020-09-12
2020-09-07
2020-09-05
2020-08-30
2020-08-27
2020-08-24
2020-08-22
2020-07-22
2020-04-10
  • Demo updated with former Development version.

  • New Development Version — Ledger Hardware Wallet support, storage less contracts and inter-contract test scenarios.

2020-03-05
  • New Development Version — One Year Anniversary Release with custom layouts, private entry points, lambdas, etc.

SmartPy Command Line Interface

The command line interface is synchronized with the web version https://SmartPy.io/cli.
Please see https://SmartPy.io/reference.html#_command_line_interface for install instructions.

SmartPy Open Source Release

An open source release is accessible here: https://gitlab.com/SmartPy/smartpy.