diff --git a/src/smart_contract/utils.rs b/src/smart_contract/utils.rs new file mode 100644 index 0000000..360c04e --- /dev/null +++ b/src/smart_contract/utils.rs @@ -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); +}