Skip to content

Commit

Permalink
Merge branch 'main' into add-deploy-scripts-to-templates
Browse files Browse the repository at this point in the history
  • Loading branch information
DOBEN authored Oct 13, 2023
2 parents 6b1681f + 9c1fb32 commit 717901e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion concordium-cis2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1052,10 +1052,15 @@ impl From<AccountAddress> for Receiver {
}

/// Additional information to include with a transfer.
#[derive(Debug, Serialize, Clone, SchemaType)]
#[derive(Debug, Serialize, Clone)]
#[concordium(transparent)]
pub struct AdditionalData(#[concordium(size_length = 2)] Vec<u8>);

// Implemented manually to display the AdditionalData as a hex string.
impl schema::SchemaType for AdditionalData {
fn get_type() -> schema::Type { schema::Type::ByteList(schema::SizeLength::U16) }
}

impl AdditionalData {
/// Construct an AdditionalData containing no data.
pub fn empty() -> Self { AdditionalData(Vec::new()) }
Expand Down

0 comments on commit 717901e

Please sign in to comment.