multiversx_sc/contract_base/callable_contract.rs
1use alloc::boxed::Box;
2
3use crate::api::VMApi;
4
5/// CallableContract is the means by which the debugger calls methods in the contract.
6pub trait CallableContract: Send + Sync {
7 fn call(&self, fn_name: &str) -> bool;
8}
9
10/// Describes objects that can create instances of contract objects, with the given API.
11pub trait CallableContractBuilder {
12 fn new_contract_obj<A: VMApi + Send + Sync>(&self) -> Box<dyn CallableContract>;
13}