1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- use anchor_lang::prelude::*;
- pub const MAX_SIZE: usize = 10;
- #[account]
- pub struct Data {
- pub udata: u128,
- pub idata: i128,
- }
- #[account]
- #[derive(Default)]
- pub struct DataU16 {
- pub data: u16,
- }
- #[account]
- #[derive(Default)]
- pub struct DataI8 {
- pub data: i8,
- }
- #[account]
- pub struct DataI16 {
- pub data: i16,
- }
- #[account(zero_copy)]
- #[derive(Default)]
- pub struct DataZeroCopy {
- pub data: u16,
- pub bump: u8,
- }
- #[account]
- #[derive(Default)]
- pub struct DataWithFilter {
- pub authority: Pubkey,
- pub filterable: Pubkey,
- }
- #[account]
- pub struct DataMultidimensionalArray {
- pub data: [[u8; 10]; 10],
- }
- #[account]
- pub struct DataConstArraySize {
- pub data: [u8; MAX_SIZE],
- }
|