From 8b4bd21d5a674335f46b2d67f1b2e373d197588b Mon Sep 17 00:00:00 2001 From: Rigidity Date: Wed, 4 Dec 2024 12:08:32 -0500 Subject: [PATCH] rename --- crates/chia-sdk-driver/src/spend_context.rs | 2 +- crates/chia-sdk-types/src/puzzle_mod.rs | 46 +++++++++---------- .../src/puzzles/datalayer/delegation_layer.rs | 4 +- .../src/puzzles/datalayer/writer_filter.rs | 4 +- .../src/puzzles/p2_delegated_conditions.rs | 4 +- .../src/puzzles/p2_delegated_singleton.rs | 4 +- .../src/puzzles/p2_one_of_many.rs | 4 +- .../src/puzzles/p2_singleton.rs | 4 +- 8 files changed, 36 insertions(+), 36 deletions(-) diff --git a/crates/chia-sdk-driver/src/spend_context.rs b/crates/chia-sdk-driver/src/spend_context.rs index 045b868..de051cc 100644 --- a/crates/chia-sdk-driver/src/spend_context.rs +++ b/crates/chia-sdk-driver/src/spend_context.rs @@ -88,7 +88,7 @@ impl SpendContext { where T: Mod, { - self.puzzle(T::HASH, T::REVEAL) + self.puzzle(T::MOD_HASH, T::MOD_REVEAL) } pub fn curry(&mut self, args: T) -> Result diff --git a/crates/chia-sdk-types/src/puzzle_mod.rs b/crates/chia-sdk-types/src/puzzle_mod.rs index 59b9e6e..6d6c082 100644 --- a/crates/chia-sdk-types/src/puzzle_mod.rs +++ b/crates/chia-sdk-types/src/puzzle_mod.rs @@ -19,15 +19,15 @@ use clvm_traits::ToClvm; use clvm_utils::{CurriedProgram, TreeHash, TreeHasher}; pub trait Mod { - const REVEAL: &[u8]; - const HASH: TreeHash; + const MOD_REVEAL: &[u8]; + const MOD_HASH: TreeHash; fn curry_tree_hash(&self) -> TreeHash where Self: Sized + ToClvm, { CurriedProgram { - program: Self::HASH, + program: Self::MOD_HASH, args: self, } .to_clvm(&mut TreeHasher) @@ -36,51 +36,51 @@ pub trait Mod { } impl Mod for StandardArgs { - const REVEAL: &[u8] = &STANDARD_PUZZLE; - const HASH: TreeHash = STANDARD_PUZZLE_HASH; + const MOD_REVEAL: &[u8] = &STANDARD_PUZZLE; + const MOD_HASH: TreeHash = STANDARD_PUZZLE_HASH; } impl Mod for CatArgs { - const REVEAL: &[u8] = &CAT_PUZZLE; - const HASH: TreeHash = CAT_PUZZLE_HASH; + const MOD_REVEAL: &[u8] = &CAT_PUZZLE; + const MOD_HASH: TreeHash = CAT_PUZZLE_HASH; } impl Mod for DidArgs { - const REVEAL: &[u8] = &DID_INNER_PUZZLE; - const HASH: TreeHash = DID_INNER_PUZZLE_HASH; + const MOD_REVEAL: &[u8] = &DID_INNER_PUZZLE; + const MOD_HASH: TreeHash = DID_INNER_PUZZLE_HASH; } impl Mod for NftIntermediateLauncherArgs { - const REVEAL: &[u8] = &NFT_INTERMEDIATE_LAUNCHER_PUZZLE; - const HASH: TreeHash = NFT_INTERMEDIATE_LAUNCHER_PUZZLE_HASH; + const MOD_REVEAL: &[u8] = &NFT_INTERMEDIATE_LAUNCHER_PUZZLE; + const MOD_HASH: TreeHash = NFT_INTERMEDIATE_LAUNCHER_PUZZLE_HASH; } impl Mod for NftRoyaltyTransferPuzzleArgs { - const REVEAL: &[u8] = &NFT_ROYALTY_TRANSFER_PUZZLE; - const HASH: TreeHash = NFT_ROYALTY_TRANSFER_PUZZLE_HASH; + const MOD_REVEAL: &[u8] = &NFT_ROYALTY_TRANSFER_PUZZLE; + const MOD_HASH: TreeHash = NFT_ROYALTY_TRANSFER_PUZZLE_HASH; } impl Mod for NftOwnershipLayerArgs { - const REVEAL: &[u8] = &NFT_OWNERSHIP_LAYER_PUZZLE; - const HASH: TreeHash = NFT_OWNERSHIP_LAYER_PUZZLE_HASH; + const MOD_REVEAL: &[u8] = &NFT_OWNERSHIP_LAYER_PUZZLE; + const MOD_HASH: TreeHash = NFT_OWNERSHIP_LAYER_PUZZLE_HASH; } impl Mod for NftStateLayerArgs { - const REVEAL: &[u8] = &NFT_STATE_LAYER_PUZZLE; - const HASH: TreeHash = NFT_STATE_LAYER_PUZZLE_HASH; + const MOD_REVEAL: &[u8] = &NFT_STATE_LAYER_PUZZLE; + const MOD_HASH: TreeHash = NFT_STATE_LAYER_PUZZLE_HASH; } impl Mod for SingletonArgs { - const REVEAL: &[u8] = &SINGLETON_TOP_LAYER_PUZZLE; - const HASH: TreeHash = SINGLETON_TOP_LAYER_PUZZLE_HASH; + const MOD_REVEAL: &[u8] = &SINGLETON_TOP_LAYER_PUZZLE; + const MOD_HASH: TreeHash = SINGLETON_TOP_LAYER_PUZZLE_HASH; } impl Mod for EverythingWithSignatureTailArgs { - const REVEAL: &[u8] = &EVERYTHING_WITH_SIGNATURE_TAIL_PUZZLE; - const HASH: TreeHash = EVERYTHING_WITH_SIGNATURE_TAIL_PUZZLE_HASH; + const MOD_REVEAL: &[u8] = &EVERYTHING_WITH_SIGNATURE_TAIL_PUZZLE; + const MOD_HASH: TreeHash = EVERYTHING_WITH_SIGNATURE_TAIL_PUZZLE_HASH; } impl Mod for GenesisByCoinIdTailArgs { - const REVEAL: &[u8] = &GENESIS_BY_COIN_ID_TAIL_PUZZLE; - const HASH: TreeHash = GENESIS_BY_COIN_ID_TAIL_PUZZLE_HASH; + const MOD_REVEAL: &[u8] = &GENESIS_BY_COIN_ID_TAIL_PUZZLE; + const MOD_HASH: TreeHash = GENESIS_BY_COIN_ID_TAIL_PUZZLE_HASH; } diff --git a/crates/chia-sdk-types/src/puzzles/datalayer/delegation_layer.rs b/crates/chia-sdk-types/src/puzzles/datalayer/delegation_layer.rs index b6e3bec..398008a 100644 --- a/crates/chia-sdk-types/src/puzzles/datalayer/delegation_layer.rs +++ b/crates/chia-sdk-types/src/puzzles/datalayer/delegation_layer.rs @@ -90,6 +90,6 @@ pub struct DelegationLayerSolution { } impl Mod for DelegationLayerArgs { - const REVEAL: &[u8] = &DELEGATION_LAYER_PUZZLE; - const HASH: TreeHash = DELEGATION_LAYER_PUZZLE_HASH; + const MOD_REVEAL: &[u8] = &DELEGATION_LAYER_PUZZLE; + const MOD_HASH: TreeHash = DELEGATION_LAYER_PUZZLE_HASH; } diff --git a/crates/chia-sdk-types/src/puzzles/datalayer/writer_filter.rs b/crates/chia-sdk-types/src/puzzles/datalayer/writer_filter.rs index 95ef84e..f8c8e3e 100644 --- a/crates/chia-sdk-types/src/puzzles/datalayer/writer_filter.rs +++ b/crates/chia-sdk-types/src/puzzles/datalayer/writer_filter.rs @@ -47,6 +47,6 @@ pub struct WriterLayerSolution { } impl Mod for WriterLayerArgs { - const REVEAL: &[u8] = &WRITER_LAYER_PUZZLE; - const HASH: TreeHash = WRITER_LAYER_PUZZLE_HASH; + const MOD_REVEAL: &[u8] = &WRITER_LAYER_PUZZLE; + const MOD_HASH: TreeHash = WRITER_LAYER_PUZZLE_HASH; } diff --git a/crates/chia-sdk-types/src/puzzles/p2_delegated_conditions.rs b/crates/chia-sdk-types/src/puzzles/p2_delegated_conditions.rs index f184eff..275a346 100644 --- a/crates/chia-sdk-types/src/puzzles/p2_delegated_conditions.rs +++ b/crates/chia-sdk-types/src/puzzles/p2_delegated_conditions.rs @@ -19,8 +19,8 @@ impl P2DelegatedConditionsArgs { } impl Mod for P2DelegatedConditionsArgs { - const REVEAL: &[u8] = &P2_DELEGATED_CONDITIONS_PUZZLE; - const HASH: TreeHash = P2_DELEGATED_CONDITIONS_PUZZLE_HASH; + const MOD_REVEAL: &[u8] = &P2_DELEGATED_CONDITIONS_PUZZLE; + const MOD_HASH: TreeHash = P2_DELEGATED_CONDITIONS_PUZZLE_HASH; } #[derive(Debug, Clone, PartialEq, Eq, ToClvm, FromClvm)] diff --git a/crates/chia-sdk-types/src/puzzles/p2_delegated_singleton.rs b/crates/chia-sdk-types/src/puzzles/p2_delegated_singleton.rs index f9e3e80..7b145cc 100644 --- a/crates/chia-sdk-types/src/puzzles/p2_delegated_singleton.rs +++ b/crates/chia-sdk-types/src/puzzles/p2_delegated_singleton.rs @@ -15,8 +15,8 @@ pub struct P2DelegatedSingletonArgs { } impl Mod for P2DelegatedSingletonArgs { - const REVEAL: &[u8] = &P2_DELEGATED_SINGLETON_PUZZLE; - const HASH: TreeHash = P2_DELEGATED_SINGLETON_PUZZLE_HASH; + const MOD_REVEAL: &[u8] = &P2_DELEGATED_SINGLETON_PUZZLE; + const MOD_HASH: TreeHash = P2_DELEGATED_SINGLETON_PUZZLE_HASH; } impl P2DelegatedSingletonArgs { diff --git a/crates/chia-sdk-types/src/puzzles/p2_one_of_many.rs b/crates/chia-sdk-types/src/puzzles/p2_one_of_many.rs index c7f4046..86c399b 100644 --- a/crates/chia-sdk-types/src/puzzles/p2_one_of_many.rs +++ b/crates/chia-sdk-types/src/puzzles/p2_one_of_many.rs @@ -12,8 +12,8 @@ pub struct P2OneOfManyArgs { } impl Mod for P2OneOfManyArgs { - const REVEAL: &[u8] = &P2_ONE_OF_MANY_PUZZLE; - const HASH: TreeHash = P2_ONE_OF_MANY_PUZZLE_HASH; + const MOD_REVEAL: &[u8] = &P2_ONE_OF_MANY_PUZZLE; + const MOD_HASH: TreeHash = P2_ONE_OF_MANY_PUZZLE_HASH; } #[derive(Debug, Clone, Copy, PartialEq, Eq, ToClvm, FromClvm)] diff --git a/crates/chia-sdk-types/src/puzzles/p2_singleton.rs b/crates/chia-sdk-types/src/puzzles/p2_singleton.rs index ef47660..ea95d13 100644 --- a/crates/chia-sdk-types/src/puzzles/p2_singleton.rs +++ b/crates/chia-sdk-types/src/puzzles/p2_singleton.rs @@ -15,8 +15,8 @@ pub struct P2SingletonArgs { } impl Mod for P2SingletonArgs { - const REVEAL: &[u8] = &P2_SINGLETON_PUZZLE; - const HASH: TreeHash = P2_SINGLETON_PUZZLE_HASH; + const MOD_REVEAL: &[u8] = &P2_SINGLETON_PUZZLE; + const MOD_HASH: TreeHash = P2_SINGLETON_PUZZLE_HASH; } impl P2SingletonArgs {