feat: updated emit_unencrypted_log with contract address and topic#2582
Closed
benesjan wants to merge 2 commits into
Closed
feat: updated emit_unencrypted_log with contract address and topic#2582benesjan wants to merge 2 commits into
benesjan wants to merge 2 commits into
Conversation
PhilWindle
reviewed
Sep 29, 2023
| // --> might be a better approach to force devs to make a public function call that emits the log if needed then | ||
| // it would be less easy to accidentally leak information. | ||
| // If we decide to keep this function around would make sense to wait for traits and then merge it with emit_unencrypted_log. | ||
| fn emit_unencrypted_log_from_private<T>( |
Collaborator
There was a problem hiding this comment.
Did you create this function so that it is easy to identify what to remove if we choose to do so?
Contributor
Author
There was a problem hiding this comment.
It was one of the reasons.
But the main one was that if I wanted to have 1 function for use in both private and public contexts I would have to use the Context wrapper and that seemed like too much of a boilerplate.
I would have to use:
emit_unencrypted_log(Context::public(&mut context), "Coins transferred");
Instead of:
emit_unencrypted_log(&mut context, "Coins transferred");
Contributor
Author
|
Replaced with #2595 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2580
Fixes #2581
Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge.