RegistryServiceTrait

Trait RegistryServiceTrait 

Source
pub trait RegistryServiceTrait {
    type Error: From<StdError>;

    // Required methods
    fn proxy_install_plugin(
        &self,
        ctx: ExecCtx<'_>,
        id: u64,
        addr: String,
    ) -> Result<Response, Self::Error>;
    fn proxy_remove_plugins(
        &self,
        ctx: ExecCtx<'_>,
        addr: Vec<String>,
    ) -> Result<Response, Self::Error>;
    fn subscribe(
        &self,
        ctx: ExecCtx<'_>,
        tier: SubscriptionTier,
    ) -> Result<Response, Self::Error>;
    fn subsciption_details(
        &self,
        ctx: QueryCtx<'_>,
        addr: String,
    ) -> Result<Option<Subscriber>, StdError>;
}
Expand description

The trait for each authenticator contract

Required Associated Types§

Required Methods§

Source

fn proxy_install_plugin( &self, ctx: ExecCtx<'_>, id: u64, addr: String, ) -> Result<Response, Self::Error>

Called by proxy contract to record increase in plugins Codehash of the caller is checked

Source

fn proxy_remove_plugins( &self, ctx: ExecCtx<'_>, addr: Vec<String>, ) -> Result<Response, Self::Error>

Called by proxy contract to remove the plugin in this state and in the proxy state Codehash of the caller is checked This is called with auth_remove_plugin

Source

fn subscribe( &self, ctx: ExecCtx<'_>, tier: SubscriptionTier, ) -> Result<Response, Self::Error>

Called by users to subscribe to a different tier for both upgrade & downgrades

Source

fn subsciption_details( &self, ctx: QueryCtx<'_>, addr: String, ) -> Result<Option<Subscriber>, StdError>

Implementors§