diff --git a/soroban-sdk-macros/src/lib.rs b/soroban-sdk-macros/src/lib.rs index efd2bf1d..aae0303e 100644 --- a/soroban-sdk-macros/src/lib.rs +++ b/soroban-sdk-macros/src/lib.rs @@ -154,15 +154,15 @@ pub fn contract(metadata: TokenStream, input: TokenStream) -> TokenStream { use std::sync::Mutex; use std::collections::BTreeMap; - pub(crate) type F = #crate_path::testutils::ContractFunctionF; + pub type F = #crate_path::testutils::ContractFunctionF; static FUNCS: Mutex> = Mutex::new(BTreeMap::new()); - pub(crate) fn register(name: &'static str, func: &'static F) { + pub fn register(name: &'static str, func: &'static F) { FUNCS.lock().unwrap().insert(name, func); } - pub(crate) fn call(name: &str, env: #crate_path::Env, args: &[#crate_path::Val]) -> Option<#crate_path::Val> { + pub fn call(name: &str, env: #crate_path::Env, args: &[#crate_path::Val]) -> Option<#crate_path::Val> { let fopt: Option<&'static F> = FUNCS.lock().unwrap().get(name).map(|f| f.clone()); fopt.map(|f| f(env, args)) }