-
Notifications
You must be signed in to change notification settings - Fork 13
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
Accessing emitted events #92
Conversation
|
||
let ret = match &result.result { | ||
Ok(exec_result) if exec_result.result.did_revert() => { | ||
Err(SessionError::DeploymentReverted) | ||
} | ||
Ok(exec_result) => { | ||
let address = exec_result.account_id.clone(); | ||
self.deploy_returns.push(address.clone()); | ||
self.record.push_deploy_return(address.clone()); |
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.
Isn't address a Copy
type?
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.
nope, we are relying on the trait bounds from frame_system
which do not impose Copy
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.
Code around event/result decoding is so similar to what there is in the ink-wrapper
<-> drink!
integration that it makes me wonder whether we're not taking it a bit too far on either side (drink! or ink-wrapper) and start duplicating the work.
Implementing https://github.com/orgs/inkdevhub/projects/2/views/1?pane=issue&itemId=34267897
In order to simplify a bit
Session
object, we introduceRecord
type that collects all the results, returns and events that have been produced by contract interactions during a session.