-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
create permissioned signer example #14469
create permissioned signer example #14469
Conversation
⏱️ 1h 48m total CI duration on this PR
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #14469 +/- ##
========================================
Coverage 60.0% 60.1%
========================================
Files 856 856
Lines 210625 211026 +401
========================================
+ Hits 126555 126865 +310
- Misses 84070 84161 +91 ☔ View full report in Codecov by Sentry. |
887d7a2
to
456f5f4
Compare
55771fc
to
070a951
Compare
aptos-move/framework/aptos-framework/sources/permissioned_signer.move
Outdated
Show resolved
Hide resolved
aptos-move/framework/aptos-framework/sources/permissioned_signer.move
Outdated
Show resolved
Hide resolved
6ddb481
to
8b92b98
Compare
8b92b98
to
fa646c8
Compare
c3aba3a
to
50b556b
Compare
aptos-move/framework/aptos-framework/sources/permissioned_signer.move
Outdated
Show resolved
Hide resolved
aptos-move/framework/aptos-framework/sources/permissioned_signer.move
Outdated
Show resolved
Hide resolved
aptos-move/framework/aptos-framework/sources/permissioned_signer.move
Outdated
Show resolved
Hide resolved
aptos-move/framework/aptos-framework/sources/permissioned_signer.move
Outdated
Show resolved
Hide resolved
1b8ce69
to
c7fcc0e
Compare
ae32259
to
a12a4c1
Compare
bcd5d8b
to
950cee8
Compare
8bb63e9
to
0d1e3e3
Compare
950cee8
to
dce566c
Compare
0d1e3e3
to
eca655d
Compare
dce566c
to
43bca73
Compare
eca655d
to
505aa5b
Compare
43bca73
to
e0acd0d
Compare
505aa5b
to
c490a98
Compare
e0acd0d
to
c636530
Compare
c490a98
to
299f758
Compare
c636530
to
7be76a1
Compare
299f758
to
b5e81dc
Compare
7be76a1
to
fff45bf
Compare
b5e81dc
to
3b84051
Compare
fff45bf
to
4711888
Compare
3b84051
to
90813bb
Compare
4711888
to
23524b5
Compare
90813bb
to
a448e72
Compare
23524b5
to
20fa44c
Compare
a448e72
to
ca2f656
Compare
aptos-move/framework/aptos-framework/sources/permissioned_signer.move
Outdated
Show resolved
Hide resolved
if (big_ordered_map::contains(perms, &key)) { | ||
let value = perms.remove(&key); | ||
let return_ = mutate(&mut value); | ||
perms.upsert(key, value); |
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.
since you are removing, you can just call add
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.
Done
} | ||
} | ||
|
||
/// Authorizes `permissioned` with a given capacity and increment the existing capacity if present. |
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.
I agree, I think we do have a convention in all of framework code to put private and public(friend) functions below the fold, and put public functions at the time.
if (big_ordered_map::contains(perms, &key)) { | ||
let value = perms.remove(&key); | ||
mutate(&mut value); | ||
perms.upsert(key, value); | ||
} else { | ||
big_ordered_map::add(perms, key, default); | ||
} |
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.
use move2 syntax (and elsewhere)
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.
Updated code
ca2f656
to
d035654
Compare
e72786a
into
09-04-implement_rust_logics_for_permissioned_signer
Description
Implemented aptos framework code for the permissioned signer.
Type of Change
Which Components or Systems Does This Change Impact?
How Has This Been Tested?
Implemented tests to cover the entire lifecycle of a permission handle.
Key Areas to Review
Whether the api is safe to use.
Checklist