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
-
-
New release 0.6.11 is https://smartpy.io/releases/20210710-06baf4f9ae06f99dc60bab2a01cfee13f4a20c13.
-
(Bug fixes):
-
Metadata builder now works when using lazy entry points;
-
Option types now work as expected in explorer.html
-
-
-
- 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 generatesIF_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
andsp.level
now keep the state from previous calls as default, instead of resetting to zero.
-
-
(Bug fixes):
-
Fix
token_supply
configuration in theFA2
template;
-
-
-
- 2021-06-30
-
-
New release 0.6.9 is https://smartpy.io/releases/20210630-d86b17adb6d0fb15c9dc009bf3a62de6665a9ae3.
-
Adds exception testing, users are now able to test error messages emitted by failed contract calls;
-
File names in error location:
-
New state channel based game platform templates: (A work in progress)
-
Online IDE now divides tests and compilation targets into two distinct sections;
-
(Bug fixes):
-
originate-contract
CLI command can now be executed from any sub-folder; -
scenario.simulation
debugging feature is now working again; -
Fixes an issue in the explorer page that would cause an exception when interpreting tuples;
-
Allow invalid
packed
bytes to be tested with `run(valid = False);
-
-
-
- 2021-06-09
-
-
New release 0.6.8 is https://smartpy.io/releases/20210609-d64964633e98c1bd1fe8beb9f83138185cabdf90.
-
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.
-
-
-
- 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
-
-
New release 0.6.6 is https://smartpy.io/releases/20210526-6aa00c4986bbaa550be88d526bd3b290890b9f50.
-
Adds contract originator to smartpy-cli,
SmartPy.sh originate-contract …
deploying a contract; -
Adds user input sanitization to explorer.html / wallet.html pages;
-
Per-entry-point lazyfication and lazy and updatable entry points;
-
(Bug fixes):
-
Fixes type and adds annotations to
token_metadata
on FA1.2 template;
-
-
-
- 2021-05-21
-
-
New release 0.6.5 is https://smartpy.io/releases/20210521-609e3034295b20ba9b54c707ad994eafe6f1b7ab.
-
Increases the size of lists and maps parameters from 2 to 4 in the explorer;
-
sp.sub_entry_point
input type now defaults tosp.unit
when no argument is provided; -
Add token_metadata annotations to FA2 template.
-
Allow a zero scalar when multiplying G1/G2 points by Fr.
-
-
- 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 asKT1Tezooo1zzSmartPyzzSTATiCzzzyfC8eF
;
-
-
sp.utils.mutez_to_nat(m)
which converts aTMutez
amount toTNat
; -
sp.utils.nat_to_mutez(n)
andsp.utils.nat_to_tez(n)
convertTNat
toTMutez
;
-
-
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-chaintoken_metadata
; -
(Bug fixes):
-
Adds non-negativity checks to
sp.nat
andsp.mutez
; -
ConseilJS now supports escaping sequences
\n
,\\
,\"
.
-
-
(Breaking changes):
-
Florence is now the default protocol.
-
sp.mutez(n)
andsp.tez(n)
are now literals only,sp.utils.nat_to_mutez(n)
andsp.utils.nat_to_tez(n)
are used for non-constant expressions;
-
-
-
- 2021-04-29
-
-
New release 0.6.3 is https://smartpy.io/releases/20210429-2b02a443f7581973ec403bc7af9c67c5c4e4e4b6.
-
sp.set_delegate(baker)
will now fail whenbaker
is not present invoting_powers
; -
Efficiency improvements to recursion in code generated by
js_of_ocaml
. -
(Bug fixes):
-
In explorer page,
bls12_381_*
values are now represented withbls12_381_*
types instead ofbytes
;
-
-
-
- 2021-04-28
-
-
New release 0.6.2 is https://smartpy.io/releases/20210428-7bdf4a71ac2001bf792918d38021fe2da7c631e7.
-
Support
sp.sha3
andsp.keccak
hashing algorithms in test interpreter; -
Add new test network RPC link:https://galphanet.smartpy.io;
-
Efficiency improvements to recursion in code generated by
js_of_ocaml
.
-
-
- 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 explicitsp.init_storage
; newsp.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 tokukai
. -
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 parametersp.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 usingsp.sub_entry_point
orsp.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
-
-
New release is https://smartpy.io/releases/20210322-f6f10ab2bc9b5cc355ed6428ee08b6cdb31bda99.
-
Support unpack in the test interpreter (Lambdas not supported yet).
-
Remove Florence with Baking Accounts protocol.
-
Add fake addresses for contract originations in test scenarios (e.g.
KT1FAKEooo1FAKEzSTATiCzSmartPyxAh632
). -
(Breaking change)
sp.modify_record(…)
was adapted to better deal with tickets Records.
-
-
- 2021-03-06
-
-
New release is https://smartpy.io/releases/20210306-a8f25571f193b940c121d1fc4bef40217fb281cf.
-
Florence flag now unables DFS contract calls.
-
Synchronized with open source version https://gitlab.com/SmartPy/smartpy/-/commit/473d402a18970aff0762aa011bba88bd366e3b64.
-
-
- 2021-03-04
-
-
New release is https://smartpy.io/releases/20210304-8004e57f2b88b4212c65609abc1f9acff0f791d5.
-
Add (Florence, FlorenceNoBA) networks.
-
Add protocol flag
florence
to enable Florence features. -
Add
baker_hash
Michelson type. -
Support
baker_hash
type in SET_DELEGATE, VOTING_POWER, CREATE_CONTRACT instructions.
-
-
- 2021-02
-
-
New release is
-
Some small breaking changes in tickets operations.
-
Some changes in the flag system.
-
Complete removal of the
run-obsolete
andcompile-obsolete
commands in the CLI. -
Better interaction with dynamically created contracts in test scenarios.
-
-
- 2021-02-18
-
-
New release is https://smartpy.io/releases/20210218-663becf127363ec728080bcf3d29108f97572d49.
-
Add Falphanet RPC.
-
-
- 2021-02-17
-
-
New release is https://smartpy.io/releases/20210217-215a92bfa20c23e833c46dd6f75f8af5ea65e57b.
-
Add support for bls12-381 in the test interpreter.
-
Fix metadata generation.
-
Add support for offchain-view testing.
-
-
- 2021-02-12
-
-
New major release is https://smartpy.io/releases/20210212-2affd5164a82b2238c9ee9593cf2a03a58bec979.
-
See announcement here: https://medium.com/@smartpy-io/21e2adb72ec3.
-
One breaking change in the CLI.
-
-
- 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
-
-
Change of release version and mechanism. We now use our new react version.
-
New release is tested on https://alt.smartpy.io/releases/20201108-33c4c60012ecf026ee0c0e2384a2c168c2a7cba8.
-
- 2020-10-28
- 2020-10-25
- 2020-10-24
-
-
New dev is https://smartpy.io/releases/dev-20201024-715699df04b2c8eefba4be4f87d0dc148968cc8e.
-
New dev is https://smartpy.io/releases/dev-20201024-36f157966a1934fb8b24f65b2ac3cf2c2b7491d4. (new CLI installer)
-
- 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
-
-
New dev is https://smartpy.io/releases/dev-20200830-61244befe2c4c321c0ae6f807873e3a77811f20a.
-
New react version of https://SmartPy.io
-
New dev is https://smartpy.io/releases/dev-20200830-c5ff990e1a430240fad527324bb33eeae811f71a.
-
- 2020-08-27
- 2020-08-24
- 2020-08-22
-
-
New dev is https://smartpy.io/releases/dev-20200822-dd0d095addb54a5227f7fb4f55150de4b065798e.
-
New open source version https://gitlab.com/SmartPy/smartpy.
-
- 2020-07-22
-
-
New dev is https://smartpy.io/releases/dev-20200722-cdf84730ca17634b3212be837f9604aea6abb4a3.
-
Demo replaced by former dev version.
-
Former demo version is: https://SmartPy.io/demo.20200317.
-
- 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.