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

Authorized agent [MTG-679] #38

Closed
wants to merge 4 commits into from
Closed

Authorized agent [MTG-679] #38

wants to merge 4 commits into from

Conversation

StanChe
Copy link
Contributor

@StanChe StanChe commented Sep 26, 2024

We've missed a separate authority that allows access to stake-provided features without risking the exposure of the voter authority. This PR does exactly that.
The role is named Authorized agent - its pubkey is acting as authorized rep of staking contract and may be safely stored on services that may require it - like a backend to authorize batch mints, or Aura node in a P2P authentication.

Help required

adding tests - this should be straightforward

@StanChe StanChe changed the title Feature/authorized agent Authorized agent [MTG-679] Sep 26, 2024
pub struct ChangeAuthorizedAgent<'info> {
pub registrar: AccountLoader<'info, Registrar>,

// checking the PDA address is just an extra precaution,
Copy link
Collaborator

Choose a reason for hiding this comment

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

redundant comment since the body of the method doesn't do any checks

Copy link
Collaborator

@kstepanovdev kstepanovdev left a comment

Choose a reason for hiding this comment

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

LGTM.
However, this PR should've probably been made into audit-fixes branch because it's the primary target for the deployment.

@StanChe
Copy link
Contributor Author

StanChe commented Sep 27, 2024

Closing in favor of #39

@StanChe StanChe closed this Sep 27, 2024
@kstepanovdev kstepanovdev deleted the feature/authorized_agent branch September 27, 2024 12:51
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.

2 participants