multiversx_sc/contract_base/
callable_contract.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
use alloc::boxed::Box;

use crate::api::VMApi;

/// CallableContract is the means by which the debugger calls methods in the contract.
pub trait CallableContract: Send + Sync {
    fn call(&self, fn_name: &str) -> bool;
}

/// Describes objects that can create instances of contract objects, with the given API.
pub trait CallableContractBuilder {
    fn new_contract_obj<A: VMApi + Send + Sync>(&self) -> Box<dyn CallableContract>;
}