-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Pact Events #819
Support Pact Events #819
Conversation
-- otherwise push, test, pop and install onto head | ||
evalComposed = checkManaged i af cap cdef >>= \r -> case r of | ||
Nothing -> push >> test >> popCapStack installComposed | ||
Just composed -> installComposed (CapSlot scope cap composed) | ||
Just composed -> emitCap >> installComposed (CapSlot scope cap composed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice - we only emit on successful install, and install is a pure function.
data PactSuccess = PactSuccess | ||
{ _successValue :: PactValue | ||
, _successEvents :: [PactEvent] | ||
} deriving (Eq, Show, Generic) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should strictify this data.
{ _eventName :: QualifiedName | ||
, _eventParams :: [PactValue] | ||
, _eventModuleHash :: ModuleHash | ||
} deriving (Eq, Show, Generic) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strictify?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and I also broke into Text
+ ModuleName
, mainly because of the Info
in qualified name messing up the JSON, but also allows for indexing on name/topic alone (ie all TRANSFER
s, not just coin.TRANSFER
etc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs looks good, but I added some formatting suggestions.
Co-authored-by: Linda Ortega <LindaOrtega@users.noreply.github.com>
Co-authored-by: Linda Ortega <LindaOrtega@users.noreply.github.com>
Resolves #818