Commit 9ae6547a authored by Hero Bird's avatar Hero Bird

[pdsl_model] Introduce experimental caller API

This is only implemented since we want to use it in a demo contract.
parent 90401df4
use pdsl_core::{
env::{
Env,
ContractEnv,
srml::{
Address,
},
},
};
/// Provides a safe interface to an environment given a contract state.
pub struct ExecutionEnv<S>{
pub struct ExecutionEnv<State>{
/// The contract state.
pub state: S,
pub state: State,
}
impl<State> ExecutionEnv<State> {
pub fn caller(&self) -> Address {
ContractEnv::caller()
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment