-
Notifications
You must be signed in to change notification settings - Fork 137
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
feat(runtime): Add delegate keys #342
Conversation
Your Render PR Server URL is https://nomicon-pr-342.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-c90f79nh8vl7frobiod0. |
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.
@ilblackdragon content looks great, mostly cosmetic and structural change requests here.
@@ -0,0 +1,41 @@ | |||
--- | |||
NEP: 297 |
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.
Update to NEP: 342
Author: Illia Polosukhin <illia@near.org> | ||
DiscussionsTo: https://gov.near.org/t/proposal-extending-nears-account-with-aliases-and-delegated-keys/9450 | ||
Status: Draft | ||
Type: |
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.
Update to Type: Standards Track
|
||
## DelegateAction | ||
|
||
Delegate action allows to execute an action on antoher account. |
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.
*another
|
||
See updates to AccessKey.md and Actions.md | ||
|
||
## Reference Implementation |
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've updated this to be an optional section for non-Contract categories of standards like this one. Please feel free to omit.
|
||
## Specification | ||
|
||
See updates to AccessKey.md and Actions.md |
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.
We are looking to have these NEP spec artifacts as stand-alone as possible. It feels superfluous, but could you please copy the content of AccessKey.md
and Actions.md
into this section. In future new specs I am going to recommend only creating the docusaurus sections during the Last Call
phase.
@@ -48,6 +49,35 @@ pub struct FunctionCallPermission { | |||
} | |||
``` | |||
|
|||
## AccountKeyPermission::DelegateCall | |||
|
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.
Please add the following warning section:
:::caution
This is part of proposed spec [NEP-342](https://github.com/near/NEPs/blob/master/neps/nep-0342.md) and subject to change.
:::
@@ -276,3 +277,29 @@ DeleteAccountStaking { account_id: AccountId } | |||
|
|||
**Execution Error**: | |||
- If state or storage is corrupted, a `StorageError` is returned. | |||
|
|||
## DelegateAction | |||
|
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.
Please add the following warning section:
:::caution
This is part of proposed spec [NEP-342](https://github.com/near/NEPs/blob/master/neps/nep-0342.md) and subject to change.
:::
Hi @ilblackdragon (or anyone who is interested in championing this NEP forward), we are cleaning the NEP backlog and noticed that this PR is still in "Draft" mode. Therefore, we are re-labeling this PR as "Needs author revision." Please ping the @near/nep-moderators once you are ready for us to review it. We will review it again in April, unless we hear from you sooner. We typically close NEPs that are inactive for more than two months, so please let us know if you need more time. |
@itegulov might be |
Hello! Protocol NEP moderator here. Another ping on the matter as it seems there hasn't been any activity on this NEP for quite some time. Is it still on going? Or shall we close NEP for now? |
This is outdated now. Thanks! |
Summary
Delegate keys allow to assign permissions to another account instead of a key.
This allows to delegate ownership of an account by giving set of permissions that are usually restricted only to FullAccessKey.
Motivation
Issue that became evident trying to develop upgradability patterns for contracts is complexity of going from full access key on the contract to a contract managed by multisig or a DAO.
Right now it is required to implement a complex logic of upgrading contract and managing assets/control inside the contract in the first version to allow “owner” account to call these methods.
Rationale and alternatives
Specification
See updates to AccessKey.md and Actions.md
Reference Implementation
TBD
Drawbacks
This adds complexity to the account model.
Copyright
Copyright and related rights waived via CC0.