smartpy_io | Unsorted

Telegram-канал smartpy_io - SmartPy

429

https://smartpy.io/ https://twitter.com/smartpy_io

Subscribe to a channel

SmartPy

The legacy syntax has sp.utils.wrap_entry_point(...), it can be used in test() . The result is a compiled lambda.
https://legacy.smartpy.io/docs/helpers/utils#wrap-entrypoint

Читать полностью…

SmartPy

https://smartpy.io/ide?code=eJytk02PmzAQhu_8itHmAtqsU@gtElKrHFtVvaRXNIFJYhVsyzbbJL@@_gDCRrtt@uEL_njnncdmhndKagumQ23VGdCAUUmy@OuRLGCrDhob3LUEGymsxtqCPaKF3pCBFrtdg8bpjtYqs16tLF2kYQduW9wxLlcdr4_UGimeNO1Jk6hptbBnRU8x9l_okuSDUayTTd9S0tAeOuQizdYJuFG3aMwMP3XS8QaDxA8fVlVccFtVqaF2v4RnbHtaQisPvJ4p_fAC1qBFFkRQRvEbmuDgNOGbTCIPTQ7krCQX9gVJjW09UHiH32a_yZWGoLsy9cpp6XOIigl_fd9X7mLzNfg_6TkU01RL3aSn0s0F2iWch1kWxcVd4iVcprAQt4DACN9IGy4F5JCenDya@osEoDy9ea5eKKy_UxPTxVXQLB125jZ@aFSVkR2lpLXU5cMGhZAWtl@@ftx8esgmJ02212IyZCd4vC7Or0MWEdJd5oaz@BPO4j9yzheXoXGwaSpLxqZZaJ44jWimJoGay4jlT6pxK3249tSQfjxix_zmNHZi7mx8a7JZN4YKLt8NZVeG4_grX3rCY@kMxmfeGooB8DzWw5CCxdZRLLzgvMRyX11Flk0FtQ2lP_hYOVkVo9W8N65gRfY2RXEnhS_v9x7lJzf9pIc-

this example demonstrates how to update logic using a simple lambda. How does it work with lambdas that have read-write access to storage?

Читать полностью…

SmartPy

There is no public version of the source for the 10.1 but I have the private repo.
I'll try to build you the binary. I'll have a look on Monday.

Читать полностью…

SmartPy

this code is not public and security relevant, so i dont feel comfortable sharing it sorry 😊

Читать полностью…

SmartPy

as it is just a very small change i need to make it would be more convenient to compile with the exact version :)

Читать полностью…

SmartPy

hey everybody :) i need to recompile an old contract that used v0.10.1 cli. could you help me get that specific cli-version? thanks a lot 😁

Читать полностью…

SmartPy

If it's given as an argument yes.


def f(...):
pass

def g(self, param):
param.f(...)


g(sp.record(f=f, ...))

Читать полностью…

SmartPy

This is about to change. For now, you can provide a record with fields being the arguments.

Читать полностью…

SmartPy

Actually it's possible outside of the modules, in the tests.

Читать полностью…

SmartPy

Great!
sp.bytes(...) cannot work dynamically but there may be solutions depending on your use case. What do you want to do excatly? Why do you want to do that?

Читать полностью…

SmartPy

actually it worked in a new virtual env. Will report back if I run into the same issue again

Читать полностью…

SmartPy

Not that we are aware of. The same code works on x64? Would you mind sharing the code?

Читать полностью…

SmartPy

Вероника has been banned! Reason: CAS ban.

Читать полностью…

SmartPy

Florin Bourgeois has been banned! Reason: CAS ban.

Читать полностью…

SmartPy

Hey there. I have a question about using the FA2 library to define my own token contract.
Is there a way to remove the next_token_id from the original storage? I've already included the token_id in the parameters when I override the mint entrypoint.

Читать полностью…

SmartPy

also any way to compile lambdas? trying something like

class LambdaHelper(sp.Contract):
def __init__(self, code):
self.data = sp.cast(code, t_lambda)

then Instantiating in a "test", extracting the storage.tz and deploying via pytezos but I can't get it to work

Читать полностью…

SmartPy

thank you very much, cli version 10.0.1 would be awesome☺️🙏

Читать полностью…

SmartPy

any chance i could get an old binary or could you tell
me how to build an older version from source? 😁

Читать полностью…

SmartPy

Would you mind sending me the code?

Читать полностью…

SmartPy

Hello, what a question!
Would it be ok to adapt it to the new cli and compile or you want the exact same version with the exact same michelson?

Читать полностью…

SmartPy

📣 We have released a new SmartPy alpha v0.23.0a2! 🎉

https://releases.smartpy.io/0.23.0a2

This alpha release includes
* The proposed Seoul protocol as the default choice for protocols, Paris protocol is removed & we've updated to octez-client 23.0,
* We are now on PyPi (https://pypi.org/project/smartpy-tezos) and have renamed the main installable to smartpy-tezos - just do pip install smartpy-tezos,
* More syntax additions (pattern matching the head/tail of a list), thirdparty library updates and documentation improvements.

Please see the release notes (https://releases.smartpy.io/0.23.0a2/releases) for more details. 🚀

Читать полностью…

SmartPy

can a private function call another private function?

Читать полностью…

SmartPy

private functions can only take one parameter?

Читать полностью…

SmartPy

OK, I see! Actually I know I can work past this issue. I only need it during prototyping actually, was just wondering if I'm missing something since I remember this was possible in older versions of smartpy

Читать полностью…

SmartPy

ok i got it to work... question about byte literals: can I dynamically create a byte literal in contract code? For example: sp.bytes("0x" + my_string.encode().hex()) -> I get SyntaxError: sp.bytes: wrong number of arguments

Читать полностью…

SmartPy

actually I was starting to develop something on linux and had some other issues as well so wanted to continue developing on macos but then I couldn't even get it to run. Let me check with the welcome template

Читать полностью…

SmartPy

hi guys! are there any known issues with the newer smartpy versions and apple silicon? I've been looking into it to see if I want to swtich but having troubles getting it to run on macos (M1)

raise Exception(f"parser interaction error: exit status {proc.returncode}")
Exception: parser interaction error: exit status

Читать полностью…

SmartPy

Daniella has been banned! Reason: CAS ban.

Читать полностью…

SmartPy

Before answering your question, I suggest you to override the all_tokens off-chain view if that's not already done.

Now, I think we don't have any system to remove storage attribute after having defined it because it would allow to many hacks that may lead to inconsistent behavior.

In your case, that would be perfectly legit to remove this attribute so the simplest thing I can think of is to copy-paste the whole library and remove it there. You can replace the mint entrypoint by pass and keep your code.

Читать полностью…

SmartPy

What are the problems?

Читать полностью…
Subscribe to a channel