-
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: remove the state and interface attributes #2285
Conversation
@Aursen is attempting to deploy a commit to the coral-xyz Team on Vercel. A member of the Team first needs to authorize it. |
@Henry-E for the basic 4 example, do I use init-if-needed with a pda? |
personally i would prefer to not include |
This reverts commit 4d07d93.
|
lang/src/lib.rs
Outdated
// Calculates the size of an account, which may be larger than the deserialized | ||
// data in it. This trait is currently only used for `#[state]` accounts. | ||
// data in it. This trait is currently unused. | ||
// TODO: Uses it maybe to calculate the size of an account. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor english maybe use it calculate ...
The key with making a trait that automatically calculates size is that it doesn't have a high runtime cost. It really ought to be closer to a constant, although need to account for variable sized elements.
Looks really nice, thanks for such a great effort! Some loose thoughts,
Another question as well to check before we merge for my own sanity
|
Concerning the state and the interface the two are extremely linked because the interface does not call the global function in the dispatcher. And the interface in the idl was in the state category, so I concluded that if the program had no state, the interface was not usable. It is better for this kind of practice to make a client from the idl as anchor-gen or mannually. Program state is used by the idl internally, from what I remember. For the account size, I may delete it because I'm going to do a derive macro for it. Then for all that is constraint it is true that I did not touch it, because of memories there is no constraint related to the state. No everything is relatively contained concerning the state, I just had to modify a TS function for the instructions. And the same in the client. And for the rest I will do it |
Cool, I will play around with this locally tomorrow morning and try to merge. |
This reverts commit 943bfd7.
Thanks for all your hard work on this! |
RequestNamespace was removed coral-xyz/anchor#2285
* remove unused structopt * cleanup anchor-lang dep anchor-lang is re-exported through anchor-client. and was unused in some projects. * update anchor-lang 0.26 -> 0.27 RequestNamespace was removed coral-xyz/anchor#2285 * update anchor-lang 0.27 -> 0.28 We don't use async feature in achor-lang, which means we get the blocking version of RequestBuilder. It needs a handle to the runtime to block with. also ran `cargo update -p helium-anchor-gen` to get generated types to implement updated traits. * update anchor-lang 0.28 -> 0.29 no code changes required --------- Co-authored-by: Matthew Plant <maplant@protonmail.com>
TODO: