-
Notifications
You must be signed in to change notification settings - Fork 251
feat(oft-solana): create new instruction for renouncing freeze authority #1144
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
base: main
Are you sure you want to change the base?
Conversation
|
The changes in the anchor program look good to me. |
examples/oft-solana/programs/oft/src/instructions/renounce_freeze.rs
Outdated
Show resolved
Hide resolved
examples/oft-solana/programs/oft/src/instructions/renounce_freeze.rs
Outdated
Show resolved
Hide resolved
examples/oft-solana/programs/oft/src/instructions/renounce_freeze.rs
Outdated
Show resolved
Hide resolved
examples/oft-solana/programs/oft/src/instructions/renounce_freeze.rs
Outdated
Show resolved
Hide resolved
bee739e to
afde8f3
Compare
|
Latest Commit Changes:
PR body has been updated. |
1b9b8eb to
81a98bf
Compare
|
would this be ready to merge if the conflicts are resolved? |
|
@shankars99 we will not merge this to main as the new instruction is only needed for OFTs that were created before the createOFT script was updated to immediately renounce the Freeze Authority. Else, it will just be bloat as it's an instruction that's never needed and not usable by current OFTs. |
NOTE: we will not merge this to main as the new instruction is only needed for OFTs that were created before the createOFT script was updated to immediately renounce the Freeze Authority. Else, it will just be bloat as it's an instruction that's never needed and not usable by current OFTs.
Motivation
This is for already created OFTs that were deployed with
--only-oft-store truebefore #1141 , meaning the Freeze Authority was set to the multisig address, but the intention is to have the Freeze Authority renounced.Changes introduced:
programs/oft/src/instructions/renounce_freeze.rslib.rs) to 'register' the new instruction:tasks/solana/renounceFreeze.tsprogram_id_from_envinprograms/oft/src/lib.rssince it's not used. The removal of this enablesanchor keys syncto auto-replace the program id here, thereby removing the manual step we currently require for devs to replace the program id in this file.How to test
Init a new repo with this branch's examples
Build and Deploy program as usual.
To simulate previous case of Freeze Authority being set to the multisig even when in
onlyOftStoremode, make the following edit increateOFT.ts:Then, run the create script with
--only-oft-store trueFinally, run the new script:
TODOS
Next Step: updating the
oftexport in@layerzerolabs/oft-v2-solana-sdkapps/oft/v2/solana/sdk/src/oft.tsin monorepo to support new renounce freeze instruction, allowing us to just use something like below:Notes:
<MULTISIG_ADDRESS>should bemintAuthoritythe in OFT.json deployment filederiveConnection()