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

1 Answer 1

  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 compile

  3. A contract call doesn't return anything. Views are discussed currently. What you can do is query the blockchain. Also, I think that ConseilJS shows the output storage in is return value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.