From a7078dbc4af0bde545891c1be20318adab51c6f7 Mon Sep 17 00:00:00 2001 From: KOSASIH Date: Sat, 7 Dec 2024 17:10:22 +0700 Subject: [PATCH] Create utils.rs --- src/stablecoin/src/utils.rs | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/stablecoin/src/utils.rs diff --git a/src/stablecoin/src/utils.rs b/src/stablecoin/src/utils.rs new file mode 100644 index 0000000..bbcb701 --- /dev/null +++ b/src/stablecoin/src/utils.rs @@ -0,0 +1,5 @@ +// src/utils.rs +pub fn validate_address(address: &str) -> bool { + // Simple validation logic for addresses + address.len() == 42 && address.starts_with("0x") +}