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

Minor improvements to Account package #1224

Merged
merged 5 commits into from
Nov 20, 2024

Conversation

immrsd
Copy link
Collaborator

@immrsd immrsd commented Nov 19, 2024

PR Checklist

  • Tests
  • Documentation
  • Added entry to CHANGELOG.md
  • Tried the feature on a public network

@immrsd immrsd self-assigned this Nov 19, 2024
Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.08%. Comparing base (f502aeb) to head (2f56164).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1224      +/-   ##
==========================================
- Coverage   92.12%   92.08%   -0.04%     
==========================================
  Files          49       49              
  Lines        1397     1390       -7     
==========================================
- Hits         1287     1280       -7     
  Misses        110      110              
Files with missing lines Coverage Δ
...kages/access/src/accesscontrol/accesscontrol.cairo 73.33% <ø> (ø)
packages/account/src/account.cairo 97.91% <100.00%> (-0.20%) ⬇️
packages/account/src/eth_account.cairo 98.11% <100.00%> (-0.17%) ⬇️
packages/account/src/extensions/src9/src9.cairo 91.66% <ø> (ø)
packages/account/src/utils.cairo 90.90% <100.00%> (+3.40%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f502aeb...2f56164. Read the comment docs.

---- 🚨 Try these New Features:

Copy link
Member

@ericnordelo ericnordelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

} else {
assert(MIN_TRANSACTION_VERSION <= tx_version, Errors::INVALID_TX_VERSION);
}
assert(is_tx_version_valid(), Errors::INVALID_TX_VERSION);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

Copy link
Collaborator

@andrew-fleming andrew-fleming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some non-blocking comments regarding the changelog. Otherwise, LGTM!

Comment on lines -79 to +76
// Check tx version
let tx_info = get_tx_info().unbox();
let tx_version: u256 = tx_info.version.into();
// Check if tx is a query
if (tx_version >= QUERY_OFFSET) {
assert(
QUERY_OFFSET + MIN_TRANSACTION_VERSION <= tx_version, Errors::INVALID_TX_VERSION
);
} else {
assert(MIN_TRANSACTION_VERSION <= tx_version, Errors::INVALID_TX_VERSION);
}
assert(is_tx_version_valid(), Errors::INVALID_TX_VERSION);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

packages/account/src/utils.cairo Show resolved Hide resolved
packages/account/src/utils.cairo Show resolved Hide resolved
@immrsd immrsd merged commit 45b9a72 into OpenZeppelin:main Nov 20, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants