pub struct CallApi<'api> { /* private fields */ }

Implementations

Set the max length of details in terms of bytes. May only be called via a PIP.

Set the default CA TargetIdentities to targets.

Arguments
  • origin which must be an external agent of ticker with relevant permissions.
  • ticker for which the default identities are changing.
  • targets the default target identities for a CA.
Errors
  • UnauthorizedAgent if origin is not agent-permissioned for ticker.
  • TooManyTargetIds if targets.identities.len() > T::MaxTargetIds::get().
Permissions
  • Asset

Set the default withholding tax for all DIDs and CAs relevant to this ticker.

Arguments
  • origin which must be an external agent of ticker with relevant permissions.
  • ticker that the withholding tax will apply to.
  • tax that should be withheld when distributing dividends, etc.
Errors
  • UnauthorizedAgent if origin is not agent-permissioned for ticker.
Permissions
  • Asset

Set the withholding tax of ticker for taxed_did to tax. If Some(tax), this overrides the default withholding tax of ticker to tax for taxed_did. Otherwise, if None, the default withholding tax will be used.

Arguments
  • origin which must be an external agent of ticker with relevant permissions.
  • ticker that the withholding tax will apply to.
  • taxed_did that will have its withholding tax updated.
  • tax that should be withheld when distributing dividends, etc.
Errors
  • UnauthorizedAgent if origin is not agent-permissioned for ticker.
  • TooManyDidTaxes if Some(tax) and adding the override would go over the limit MaxDidWhts.
Permissions
  • Asset

Initiates a CA for ticker of kind with details and other provided arguments.

Arguments
  • origin which must be an external agent of ticker with relevant permissions.
  • ticker that the CA is made for.
  • kind of CA being initiated.
  • decl_date of CA bring initialized.
  • record_date, if any, to calculate the impact of this CA. If provided, this results in a scheduled balance snapshot (“checkpoint”) at the date.
  • details of the CA in free-text form, up to a certain number of bytes in length.
  • targets, if any, which this CA is relevant/irrelevant to. Overrides, if provided, the default at the asset level (set_default_targets).
  • default_withholding_tax, if any, is the default withholding tax to use for this CA. Overrides, if provided, the default at the asset level (set_default_withholding_tax).
  • withholding_tax, if any, provides per-DID withholding tax overrides. Overrides, if provided, the default at the asset level (set_did_withholding_tax).
Errors
  • DetailsTooLong if details.len() goes beyond max_details_length.
  • UnauthorizedAgent if origin is not agent-permissioned for ticker.
  • CounterOverflow in the unlikely event that so many CAs were created for this ticker, that integer overflow would have occured if instead allowed.
  • TooManyDidTaxes if withholding_tax.unwrap().len() would go over the limit MaxDidWhts.
  • DuplicateDidTax if a DID is included more than once in wt.
  • TooManyTargetIds if targets.unwrap().identities.len() > T::MaxTargetIds::get().
  • DeclDateInFuture if the declaration date is not in the past.
  • When record_date.is_some(), other errors due to checkpoint scheduling may occur.
Permissions
  • Asset

Link the given CA id to the given docs. Any previous links for the CA are removed in favor of docs.

The workflow here is to add the documents and initiating the CA in any order desired. Once both exist, they can now be linked together.

Arguments
  • origin which must be an external agent of id.ticker with relevant permissions.
  • id of the CA to associate with docs.
  • docs to associate with the CA with id.
Errors
  • UnauthorizedAgent if origin is not agent-permissioned for ticker.
  • NoSuchCA if id does not identify an existing CA.
  • NoSuchDoc if any of docs does not identify an existing document.
Permissions
  • Asset

Removes the CA identified by ca_id.

Associated data, such as document links, ballots, and capital distributions are also removed.

Any schedule associated with the record date will see strong_ref_count(schedule_id) decremented.

Arguments
  • origin which must be an external agent of ca_id.ticker with relevant permissions.
  • ca_id of the CA to remove.
Errors
  • UnauthorizedAgent if origin is not agent-permissioned for ticker.
  • NoSuchCA if id does not identify an existing CA.
Permissions
  • Asset

Changes the record date of the CA identified by ca_id.

Arguments
  • origin which must be an external agent of ca_id.ticker with relevant permissions.
  • ca_id of the CA to alter.
  • record_date, if any, to calculate the impact of the CA. If provided, this results in a scheduled balance snapshot (“checkpoint”) at the date.
Errors
  • UnauthorizedAgent if origin is not agent-permissioned for ticker.
  • NoSuchCA if id does not identify an existing CA.
  • When record_date.is_some(), other errors due to checkpoint scheduling may occur.
Permissions
  • Asset

Utility extrinsic to batch initiate_corporate_action and distribute

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Convert from a value of T into an equivalent instance of Option<Self>. Read more
Consume self to return Some equivalent value of Option<T>. Read more
Convert 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. Read more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more
Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Get a reference to the inner from the outer.

Get a mutable reference to the inner from the outer.

Should always be Self
Convert from a value of T into an equivalent instance of Self. Read more
Consume self to return an equivalent value of T. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The counterpart to unchecked_from.
Consume self to return an equivalent value of T.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more