https://smartpy.io/ https://twitter.com/smartpy_io
hi is the migration still ongoing? DNS lookup for the domain is failing
Читать полностью…I think it is something like 500 req per minute but I'll have to check with the infrastructure people who now run it
Читать полностью…Hello, the URLs are https://mainnet.smartpy.io and https://ghostnet.smartpy.io
No API keys needed.
Hi, first congratulations !
I'll ask to the infra specialists on our side and answer you back.
Hello all, we will be working on the mainnet RPC this afternoon to switch it over to google cloud hosting. Hopefully there will be minimal downtime but expect a few minutes out at around 3pm UK time.
Читать полностью…It's running the last in https://smartpy.io/releases meaning 0.19.1
Читать полностью…Sorry to return to this topic, does sub_list
only work with list[int]
?
if anyone is interested:
https://github.com/AxelRoffi/Tezos-Smart-Contracts-Development-Course
Hello, anyone knows where i can find the repo for the freecodecamp course "Tezos Blockchain Developer Course – Python Web3 Development"
? I contacted the author on Slack, but not sure he's still active at Nomadic Labs
Thank you very much, yes now through my docker container and 0.19.2a4 it works.
Читать полностью…here's how I set it up to test:
$ python3 -m venv test-envЧитать полностью…
$ test-env/bin/python3 -m pip install tezos_smartpy-0.19.2a4-py3-none-any.whl
$ cd example-with-spy-files
$ ../test-env/bin/python3 ./test_a_b.py
Thank so much for all the support.
Unfortunately I'm facing another error.
The version of python I'm running is 3.12.5 and the smartpy version is 0.19.2a4
Читать полностью…
isacco@macbookpro-1 examples-with-spy-files % python3 test_a_b.py
Traceback (most recent call last):
File "examples-with-spy-files/test_a_b.py", line 4, in <module>
@sp.add_test()
File "examples-with-spy-files/test_a_b.py", line 25, in test
A = scenario.add_module("./module_A.spy")
AttributeError: 'str' object has no attribute 'sexpr
apologies for the bad error messages, some things to note with this new importing system,
* you should only need to include the top level module in the test code scenario = sp.test_scenario(name="Test", modules=A)
and so you also dont need to do the python import from contracts.contract_B import module_B as B # (contract_B.py)
in the test scenario either
* as with other examples we have to distinguish between smartpy code and actual python code, so smartpy imports are different to python imports. with inlined modules this means having to do a python import to bring them into scope, then a smartpy import to actually use them. Another difference is that smartpy imports only support import X
or import W.X.Y as Z
forms.
* I agree this is awkward but things are clearer if you just use .spy files - but inline modules are still necessary for other use cases (e.g. current web ide) - and understand you may not want to convert everything to spy files either
* some examples in the templates for .spy files would be test_rng.py
which imports rng.spy
and threefry.spy
via add_module
* the fa2_1 libs and tests now make extensive use of importing inline modules, first bringing them into scope with a python import and then using them in smartpy with a smartpy import
Hello all, just to say that later on today at around 3pm we will be switching over the rest of the SmartPy infrastructure (website etc) to google cloud. Hopefully there won't be any significant downtime but there may be some small interruptions whilst new SSL certificates are provisioned.
Читать полностью…Okay Can you please confirm for both ghostnet and mainnet
Читать полностью…Hi Jordan, I'm going live on mainnet so which RPC url I should use ? also does it contain any API_KEY ?
Читать полностью…It seems that there are some errors in this utils.
Sorry for that.
You can change it with "return reversed(res)".
I'm reporting to the team.
Jordan sorry for noob questions, but what version of smartpy is https://smartpy.io/ide running?
Читать полностью…Here is the code of sub_list:
def sub_list(abc):
"""Compute the portion of a list that contains elements starting at from_index and extends up to element at to_index-1.
Parameters:
abc (sp.tuple[sp.list[sp.int], sp.int, sp.int]: A tuple with the values '(elements, from_index, to_index)'.
Returns:
sp.list[int]: A portion of the original list from 'from_index' (inclusive) up to 'to_index' (exclusive).
Examples:
import smartpy.list_utils as list_utils
sp.pack(list_utils.sub_list(([1, 2, 3, 4, 5], 1, 2))) == sp.pack([2, 3])
sp.pack(list_utils.sub_list(([1, 2, 3, 4, 5], 1, 3))) == sp.pack([2, 3, 4])
"""
(elements, from_index, to_index) = sp.cast(
abc, sp.tuple[sp.list[sp.int], sp.int, sp.int]
)
assert from_index <= to_index
res = []
idx = 0
for v in elements:
if idx >= from_index and idx < to_index:
res.push(v)
idx = idx + 1
return res
Buena tarde, podrían proporcionar un teléfono para contacto
Читать полностью…Hey, I have another question. When working with lists, is it possible to pop or delete a specific element? I checked the docs page, but I couldn’t find a way to do it.
https://releases.smartpy.io/0.19.2a4/manual/data-types/lists-sets-and-maps
EDIT: I found what I need: https://releases.smartpy.io/0.19.2a4/manual/stdlib/library#sub_list
note only the first python call uses the global python3, the others use the venv one
Читать полностью…hmm, are you sure you are picking up the correct version of smartpy? I get that same error when I run test_a_b.py
with a normal python env that has smartpy 0.19.1 installed.
Here's the same example but with .spy files instead - I think it is simpler, and clearer as to what is smartpy code and what is python code
Читать полностью…