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

Added safety check to IDL write instruction handler. #1215

Closed
wants to merge 1 commit into from

Conversation

kevinaud
Copy link
Contributor

I think this is the correct logic for issue #1149 but I could use some advice on how best to test/verify the behavior. What is your typical development workflow for working on these generated IDL handlers?

@paul-schaaf
Copy link
Contributor

hey @kevinaud Id like to merge this. Are you interested in updating this? If not, I can also take over.

@kevinaud
Copy link
Contributor Author

Sorry for the delayed response, haven't had free time to work on this lately. Feel free to take over :)

@Henry-E
Copy link

Henry-E commented Jan 5, 2023

There's a lot of old janky stuff with the IDL instructions. The fact that the authority can accidentally passed in the IDL account instead of the buffer here is one of them for sure. It would be nicer if this could be added as a constraint on the account struct but that's not possible because 1: we won't have the program id and 2: idlAccounts is used for another instruction, setAuthority, as well.constraint = idl.key != IdlAccount::address(program_id)

The other thing that would be cool to add as well is loading up the program's metadata account and using that as the idl authority instead of whoever manually sets it once the program is uploaded. All of this is just more work and means modifying all of the other code built on top of this, like the ts idl functions and the cli stuff.

@Henry-E Henry-E mentioned this pull request Jan 20, 2023
@armaniferrante
Copy link
Member

Closing as stale.

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.

4 participants