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.

Required Methods§

source

fn sender(&self) -> &Self::Address

Sender of the transaction.

source

fn new(sender: Self::Address) -> Self

Constructor for the Context.

Implementors§