Skip to content

Commit

Permalink
Create utils.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Dec 8, 2024
1 parent 6d79372 commit 84eacec
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/smart_contract/utils.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
pub fn calculate_fee(amount: Balance) -> Balance {
// Example fee calculation: 1% of the transaction amount
amount / 100
}

pub fn log_event(event: &str) {
// Log an event to the blockchain
ink_env::debug_println!("{}", event);
}

0 comments on commit 84eacec

Please sign in to comment.