drift-labs / drift-vaults

a vault program on top of protocol-v2 for delegate-managed trades with customizable terms
19 stars 16 forks source link

Add memo when creating a vault #43

Closed dannpl closed 1 year ago

dannpl commented 1 year ago

We going to create a open source socialFi for slide.

We want to add a flag to find easy if the vault is created by Slide

https://github.com/slide-labs/slide-socialfi

it's helpfully if add a memo

https://github.com/drift-labs/drift-vaults/blob/76c27515108a8e34a56064c0012155c96dca6ba8/programs/drift_vaults/src/state/vault.rs#L28

#[assert_no_slop]
#[account(zero_copy)]
#[derive(Default, Eq, PartialEq, Debug)]
#[repr(C)]
pub struct Vault {
    /// The memo of the vault. (e. g Slide - Vault)
    pub memo: [u8; 32],
0xbigz commented 1 year ago

using prefix/suffix for names can achieve a similar thing