TokenScript-Examples
TokenScript-Examples copied to clipboard
attribute value caching needs a dependency graph
Need the following cases to test the dependency graph generation.
- [x]
local-ref
to an undefined attribute (therefore its value can only be from a view) - [ ]
local-ref
to an attribute defined without<origins>
- [ ] an attribute defined in a card whose origin is an
etheruem:call
that hasref=…
- [ ] an attribute defined in a token which has an
ethereum:call
origin that hasref=…
to another attribute defined in the token (i.e. nottokenID
) - [ ] like the one above, but with a looping reference (which shouldn't be allowed)
Most of these cases also need events.
@James-Sangalli @JamesSmartCell @hboon if you remember an example like that please commend so we can complete the examples.
The goal is to get a portable script (portable = between iOS and Android) that:
Take input: installed TokenScripts.
Output:
- A list of events to watch for (including the filters)
- For each of these events, a list of attributes to update (if its value is not already in the event).
- For each card, the events and attributes relevant to update / retrieve its own attributes
(related work is being done on dependency-graph
branch)