https://smartpy.io/ https://twitter.com/smartpy_io
Thaddeusl Varrighacaneyd has been banned! Reason: CAS ban.
Читать полностью…https://smartpy.io/ide?cid=QmfF5o2dTUSMrDzp6hVaxuFTjHhP8SpZL9xnQxAaQr55hY&k=8740efd2f058852565bf
It should be something like this. I'm coding with my phone so I can't do much more 🙂
The local dev page contains ai instructions so you can help the ai give you not outdated code.
Читать полностью…Google returns a detailed example, but my experience has been the syntax is usually wrong. Obviously the free Google AI is not to be trusted
Читать полностью…Can you use the share button of the ide and select ipfs and paste the link here or in private if you prefer?
Читать полностью…Google seems to return information on deprecated versions of smartpy
Читать полностью…You should put addresses in the map, not string. You should not need any slice.
Читать полностью…self.data.approved_delegators = {}
for item in delegator_list:
address_str = sp.slice(0, 36, item)
this_address = sp.cast(address_str,sp.address)
this_balance = sp.slice(37,16,item)
self.data.approved_delegators[this_address] = sp.record(yay=False,nay=False,_pass=False,level=0,balance=this_balance)
Hello, you can't do that without a strange hack. You should not be needed this.
Why is delegator_list not a sp.list[sp.address]
?
def init(self,delegator_list: sp.list[sp.string]):
self.data.approved_delegators = {}
for item in delegator_list:
address_str = sp.slice(0, 36, item)
this_address = sp.address(address_str)
Arf, better call dev isn't accepting a file as a storage. Can you share the contract smartpy code? In private if you want using the IDE share button.
Читать полностью…Hey,anything is appreciated! I'm away from home now and will check later
Читать полностью…https://smartpy.io/ide?cid=QmYakmk7robvuzcNvZT5ATjREGC9SfgDX3xUMQnhsSpVGJ&k=06593de610f2d92bf494
Читать полностью…So, basically, my goal is to have delegators use a dApp, connect with their wallet, so that that sender value from the wallet transaction can be validated against a map or list of delegators in storage
Читать полностью…It's mainly the Google AI responses that appear to be outdated. The actual websites returned don't answer my specific questions, and I have been unable to find examples that come close enough to my use case in the smartpy.io manual. For example search Google for 'smartpy how to deploy a contract with a map"
Читать полностью…Can you indicate me the deprecated info links?
You may want to look at https://smartpy.tezos.com/manual/introduction/local_development.html#local-development
I wasn't sure how to pass a map to init when deploying the contract. Does the map have to be in Michelson format?
Читать полностью…...trying to initialize the contract with a list of strings to feed the map
Читать полностью…and that might be part of the problem. I'm trying to build a map
Читать полностью…this_address = sp.cast(address_str,sp.address)
sp.cast: Expected type sp.address, but got sp.option(sp.string).
smartpy.services.ParseError: :10: SyntaxError: sp.address: wrong number of arguments: : (10,32)-(10,54)
Читать полностью…In smartpy can you create an address object with a variable as the argument to sp.address()? For some reason, smartpy.io IDE is not letting me
Читать полностью…Vivienlibav Scckerdydonach has been banned! Reason: CAS ban.
Читать полностью…