Open spencercorwin opened 3 years ago
Look at how we use interfaces as generics in SmartContract.for<T>()
in the compiler to do something similar with notifications. If the user knows what a notification's structure will be when we can have them define that with an interface that is passed into something like Notification.for<T>(address)
. That way we don't have to define every possible stack item in the compiler, which seems non-sensical
We should probably add a way to get arbitrary notifications from any contract with something like
Notifications.from(Address.from(<address-string>))
which will return an array of builtinNotification
s for the smart contract to parse for whatever logic. This is somewhat difficult and complex.