Skip to content

Commit

Permalink
modular file structure for smart contracts templates
Browse files Browse the repository at this point in the history
  • Loading branch information
ipapandinas committed Oct 29, 2023
1 parent 29d775c commit 36d3d19
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion contracts/src/token/single-token/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ scale-info = { version = "2.6", default-features = false, features = ["derive"],
openbrush = { git = "https://github.com/Brushfam/openbrush-contracts", version = "4.0.0-beta", default-features = false, features = ["ownable"] }

# These dependencies
kudos_ink_contracts = { git = "https://github.com/kudos-ink/contracts", branch = "next" }
kudos_ink_contracts = { git = "https://github.com/kudos-ink/contracts" }

[lib]
name = "single_token_contract"
Expand Down
1 change: 1 addition & 0 deletions contracts/src/token/single-token/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#[openbrush::contract]
pub mod single_token {
use kudos_ink_contracts::traits::workflow::{WorkflowError, *};
use kudos_ink_contracts::traits::types::HashValue;
use openbrush::{modifiers, traits::Storage};

use ink::env::hash::{HashOutput, Sha2x256};
Expand Down
1 change: 1 addition & 0 deletions contracts/src/traits/mod.rs
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pub mod workflow;
pub mod types;
1 change: 1 addition & 0 deletions contracts/src/traits/types.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub type HashValue = [u8; 32];
4 changes: 1 addition & 3 deletions contracts/src/traits/workflow.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use openbrush::{contracts::traits::ownable::*, modifiers};

/// Type alias for hashes.
pub type HashValue = [u8; 32];
use super::types::HashValue;

#[openbrush::wrapper]
pub type WorkflowdRef = dyn Workflow + Ownable;
Expand Down

0 comments on commit 36d3d19

Please sign in to comment.