-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
lang: Error if account init payer account is not marked mutable #1219
Comments
I'm up for giving this a spin. First time I dive into this part of Anchor though, so do you have a specific place where adding this logic would be best, maybe? I see there seems to be constraint checks done here, but they seem limited to per-account checks (e.g. Would it make sense to add these checks here? |
@losman0s are you still interesting in doing this? If so, you can add the checks in this new function https://github.com/project-serum/anchor/blob/01ff03b09b30b974f2854dd0b0b9a958dd509622/lang/syn/src/parser/accounts/mod.rs#L40 |
@paul-schaaf yes, been a bit tied up the last few days but I'll get to it soon. Thanks for the update. |
Hi guys im experiencing this error, can any one help thread 'main' panicked at 'Code not parseable: Error("the payer specified for an init constraint must be mutable.")', lang/syn/src/idl/file.rs:360:58 |
It should pretty much be what the error describes. You are likely init-ing an account through the |
Oh thanks, that solved the issue. but im finally trying to deploy to dev net but i get this error again error: Custom: Invalid blockhash |
|
Whats the link to the discord channel seems the one i'm on wont allow me post anything |
This coincidentally works if the account is not marked mutable since the client will use the provider to pay for the transaction (and thus it is mutable). However, we should require the developer to explicitly mark these paying accounts mutable.
The text was updated successfully, but these errors were encountered: