PROTO-576: Update Portal Auth ix#177
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Portal program's authority configuration by changing the Portal program ID and adding functionality to update the portal authority through the Earn program.
- Updated the Portal program's public key to a new address
- Added a new CLI command
update-portal-authorityto update the portal authority - Implemented the
update_portal_authorityinstruction in the Earn program
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| services/cli/main.ts | Updated Portal program ID and added CLI command to update portal authority |
| programs/earn/src/lib.rs | Added public function to expose the update_portal_authority instruction |
| programs/earn/src/instructions/admin/update_portal_authority.rs | Implemented the UpdatePortalAuthority instruction handler |
| programs/earn/src/instructions/admin/mod.rs | Removed unused AdminAction struct and added update_portal_authority module export |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Oighty
left a comment
There was a problem hiding this comment.
Pretty straight forward. Left a couple comments.
There was a problem hiding this comment.
The update portal authority ix looks good. Just to make sure I understand the changes required:
- We need to update the
portal_authorityin the Earn program bc that allows us to unfreeze the M ATA that is owned by the new authority so that the portal has a "custody" token account to mint + transfer from. This PR solves that. - We also need to update the
mint_authorityon the M mint account from the current portal authority to the new one. I believe that requires the existing mint authority to sign the txn to do that.It seems like we either need to have an intermediate upgrade that has an ix that allows us to transfer this authority OR we need to add an instruction on the wormhole bridge adapter.I realized that the existing portal program has this functionality.
Correct. The portal authority also needs to be updated on Earn because its going to be signing the propagate index CPI |
No description provided.