feat: add name and description fields to ListingAccount; update form, table, detail, dashboard
This commit is contained in:
@@ -96,6 +96,8 @@ export type SolistingStateListingAccount = {
|
||||
quantity: number;
|
||||
/** Units held by pending orders. available = quantity - quantity_reserved. */
|
||||
quantityReserved: number;
|
||||
name: string;
|
||||
description: string;
|
||||
metadataUri: string;
|
||||
listingId: bigint;
|
||||
isActive: boolean;
|
||||
@@ -125,6 +127,8 @@ export type SolistingStateListingAccountArgs = {
|
||||
quantity: number;
|
||||
/** Units held by pending orders. available = quantity - quantity_reserved. */
|
||||
quantityReserved: number;
|
||||
name: string;
|
||||
description: string;
|
||||
metadataUri: string;
|
||||
listingId: number | bigint;
|
||||
isActive: boolean;
|
||||
@@ -147,6 +151,8 @@ export function getSolistingStateListingAccountEncoder(): Encoder<SolistingState
|
||||
["acceptedResolvers", getArrayEncoder(getAddressEncoder())],
|
||||
["quantity", getU32Encoder()],
|
||||
["quantityReserved", getU32Encoder()],
|
||||
["name", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],
|
||||
["description", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],
|
||||
["metadataUri", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],
|
||||
["listingId", getU64Encoder()],
|
||||
["isActive", getBooleanEncoder()],
|
||||
@@ -174,6 +180,8 @@ export function getSolistingStateListingAccountDecoder(): Decoder<SolistingState
|
||||
["acceptedResolvers", getArrayDecoder(getAddressDecoder())],
|
||||
["quantity", getU32Decoder()],
|
||||
["quantityReserved", getU32Decoder()],
|
||||
["name", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],
|
||||
["description", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],
|
||||
["metadataUri", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],
|
||||
["listingId", getU64Decoder()],
|
||||
["isActive", getBooleanDecoder()],
|
||||
|
||||
@@ -111,6 +111,8 @@ export type CreateListingInstructionData = {
|
||||
altCurrencies: Array<SolistingStateAltCurrencyConfig>;
|
||||
acceptedResolvers: Array<Address>;
|
||||
quantity: number;
|
||||
name: string;
|
||||
description: string;
|
||||
metadataUri: string;
|
||||
};
|
||||
|
||||
@@ -122,6 +124,8 @@ export type CreateListingInstructionDataArgs = {
|
||||
altCurrencies: Array<SolistingStateAltCurrencyConfigArgs>;
|
||||
acceptedResolvers: Array<Address>;
|
||||
quantity: number;
|
||||
name: string;
|
||||
description: string;
|
||||
metadataUri: string;
|
||||
};
|
||||
|
||||
@@ -139,6 +143,8 @@ export function getCreateListingInstructionDataEncoder(): Encoder<CreateListingI
|
||||
],
|
||||
["acceptedResolvers", getArrayEncoder(getAddressEncoder())],
|
||||
["quantity", getU32Encoder()],
|
||||
["name", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],
|
||||
["description", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],
|
||||
["metadataUri", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],
|
||||
]),
|
||||
(value) => ({ ...value, discriminator: CREATE_LISTING_DISCRIMINATOR }),
|
||||
@@ -158,6 +164,8 @@ export function getCreateListingInstructionDataDecoder(): Decoder<CreateListingI
|
||||
],
|
||||
["acceptedResolvers", getArrayDecoder(getAddressDecoder())],
|
||||
["quantity", getU32Decoder()],
|
||||
["name", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],
|
||||
["description", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],
|
||||
["metadataUri", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],
|
||||
]);
|
||||
}
|
||||
@@ -187,6 +195,8 @@ export type CreateListingAsyncInput<
|
||||
altCurrencies: CreateListingInstructionDataArgs["altCurrencies"];
|
||||
acceptedResolvers: CreateListingInstructionDataArgs["acceptedResolvers"];
|
||||
quantity: CreateListingInstructionDataArgs["quantity"];
|
||||
name: CreateListingInstructionDataArgs["name"];
|
||||
description: CreateListingInstructionDataArgs["description"];
|
||||
metadataUri: CreateListingInstructionDataArgs["metadataUri"];
|
||||
};
|
||||
|
||||
@@ -279,6 +289,8 @@ export type CreateListingInput<
|
||||
altCurrencies: CreateListingInstructionDataArgs["altCurrencies"];
|
||||
acceptedResolvers: CreateListingInstructionDataArgs["acceptedResolvers"];
|
||||
quantity: CreateListingInstructionDataArgs["quantity"];
|
||||
name: CreateListingInstructionDataArgs["name"];
|
||||
description: CreateListingInstructionDataArgs["description"];
|
||||
metadataUri: CreateListingInstructionDataArgs["metadataUri"];
|
||||
};
|
||||
|
||||
|
||||
@@ -101,6 +101,8 @@ export type UpdateListingInstructionData = {
|
||||
altCurrencies: Array<SolistingStateAltCurrencyConfig>;
|
||||
acceptedResolvers: Array<Address>;
|
||||
quantity: number;
|
||||
name: string;
|
||||
description: string;
|
||||
metadataUri: string;
|
||||
};
|
||||
|
||||
@@ -111,6 +113,8 @@ export type UpdateListingInstructionDataArgs = {
|
||||
altCurrencies: Array<SolistingStateAltCurrencyConfigArgs>;
|
||||
acceptedResolvers: Array<Address>;
|
||||
quantity: number;
|
||||
name: string;
|
||||
description: string;
|
||||
metadataUri: string;
|
||||
};
|
||||
|
||||
@@ -127,6 +131,8 @@ export function getUpdateListingInstructionDataEncoder(): Encoder<UpdateListingI
|
||||
],
|
||||
["acceptedResolvers", getArrayEncoder(getAddressEncoder())],
|
||||
["quantity", getU32Encoder()],
|
||||
["name", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],
|
||||
["description", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],
|
||||
["metadataUri", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],
|
||||
]),
|
||||
(value) => ({ ...value, discriminator: UPDATE_LISTING_DISCRIMINATOR }),
|
||||
@@ -145,6 +151,8 @@ export function getUpdateListingInstructionDataDecoder(): Decoder<UpdateListingI
|
||||
],
|
||||
["acceptedResolvers", getArrayDecoder(getAddressDecoder())],
|
||||
["quantity", getU32Decoder()],
|
||||
["name", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],
|
||||
["description", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],
|
||||
["metadataUri", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],
|
||||
]);
|
||||
}
|
||||
@@ -171,6 +179,8 @@ export type UpdateListingInput<
|
||||
altCurrencies: UpdateListingInstructionDataArgs["altCurrencies"];
|
||||
acceptedResolvers: UpdateListingInstructionDataArgs["acceptedResolvers"];
|
||||
quantity: UpdateListingInstructionDataArgs["quantity"];
|
||||
name: UpdateListingInstructionDataArgs["name"];
|
||||
description: UpdateListingInstructionDataArgs["description"];
|
||||
metadataUri: UpdateListingInstructionDataArgs["metadataUri"];
|
||||
};
|
||||
|
||||
|
||||
@@ -115,6 +115,14 @@
|
||||
"name": "quantity",
|
||||
"type": "u32"
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "metadata_uri",
|
||||
"type": "string"
|
||||
@@ -208,6 +216,14 @@
|
||||
"name": "quantity",
|
||||
"type": "u32"
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "metadata_uri",
|
||||
"type": "string"
|
||||
@@ -1337,6 +1353,14 @@
|
||||
],
|
||||
"type": "u32"
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "metadata_uri",
|
||||
"type": "string"
|
||||
|
||||
Reference in New Issue
Block a user