Skip to content

Commit

Permalink
Merge pull request #540 from Chia-Network/derive-puzzles
Browse files Browse the repository at this point in the history
  • Loading branch information
Rigidity authored Jun 7, 2024
2 parents 02510f4 + 6da9c52 commit 7fd82d1
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions crates/chia-puzzles/src/puzzles/offer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,13 @@ pub struct NotarizedPayment {
pub payments: Vec<Payment>,
}

#[derive(Debug, Clone, PartialEq, Eq, ToClvm, FromClvm)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[clvm(transparent)]
pub enum Payment {
WithoutMemos(PaymentWithoutMemos),
WithMemos(PaymentWithMemos),
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, ToClvm, FromClvm)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[clvm(list)]
pub struct PaymentWithoutMemos {
pub puzzle_hash: Bytes32,
pub amount: u64,
}

#[derive(Debug, Clone, PartialEq, Eq, ToClvm, FromClvm)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[clvm(list)]
pub struct PaymentWithMemos {
pub struct Payment {
pub puzzle_hash: Bytes32,
pub amount: u64,
#[clvm(default)]
pub memos: Vec<Bytes>,
}

Expand Down

0 comments on commit 7fd82d1

Please sign in to comment.