Struct polymesh_api::polymesh::api::compliance_manager::CallApi
source · pub struct CallApi<'api> { /* private fields */ }
Implementations§
source§impl<'api> CallApi<'api>
impl<'api> CallApi<'api>
sourcepub fn add_compliance_requirement(
&self,
ticker: Ticker,
sender_conditions: Vec<Condition>,
receiver_conditions: Vec<Condition>
) -> Result<WrappedCall<'api>>
pub fn add_compliance_requirement(
&self,
ticker: Ticker,
sender_conditions: Vec<Condition>,
receiver_conditions: Vec<Condition>
) -> Result<WrappedCall<'api>>
Adds a compliance requirement to an asset’s compliance by ticker. If there are duplicate ClaimTypes for a particular trusted issuer, duplicates are removed.
Arguments
- origin - Signer of the dispatchable. It should be the owner of the ticker
- ticker - Symbol of the asset
- sender_conditions - Sender transfer conditions.
- receiver_conditions - Receiver transfer conditions.
Permissions
- Asset
sourcepub fn remove_compliance_requirement(
&self,
ticker: Ticker,
id: u32
) -> Result<WrappedCall<'api>>
pub fn remove_compliance_requirement(
&self,
ticker: Ticker,
id: u32
) -> Result<WrappedCall<'api>>
Removes a compliance requirement from an asset’s compliance.
Arguments
- origin - Signer of the dispatchable. It should be the owner of the ticker
- ticker - Symbol of the asset
- id - Compliance requirement id which is need to be removed
Permissions
- Asset
sourcepub fn replace_asset_compliance(
&self,
ticker: Ticker,
asset_compliance: Vec<ComplianceRequirement>
) -> Result<WrappedCall<'api>>
pub fn replace_asset_compliance(
&self,
ticker: Ticker,
asset_compliance: Vec<ComplianceRequirement>
) -> Result<WrappedCall<'api>>
Replaces an asset’s compliance by ticker with a new compliance.
Compliance requirements will be sorted (ascending by id) before replacing the current requirements.
Arguments
ticker
- the asset ticker,- `asset_compliance - the new asset compliance.
Errors
Unauthorized
iforigin
is not the owner of the ticker.DuplicateAssetCompliance
ifasset_compliance
contains multiple entries with the samerequirement_id
.
Permissions
- Asset
sourcepub fn reset_asset_compliance(&self, ticker: Ticker) -> Result<WrappedCall<'api>>
pub fn reset_asset_compliance(&self, ticker: Ticker) -> Result<WrappedCall<'api>>
Removes an asset’s compliance
Arguments
- origin - Signer of the dispatchable. It should be the owner of the ticker
- ticker - Symbol of the asset
Permissions
- Asset
sourcepub fn pause_asset_compliance(&self, ticker: Ticker) -> Result<WrappedCall<'api>>
pub fn pause_asset_compliance(&self, ticker: Ticker) -> Result<WrappedCall<'api>>
Pauses the verification of conditions for ticker
during transfers.
Arguments
- origin - Signer of the dispatchable. It should be the owner of the ticker
- ticker - Symbol of the asset
Permissions
- Asset
sourcepub fn resume_asset_compliance(
&self,
ticker: Ticker
) -> Result<WrappedCall<'api>>
pub fn resume_asset_compliance(
&self,
ticker: Ticker
) -> Result<WrappedCall<'api>>
Resumes the verification of conditions for ticker
during transfers.
Arguments
- origin - Signer of the dispatchable. It should be the owner of the ticker
- ticker - Symbol of the asset
Permissions
- Asset
sourcepub fn add_default_trusted_claim_issuer(
&self,
ticker: Ticker,
issuer: TrustedIssuer
) -> Result<WrappedCall<'api>>
pub fn add_default_trusted_claim_issuer(
&self,
ticker: Ticker,
issuer: TrustedIssuer
) -> Result<WrappedCall<'api>>
Adds another default trusted claim issuer at the ticker level.
Arguments
- origin - Signer of the dispatchable. It should be the owner of the ticker.
- ticker - Symbol of the asset.
- issuer - IdentityId of the trusted claim issuer.
Permissions
- Asset
sourcepub fn remove_default_trusted_claim_issuer(
&self,
ticker: Ticker,
issuer: IdentityId
) -> Result<WrappedCall<'api>>
pub fn remove_default_trusted_claim_issuer(
&self,
ticker: Ticker,
issuer: IdentityId
) -> Result<WrappedCall<'api>>
Removes the given issuer
from the set of default trusted claim issuers at the ticker level.
Arguments
- origin - Signer of the dispatchable. It should be the owner of the ticker.
- ticker - Symbol of the asset.
- issuer - IdentityId of the trusted claim issuer.
Permissions
- Asset
sourcepub fn change_compliance_requirement(
&self,
ticker: Ticker,
new_req: ComplianceRequirement
) -> Result<WrappedCall<'api>>
pub fn change_compliance_requirement(
&self,
ticker: Ticker,
new_req: ComplianceRequirement
) -> Result<WrappedCall<'api>>
Modify an existing compliance requirement of a given ticker.
Arguments
- origin - Signer of the dispatchable. It should be the owner of the ticker.
- ticker - Symbol of the asset.
- new_req - Compliance requirement.
Permissions
- Asset
Trait Implementations§
Auto Trait Implementations§
impl<'api> !RefUnwindSafe for CallApi<'api>
impl<'api> Send for CallApi<'api>
impl<'api> Sync for CallApi<'api>
impl<'api> Unpin for CallApi<'api>
impl<'api> !UnwindSafe for CallApi<'api>
Blanket Implementations§
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T
. Read more§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.source§impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.