We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4063ddf + b029299 commit cb13d4dCopy full SHA for cb13d4d
src/utils.rs
@@ -42,7 +42,6 @@ macro_rules! pub_struct {
42
}
43
44
45
-
46
47
pub async fn get_nft(
48
quest_id: u32,
@@ -826,4 +825,18 @@ impl Clone for Box<dyn WithState> {
826
825
fn clone(&self) -> Box<dyn WithState> {
827
self.box_clone()
828
829
-}
+}
+
830
+pub fn parse_string(input: &str, address: FieldElement) -> String {
831
+ let mut result = input.to_string();
832
833
+ if input.contains("{addr_hex}") {
834
+ result = result.replace("{addr_hex}", to_hex(address).as_str());
835
+ }
836
837
+ if input.contains("{addr_dec}") {
838
+ result = result.replace("{addr_dec}", address.to_string().as_str());
839
840
841
+ result
842
0 commit comments