New SmartPy.io Version with Support for the Ledger Hardware Wallet and a few other Improvements

SmartPy.io
2 min readApr 10, 2020

We are thrilled to announce that we just released a new version of SmartPy.io in SmartPy.io/dev.

This version contains several improvements of the SmartPy language, some improvements of the platform and a nice addition to SmartPy.io: experimental support for the Ledger Hardware Wallet.

We would also like to say a few words about the current situation in the world. This is both extremely sad and totally expected. Please take care of yourselves, your loved ones, your communities and beyond. And, also, please wear masks and tell others to do so.

Support for the Ledger Hardware Wallet

We can now sign new contract originations in the Origination page and new transactions in the Explorer directly from a Ledger Hardware Wallet. This requires: a https connexion, a compatible browser (Chrome, Firefox, etc. — not Safari), and a Ledger Hardware Wallet.

We are happy to say that SmartPy.io is now one of the very rare tools handling arbitrary derivation paths and all Tezos curves: ed25519 (tz1), secp256k1 (tz2), and, p256 (tz3).

Please remember that this is still experimental and we ask users to remain cautious. Remaining cautious means using either test Tez only (with the hardware wallets) or using keys for small accounts.

We have a preliminary way to let users check what is being signed. This is not perfect and will be improved in the next few months.

The Ledger Hardware Wallet work has been supported by a recent grant received from the Tezos Foundation. We are also thankful for the continuous support and help from TQ Tezos and other active members of the community.

Other Features in this Version

Support for Storage-less contracts

We usually define initial storage in contract by doing something like:

def __init__(self):
self.init(x = 0, y = 12)

We can now do:

def __init__(self):
self.init_type(t = sp.TRecord(x = sp.TInt, y = sp.TNat))

or

def __init__(self):
self.init_type(t = sp.TRecord(x = sp.TInt, y = sp.TNat))
self.init(x = 0, y = 12)

or even skip the __init__ construction.

When no init() has been called in a contract constructor, we can define the initial storage in a test by doing something like:

c = MyContract(...)
c.set_storage(...)
scenario += c

This is further explain in the reference manual.

More Automatically Generated User Interfaces

Automatically generated user interfaces for simulation or in the explorer now have a usable (yet still limited) support of sets, lists and maps.

Test Scenarios

Inter-contract calls are properly simulated.
Transactions now include outputs of their parameters in Michelson’s concrete and JSON syntaxes.

--

--

SmartPy.io

An intuitive and effective smart contracts language and development platform for Tezos. In Python.