Context
Give the function a context
This page is outdated. Please visit here for the most up-to-date content.
curl --location --request PUT 'https://rpc.ssvm.secondstate.io:8081/api/state/123' \
--header 'Content-Type: text/plain' \
--data-raw 'emoji'use wasm_bindgen::prelude::*;
#[wasm_bindgen]
pub fn say(context: &str, s: &str) -> String {
if context == "emoji" {
let r = String::from("👋 ");
return r + &s;
} else {
let r = String::from("hello ");
return r + &s;
}
}Last updated
Was this helpful?