429
https://smartpy.io/ https://twitter.com/smartpy_io
hey @TheMastroDev - it's a bit before my time with SmartPy but I think the first "new" version was 0.17.0 https://smartpy.tezos.com/releases.html#v0-17-0
maybe Jordan can verify?
📣🚀😍Announcing - SmartPy alpha release v0.25.0 🔥🎉🙌
https://releases.smartpy.io/0.25.0a4/
New Features
* New network selection choices for contract origination and wallet pages
* Introduce TezLink (Beta) Shadownet and Community node choices
* Much improved UX for test contract to origination journey
* Improved feedback on origination status by waiting for two block confirmations before showing success
* Updated Vite and related packages
* Clicking on compile contract now loads SmartPy IDE reliably
* New implementation of the SmartPy parser in Python - behind the SMARTPY_PYTHON_PARSER env var
Bug fixes:
* Improve parser error for contract's non-decorated method
* Fix for inline Michelson type error message
* Colorize and render traceback in a standard way
* Improve source code printing in exceptions for scenarios
* Auto-estimating gas costs which fixes corresponding origination failures
and more ...
Please see https://releases.smartpy.io/0.25.0a4/releases - also available as a Jupyter Notebook: https://releases.smartpy.io/0.25.0a4/experimental-notebook/lab/index.html?path=releases%2F0.25.ipynb
Great!
Let me say that on our side we're more than thankfull for the attention you're giving to SmartPy. Thank you!
Hi Jordan and @karoshibee, can I mention you in my Master’s thesis on SmartPy? For the support you’ve given me
Читать полностью…
Oh thanks, because i'm working on a toolchain for automatic execution and testing and through python code I was calling the bash for compiling code
Читать полностью…
It's possible to compile a smartpy contract via library function instead of calling it with 'python3 contract.py' ?
Читать полностью…
Just for the record, actually, because I was keeping the raw code and the scenario separate to keep the contracts cleaner, but then I realized it wasn’t compiling—or rather, it wasn’t generating the output files correctly for deployment. So what’s the bare minimum required to get them?
@sp.add_test()Читать полностью…
def test():
sc = sp.test_scenario("SmartContract")
c1 = main.SmartContract()
sc += c1
The only way to compile a contract locally is to use the scenario? If so, why is it necessary?
Читать полностью…
there's a way to pop the first element of a list? or the last
Читать полностью…
Hi, In which version does the transition from the version marked as 'legacy' to the modern version take place?
Читать полностью…
hey @cosmycoder - nice to meet you, we're not looking for devs right now on smartpy but if you want to dm me your linkedin or cv I can pass it on?
Читать полностью…
Could you let me know which name you would prefer to be referred to by?
Читать полностью…
Yes as soon as the final version is ready i will send you a copy
Читать полностью…
Sure, do you want to send it ? We may give you feedback if you want.
Читать полностью…
If your goal is to compile from Python code instead of invoking python3 contract.py, you can do it through a test scenario: instantiate the contract, add it to the scenario, and then read the compiled code and initial storage from origination_result. Like that:
import smartpy as sp
@sp.module
def main():
class C(sp.Contract):
def __init__(self, x: sp.int):
self.data.x = x
@sp.entrypoint
def ep(self):
pass
def compile_contract(contract_ref, *args):
scenario = sp.test_scenario()
contract = contract_ref(*args)
scenario += contract
return {
"code_json": contract.origination_result["code_json"],
"storage_json": contract.origination_result["storage_json"],
"code_tz": contract.origination_result["code_tz"],
"storage_tz": contract.origination_result["storage_tz"],
}
result = compile_contract(main.C, 0)
compile_contract, you have to build it yourself.
Читать полностью…
So the michelson runtime/tezos runtime will return a list of operations to the chain to be run after the entrypoint logic is done, so this will mitigate against common reentrancy attacks, however there are still things to be aware of, e.g. see:
https://octez.tezos.com/docs/alpha/michelson_anti_patterns.html
smartpy tracks the effects of functions and entrypoints that perform operations - and should not let you run effectful stuff from non-effectful code - this should in fact be a compilation error.
See with_operations: https://smartpy.tezos.com/manual/data-types/effects.html#effects
Is the inability to read the balance of another smart contract a limitation of SmartPy, or is Michelson designed that way?
Читать полностью…
Yes, that's the only way currently.
Which alternative are you thinking of? It's not exactly that is truly necessary, simply that currently it's the way.
No...
That's a good request. Maybe a design could be x = my_list.pip(error=...) or x=my_list.pop(default=...).
I'm a bit responsible for the fact there is no such thing.
What you can do it matching over head and tail the way I showed in my zip example.