-
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
add permissioned signer move code #15735
Conversation
⏱️ 2h 25m total CI duration on this PR
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
39bee7e
to
b2eadad
Compare
fd6ef05
to
6c56a97
Compare
b2eadad
to
4aff032
Compare
6c56a97
to
95d2640
Compare
4aff032
to
dbb1cda
Compare
ce32584
to
bb58864
Compare
// Native Functions | ||
/// | ||
/// Check whether this is a permissioned signer. | ||
public native fun is_permissioned_signer(s: &signer): bool; |
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.
this cannot be public in a first release.
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 think this needs to be public so that 3rd party can at least abort on permissioned signer if needed
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.
@runtian-zhou is that needed for first release?
this is not backward compatible - you cannot add new public native function in one release.
if you think this is critical , you need to make this not be native, and have is_permissioned_signer_impl be private and native (and you can register both in rust code, so that you can later remove is_permissioned_signer_impl and change is_permissioned_signer to native
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.
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 the natives.
bb58864
to
7279808
Compare
"is_permissioned_signer_impl", | ||
native_is_permissioned_signer_impl as RawSafeNative, |
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.
you should put both in the list here (pointing to the same native_is_permissioned_signer_impl
, so you can deprecate is_permissioned_signer_impl
later
} | ||
|
||
/// initialize permission storage by putting an empty storage under the address. | ||
inline fun initialize_permission_address(permissions_storage_addr: address) { |
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.
move this function below, in the private section.
7279808
to
da38949
Compare
aptos-move/framework/aptos-framework/sources/permissioned_signer.move
Outdated
Show resolved
Hide resolved
55cbb90
to
f928323
Compare
…er.move Co-authored-by: Aaron <[email protected]>
f928323
to
05937d0
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
Description
Clone of #14469 due to rebase error
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