Trait sov_modules_api::Context
source · pub trait Context: Spec + Clone + Debug + PartialEq + 'static {
// Required methods
fn sender(&self) -> &Self::Address;
fn new(sender: Self::Address) -> Self;
}
Expand description
A context contains information which is passed to modules during transaction execution. Currently, context includes the sender of the transaction as recovered from its signature.
Context objects also implement the Spec
trait, which specifies the types to be used in this
instance of the state transition function. By making modules generic over a Context
, developers
can easily update their cryptography to conform to the needs of different zk-proof systems.