Question:

venv / entrypoint return storage?

Charlotte: 19 May 2022

3 questions:

1) someone use Smartpy in a venv as a pip3 package? I was thinking about printing some variables for debug purposes — there is a similar feature in the editor?

2) if you are in a deployment situation. what's the best way to define tests and publish a "clean" smart contract (for simplicity sake) ? scenario += contract ?

3) can you return the storage of the contract from an entrypoint function? for example: you call a entrypoint with ConseilJS and it returns you this storage as within your request (as it is really a return from the function within the contract code) — or if someone have some idea how to manage it

Answer:
Liam: 19 May 2022

  1. There is no pip package but this is clearly on the table. You can use print to print in the console and alert to show a popup. If you want to debug a scenario, scenario.show and scenario.simulation are probably better tools.

  2. You can also use SmartPy.sh (https://gitlab.com/SmartPy/smartpy/blob/master/python/SmartPy.sh) compile

  3. A contract call doesn't return anything. Views (https://forum.tezosagora.org/t/adding-read-only-calls/1227) are discussed currently. What you can do is query the blockchain. Also, I think that ConseilJS shows the output storage in is return value.