lang: Remove AccountInfo from Context#4103
Conversation
|
@Aursen is attempting to deploy a commit to the Solana Foundation Team on Vercel. A member of the Team first needs to authorize it. |
|
To solve the issue I need to get ride of |
I don't quite follow, can you explain more what you mean and why this is? |
|
|
Sorry that this fell behind, do you still want to push this through and fix it up for current master? |
Sure I can do it |
|
@jamie-osec the bench test is quite buggy on my current laptop, I cannot generate it properly |
|
Hmm, I misread here, looks like this is actually completely disallowing |
| vec![ | ||
| AccountMeta::new(self.from.key(), true), | ||
| AccountMeta::new(self.to.key(), false), | ||
| AccountMeta::new_readonly(self.to.key(), true), |
There was a problem hiding this comment.
| AccountMeta::new_readonly(self.to.key(), true), | |
| AccountMeta::new_readonly(self.base.key(), true), |
| impl<'info> UncheckedAccount<'info> { | ||
| pub fn try_from(acc_info: &'info AccountInfo<'info>) -> Self { | ||
| Self(acc_info) | ||
| impl<'info> From<&'info AccountInfo<'info>> for UncheckedAccount<'info> { | ||
| fn from(value: &'info AccountInfo<'info>) -> Self { | ||
| Self(value) | ||
| } | ||
| } |
There was a problem hiding this comment.
Same note here about breaking changes; the new impl is a good idea, we should probably just deprecate the old one as the name was misleading
That's the goal of the PR, the title is explicit about it |
|
Definitely in favour of the 'remove AccountInfo' part which is the bulk of this PR, we just can't remove this as a feature entirely |
I can adjust the PR to this direction |
|
Just to be sure the goal is to let the old warning macro and just keep the new syntaxe and the removal on spl? |
|
Yeah. Though I did want to ask if you think it might be a cleaner patch to switch |
If we keep the macro we can generate it let me update tomorrow |
|
@Aursen bumping |
No description provided.