I want to create my smart token or something else with the following requirements:
- Sent tokens from one smart account to another and back again multiple times.
- Each token must have initial owner, it is an account variable, it will be set once and will be saved inside the separate token.
- Smart account should iterate their own tokens and call its script to get token initial owner ‘flag’ data storage value, or call smart asset script that will call owner.data[‘flag’] to read corresponding value with ‘flag’ key from owner’s account data storage.
Is something like this possible? Could you comment each point separately in detail? I’ve red smart-assets doc but cannot understood can I solve my task or not.
So, I’m sorry if my descriptions sounds like a fairy tales, I have only experience with Ethereum.
Some how? Someone has access to my wallet! Is this what your talking about?
First of all, there is no such thing as an iteration in RIDE. The RIDE script is just a latch, that allow or disallow to move money from scripted account. If this latch is set on an asset, it allows or disallows some transactions with this asset.
So, to do what you want, you need an external service to push transactions to an account. This service will iterate over the data in the data state of given accounts and create transactions.
I understand concerning RIDE, but what about point #2?
Can I attach some different data for the same tokens like ‘owner’, ‘myFlag’ etc.? I want to attach this data to group of tokens before I will send it to another account. So, my task is if some account have tokens, my external service have to separate it by ‘owner’ property then I ask owner their ‘data’ state and do calculations using complex logic by tokens and their ‘data’ state. I do not want to issue different tokens, I want to storage data in one kind of tokens.
I’m not talking about access to your wallet. Your wallet data storage already public:)
No, it’s impossible for now. We’re considering token classes, which will allow such things. But it’s only a proposal.
What do you want to do? May be it could be done other way? For example, you can store in account’s state the number of tokens given to different addresses.If it helps to achieve what you want.
Yes, I will try to use just data-transactions and create fake accounts for my other data-things and will try to solve my task without tokens, just data. I will try it, I believe it will work)