TokenScript-Examples icon indicating copy to clipboard operation
TokenScript-Examples copied to clipboard

attribute value caching needs a dependency graph

Open SmartLayer opened this issue 4 years ago • 0 comments

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 has ref=…
  • [ ] an attribute defined in a token which has an ethereum:call origin that has ref=… to another attribute defined in the token (i.e. not tokenID)
  • [ ] 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:

  1. A list of events to watch for (including the filters)
  2. For each of these events, a list of attributes to update (if its value is not already in the event).
  3. For each card, the events and attributes relevant to update / retrieve its own attributes

(related work is being done on dependency-graph branch)

SmartLayer avatar May 27 '20 07:05 SmartLayer