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§
Sourcefn proxy_install_plugin(
&self,
ctx: ExecCtx<'_>,
id: u64,
addr: String,
) -> Result<Response, Self::Error>
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
Sourcefn proxy_remove_plugins(
&self,
ctx: ExecCtx<'_>,
addr: Vec<String>,
) -> Result<Response, Self::Error>
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
Sourcefn subscribe(
&self,
ctx: ExecCtx<'_>,
tier: SubscriptionTier,
) -> Result<Response, Self::Error>
fn subscribe( &self, ctx: ExecCtx<'_>, tier: SubscriptionTier, ) -> Result<Response, Self::Error>
Called by users to subscribe to a different tier for both upgrade & downgrades