generated from metaplex-foundation/solana-project-template
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ccc714
commit 230dcd9
Showing
5 changed files
with
103 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,23 @@ | ||
use borsh::{BorshDeserialize, BorshSerialize}; | ||
|
||
use crate::{state::Key, utils::DataBlob}; | ||
|
||
#[derive(Clone, BorshSerialize, BorshDeserialize, Debug, PartialEq, Eq)] | ||
pub struct Delegate { | ||
frozen: bool, | ||
key: Key, // 1 | ||
frozen: bool, // 1 | ||
} | ||
|
||
impl DataBlob for Delegate { | ||
fn get_initial_size() -> usize { | ||
2 | ||
} | ||
|
||
fn get_size(&self) -> usize { | ||
2 | ||
} | ||
|
||
fn key() -> crate::state::Key { | ||
Key::Delegate | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,7 @@ pub enum Key { | |
HashedCollection, | ||
PluginHeader, | ||
PluginRegistry, | ||
Delegate, | ||
} | ||
|
||
#[repr(C)] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters