silverback icon indicating copy to clipboard operation
silverback copied to clipboard

idea: schedule "virtual" event logs

Open fubuloubu opened this issue 1 year ago • 1 comments

Overview

Allow Silverback apps to dynamically "schedule" events to occur in the future, basically receiving an event log trigger without there being any sort of actual event occuring

Specification

In Ape, we have a way to make a "Mock" Contract Log by using a ContractEvent instance directly via __call__

We could allow a user to add/remove mock events that should trigger at a particular timestamp so we can imitate "scheduling" a trigger to occur in the future, such as w/ ApePay scheduling a Stream cancellation when the stream naturally runs out of funds (which doesn't actually trigger any sort of event)

Care should be taken to ensure that it can be effectlively "unscheduled" to prevent duplicate events occuring (e.g. w/ ApePay if an actual Stream cancellation occurs, remove the mock one)

Dependencies

This might require better support for indexed args in events

fubuloubu avatar Sep 20 '24 17:09 fubuloubu

A version of this idea shipped with #254, although very different in implementation (but much more repeatable in practice/Platform use)

fubuloubu avatar Nov 14 '25 16:11 fubuloubu