Skip to content

Commit

Permalink
Merge branch 'esdt-cleanup' of github.com:multiversx/mx-sovereign-sc …
Browse files Browse the repository at this point in the history
…into esdt-cleanup
  • Loading branch information
andreiblt1304 committed Jun 20, 2024
2 parents 5824785 + dc0edd3 commit b0cb766
Show file tree
Hide file tree
Showing 35 changed files with 5,757 additions and 104 deletions.
29 changes: 29 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ members = [
"router-mock/meta",
"header-verifier",
"header-verifier/meta",
"enshrine-esdt-safe",
"enshrine-esdt-safe/meta"
]
14 changes: 14 additions & 0 deletions common/utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,18 @@ pub trait UtilsModule: bls_signature::BlsSignatureModule {

list
}

fn has_sov_token_prefix(&self, token_id: &TokenIdentifier) -> bool {
let dash = b'-';
let mut array_buffer = [0u8, 30];
let slice = token_id.as_managed_buffer().load_to_byte_array(&mut array_buffer);

let counter = slice.iter().filter(|&&c| c == dash).count();

if counter == 2 {
return true
}

false
}
}
Loading

0 comments on commit b0cb766

Please sign in to comment.