Skip to content
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

fix(contracts): OZ-N08 Inconsistent Order of Event Emissions #876

Merged
merged 3 commits into from Aug 25, 2023

Conversation

zimpha
Copy link
Member

@zimpha zimpha commented Aug 25, 2023

Purpose or design rationale of this PR

This PR fixed the issue reported by Openzepplin (N-08 Inconsistent Order of Event Emissions). The following are the details:

Throughout the codebase, events are emitted after the corresponding storage has changed. However, in revertBatch in ScrollChain , the RevertBatch event is being emitted before resetting the batch value.

To improve the readability and consistency of the codebase, consider always following the same order of operations when emitting an event in response to a change in the state of the contract.

PR title

Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:

  • fix: A bug fix

Deployment tag versioning

Has tag in common/version.go been updated?

  • No, this PR doesn't involve a new deployment, git tag, docker image tag
  • Yes

Breaking change label

Does this PR have the breaking-change label?

  • No, this PR is not a breaking change
  • Yes

@zimpha zimpha added the bug Something isn't working label Aug 25, 2023
@zimpha zimpha self-assigned this Aug 25, 2023
Thegaram
Thegaram previously approved these changes Aug 25, 2023
@github-actions
Copy link

github-actions bot commented Aug 25, 2023

LCOV of commit 02d525b during Contracts #1325

Summary coverage rate:
  lines......: 54.1% (972 of 1798 lines)
  functions..: 71.1% (216 of 304 functions)
  branches...: no data found

Files changed coverage rate: n/a

@codecov
Copy link

codecov bot commented Aug 25, 2023

Codecov Report

Merging #876 (02d525b) into develop (3499c59) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #876   +/-   ##
========================================
  Coverage    51.28%   51.28%           
========================================
  Files           60       60           
  Lines         5588     5588           
========================================
  Hits          2866     2866           
  Misses        2483     2483           
  Partials       239      239           
Flag Coverage Δ
common 55.43% <ø> (ø)
coordinator 19.15% <ø> (ø)
database 42.85% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@HAOYUatHZ HAOYUatHZ merged commit 6631569 into develop Aug 25, 2023
22 checks passed
@HAOYUatHZ HAOYUatHZ deleted the fix/OZ-N08 branch August 25, 2023 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants