You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need a snippet to find the size of an account based on the layout. We can use the layout's .span js/ts method from bufferLayout to get the size. Needs to be added
The text was updated successfully, but these errors were encountered:
So accounts are often denoted by structs in Rust, right? To create accounts, however, you need to know the size to allocate to that account given the variables within the account.
What you can do with this to find out the size of the account is SYSTEM_INSTRUCTION_LAYOUTS.Transfer.layout.span because it uses bufferLayout. This is often a very confusing part of writing the client
Section: Accounts
We need a snippet to find the size of an account based on the layout. We can use the layout's
.span
js/ts method frombufferLayout
to get the size. Needs to be addedThe text was updated successfully, but these errors were encountered: