Trait concordium_std::HasReceiveContext
source · pub trait HasReceiveContext<Error: Default = ()>: HasCommonData {
type ReceiveData;
// Required methods
fn open(data: Self::ReceiveData) -> Self;
fn invoker(&self) -> AccountAddress;
fn self_address(&self) -> ContractAddress;
fn sender(&self) -> Address;
fn owner(&self) -> AccountAddress;
fn named_entrypoint(&self) -> OwnedEntrypointName;
}
Expand description
Types which can act as receive contexts.
Required Associated Types§
type ReceiveData
Required Methods§
sourcefn open(data: Self::ReceiveData) -> Self
fn open(data: Self::ReceiveData) -> Self
Open the receive context for reading and accessing values.
sourcefn invoker(&self) -> AccountAddress
fn invoker(&self) -> AccountAddress
Who is the account that initiated the top-level transaction this invocation is a part of.
sourcefn self_address(&self) -> ContractAddress
fn self_address(&self) -> ContractAddress
The address of the contract being invoked.
sourcefn sender(&self) -> Address
fn sender(&self) -> Address
The immediate sender of the message. In general different from the invoker.
sourcefn owner(&self) -> AccountAddress
fn owner(&self) -> AccountAddress
Account which created the contract instance.
sourcefn named_entrypoint(&self) -> OwnedEntrypointName
fn named_entrypoint(&self) -> OwnedEntrypointName
Get the name of the entrypoint that was named. In case a default entrypoint is invoked this can be different from the name of the entrypoint that is being executed.