generated from metaplex-foundation/solana-project-template
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Showing
6 changed files
with
116 additions
and
148 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
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/** | ||
* This code was AUTOGENERATED using the kinobi library. | ||
* Please DO NOT EDIT THIS FILE, instead use visitors | ||
* to add features, then rerun kinobi to update it. | ||
* | ||
* @see https://github.com/metaplex-foundation/kinobi | ||
*/ | ||
|
||
import { Option, OptionOrNullable, none } from '@metaplex-foundation/umi'; | ||
import { | ||
Serializer, | ||
array, | ||
bool, | ||
mapSerializer, | ||
option, | ||
string, | ||
struct, | ||
u16, | ||
} from '@metaplex-foundation/umi/serializers'; | ||
import { Creator, CreatorArgs, getCreatorSerializer } from '.'; | ||
|
||
export type UpdateArgs = { | ||
name: Option<string>; | ||
symbol: Option<string>; | ||
uri: Option<string>; | ||
creators: Option<Array<Creator>>; | ||
sellerFeeBasisPoints: Option<number>; | ||
primarySaleHappened: Option<boolean>; | ||
isMutable: Option<boolean>; | ||
}; | ||
|
||
export type UpdateArgsArgs = { | ||
name?: OptionOrNullable<string>; | ||
symbol?: OptionOrNullable<string>; | ||
uri?: OptionOrNullable<string>; | ||
creators?: OptionOrNullable<Array<CreatorArgs>>; | ||
sellerFeeBasisPoints?: OptionOrNullable<number>; | ||
primarySaleHappened?: OptionOrNullable<boolean>; | ||
isMutable?: OptionOrNullable<boolean>; | ||
}; | ||
|
||
export function getUpdateArgsSerializer(): Serializer< | ||
UpdateArgsArgs, | ||
UpdateArgs | ||
> { | ||
return mapSerializer<UpdateArgsArgs, any, UpdateArgs>( | ||
struct<UpdateArgs>( | ||
[ | ||
['name', option(string())], | ||
['symbol', option(string())], | ||
['uri', option(string())], | ||
['creators', option(array(getCreatorSerializer()))], | ||
['sellerFeeBasisPoints', option(u16())], | ||
['primarySaleHappened', option(bool())], | ||
['isMutable', option(bool())], | ||
], | ||
{ description: 'UpdateArgs' } | ||
), | ||
(value) => ({ | ||
...value, | ||
name: value.name ?? none(), | ||
symbol: value.symbol ?? none(), | ||
uri: value.uri ?? none(), | ||
creators: value.creators ?? none(), | ||
sellerFeeBasisPoints: value.sellerFeeBasisPoints ?? none(), | ||
primarySaleHappened: value.primarySaleHappened ?? none(), | ||
isMutable: value.isMutable ?? none(), | ||
}) | ||
) as Serializer<UpdateArgsArgs, UpdateArgs>; | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//! This code was AUTOGENERATED using the kinobi library. | ||
//! Please DO NOT EDIT THIS FILE, instead use visitors | ||
//! to add features, then rerun kinobi to update it. | ||
//! | ||
//! [https://github.com/metaplex-foundation/kinobi] | ||
//! | ||
use crate::generated::types::Creator; | ||
use borsh::BorshDeserialize; | ||
use borsh::BorshSerialize; | ||
|
||
#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)] | ||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] | ||
pub struct UpdateArgs { | ||
pub name: Option<String>, | ||
pub symbol: Option<String>, | ||
pub uri: Option<String>, | ||
pub creators: Option<Vec<Creator>>, | ||
pub seller_fee_basis_points: Option<u16>, | ||
pub primary_sale_happened: Option<bool>, | ||
pub is_mutable: Option<bool>, | ||
} |