Skip to content

Instantly share code, notes, and snippets.

@fdeantoni
Created June 4, 2021 05:59
Show Gist options
  • Save fdeantoni/c0622d5ecc0fd7b856cefebac82093dd to your computer and use it in GitHub Desktop.
Save fdeantoni/c0622d5ecc0fd7b856cefebac82093dd to your computer and use it in GitHub Desktop.
// ...
impl Validator {
// ...
pub async fn is_valid(&self, key: String) -> bool {
let result: bool = self
.contract
.query("isValid", (key.clone(),), None, Options::default(), None)
.await
.unwrap();
log::debug!("{} is valid?: {}", key, result);
result
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment