TokenScript Weekly Meeting #33

This is held on May 14th 2020 but I, unfortunately, lost the file being discussed in a git accident, this is from memory:

  1. If an attribute has just one origin which is an ethereum:call, the value should be cached to be used to directly render a view, and updated as frequently as needed.

  2. If an attribute has just one origin which is an ethereum:event, the event is cached in its entirety (as another attribute may originate from the same event) and the attribute value updated if the event is replaced by a newer. notification service helps in this case.

  3. If an attribute is almost always outdated, it's marked volatile with ttl="0". e.g. if the return value is the block height.

  4. If an attribute has 2 origins, and an event is placed before a call, the event takes precedence and the call is only used for initialisation (e.g. when the user installs αW for the first time). This situation is a bit complicated because the engine searches for events after the call and replace the cached call return value with the event instead.

  5. If an ethereum:event doesn't have a select, it's used to trigger the engine to make an ethereum:call. This happens e.g. when event and call are in a different contract. @hboon proposed that instead of using select, wrap the call inside the event, like this:

<origin>
    <ethereum:event …>
        <ethereum:call …/>
    </ethereum:event>
</origin>

to which I agreed. The final version will also take attestation origin in and we will review when that happens.