title: Extrinsics

The following sections contain Extrinsics methods are part of the default Substrate runtime. On the api, these are exposed via api.tx.<module>.<method>.

(NOTE: These were generated from a static/snapshot view of a recent Substrate master node. Some items may not be available in older nodes, or in any customized implementations.)


asset

acceptAssetOwnershipTransfer(auth_id: u64)

  • interface: api.tx.asset.acceptAssetOwnershipTransfer

  • summary: This function is used to accept a token ownership transfer. NB: To reject the transfer, call remove auth function in identity module.

    Arguments

    • origin It contains the secondary key of the caller (i.e. who signed the transaction to execute this function).

    • auth_id Authorization ID of the token ownership transfer authorization.

acceptTickerTransfer(auth_id: u64)

  • interface: api.tx.asset.acceptTickerTransfer

  • summary: Accepts a ticker transfer.

    Consumes the authorization auth_id (see pallet_identity::consume_auth). NB: To reject the transfer, call remove auth function in identity module.

    Arguments

    • origin It contains the secondary key of the caller (i.e. who signed the transaction to execute this function).

    • auth_id Authorization ID of ticker transfer authorization.

    Errors

    • AuthorizationError::BadType if auth_id is not a valid ticket transfer authorization.

addDocuments(docs: Vec<Document>, ticker: Ticker)

  • interface: api.tx.asset.addDocuments

  • summary: Add documents for a given token.

    Arguments

    • origin is a signer that has permissions to act as an agent of ticker.

    • ticker Ticker of the token.

    • docs Documents to be attached to ticker.

    Permissions

    • Asset

claimClassicTicker(ticker: Ticker, ethereum_signature: EcdsaSignature)

  • interface: api.tx.asset.claimClassicTicker

  • summary: Claim a systematically reserved Polymath Classic (PMC) ticker and transfer it to the origin's identity.

    To verify that the origin is in control of the Ethereum account on the books, an ethereum_signature containing the origin's DID as the message must be provided by that Ethereum account.

    Errors

    • NoSuchClassicTicker if this is not a systematically reserved PMC ticker.

    • TickerAlreadyRegistered if the ticker was already registered, e.g., by origin.

    • TickerRegistrationExpired if the ticker's registration has expired.

    • BadOrigin if not signed.

    • InvalidEthereumSignature if the ethereum_signature is not valid.

    • NotAnOwner if the ethereum account is not the owner of the PMC ticker.

controllerTransfer(ticker: Ticker, value: Balance, from_portfolio: PortfolioId)

  • interface: api.tx.asset.controllerTransfer

  • summary: Forces a transfer of token from from_portfolio to the caller's default portfolio.

    Arguments

    • origin Must be an external agent with appropriate permissions for a given ticker.

    • ticker Ticker symbol of the asset.

    • value Amount of tokens need to force transfer.

    • from_portfolio From whom portfolio tokens gets transferred.

createAsset(name: AssetName, ticker: Ticker, divisible: bool, asset_type: AssetType, identifiers: Vec<AssetIdentifier>, funding_round: Option<FundingRoundName>, disable_iu: bool)

  • interface: api.tx.asset.createAsset

  • summary: Initializes a new security token, with the initiating account as its owner. The total supply will initially be zero. To mint tokens, use issue.

    Arguments

    • origin - contains the secondary key of the caller (i.e. who signed the transaction to execute this function).

    • name - the name of the token.

    • ticker - the ticker symbol of the token.

    • divisible - a boolean to identify the divisibility status of the token.

    • asset_type - the asset type.

    • identifiers - a vector of asset identifiers.

    • funding_round - name of the funding round.

    • disable_iu - whether or not investor uniqueness enforcement should be disabled. This cannot be changed after creating the asset.

    Errors

    • InvalidAssetIdentifier if any of identifiers are invalid.

    • MaxLengthOfAssetNameExceeded if name's length exceeds T::AssetNameMaxLength.

    • FundingRoundNameMaxLengthExceeded if the name of the funding round is longer that T::FundingRoundNameMaxLength.

    • AssetAlreadyCreated if asset was already created.

    • TickerTooLong if ticker's length is greater than config.max_ticker_length chain parameter.

    • TickerNotAscii if ticker is not yet registered, and contains non-ascii printable characters (from code 32 to 126) or any character after first occurrence of \0.

    Permissions

    • Portfolio

freeze(ticker: Ticker)

  • interface: api.tx.asset.freeze

  • summary: Freezes transfers and minting of a given token.

    Arguments

    • origin - the secondary key of the sender.

    • ticker - the ticker of the token.

    Errors

    • AlreadyFrozen if ticker is already frozen.

    Permissions

    • Asset

issue(ticker: Ticker, amount: Balance)

  • interface: api.tx.asset.issue

  • summary: Issue, or mint, new tokens to the caller, which must be an authorized external agent.

    Arguments

    • origin is a signer that has permissions to act as an agent of ticker.

    • ticker of the token.

    • amount of tokens that get issued.

    Permissions

    • Asset

    • Portfolio

makeDivisible(ticker: Ticker)

  • interface: api.tx.asset.makeDivisible

  • summary: Makes an indivisible token divisible.

    Arguments

    • origin is a signer that has permissions to act as an agent of ticker.

    • ticker Ticker of the token.

    Errors

    • AssetAlreadyDivisible if ticker is already divisible.

    Permissions

    • Asset

redeem(ticker: Ticker, value: Balance)

  • interface: api.tx.asset.redeem

  • summary: Redeems existing tokens by reducing the balance of the caller's default portfolio and the total supply of the token

    Arguments

    • origin is a signer that has permissions to act as an agent of ticker.

    • ticker Ticker of the token.

    • value Amount of tokens to redeem.

    Errors

    • Unauthorized If called by someone without the appropriate external agent permissions

    • InvalidGranularity If the amount is not divisible by 10^6 for non-divisible tokens

    • InsufficientPortfolioBalance If the caller's default portfolio doesn't have enough free balance

    Permissions

    • Asset

    • Portfolio

registerCustomAssetType(ty: Bytes)

  • interface: api.tx.asset.registerCustomAssetType

  • summary: Registers a custom asset type.

    The provided ty will be bound to an ID in storage. The ID can then be used in AssetType::Custom. Should the ty already exist in storage, no second ID is assigned to it.

    Arguments

    • origin who called the extrinsic.

    • ty contains the string representation of the asset type.

registerTicker(ticker: Ticker)

  • interface: api.tx.asset.registerTicker

  • summary: Registers a new ticker or extends validity of an existing ticker. NB: Ticker validity does not get carry forward when renewing ticker.

    Arguments

    • origin It contains the secondary key of the caller (i.e. who signed the transaction to execute this function).

    • ticker ticker to register.

    Permissions

    • Asset

removeDocuments(ids: Vec<DocumentId>, ticker: Ticker)

  • interface: api.tx.asset.removeDocuments

  • summary: Remove documents for a given token.

    Arguments

    • origin is a signer that has permissions to act as an agent of ticker.

    • ticker Ticker of the token.

    • ids Documents ids to be removed from ticker.

    Permissions

    • Asset

renameAsset(ticker: Ticker, name: AssetName)

  • interface: api.tx.asset.renameAsset

  • summary: Renames a given token.

    Arguments

    • origin - the secondary key of the sender.

    • ticker - the ticker of the token.

    • name - the new name of the token.

    Errors

    • MaxLengthOfAssetNameExceeded if length of name is greater than T::AssetNameMaxLength.

    Permissions

    • Asset

reserveClassicTicker(classic_ticker_import: ClassicTickerImport, contract_did: IdentityId, config: TickerRegistrationConfig)

  • interface: api.tx.asset.reserveClassicTicker

  • summary: Reserve a Polymath Classic (PMC) ticker. Must be called by root, and assigns the ticker to a systematic DID.

    Arguments

    • origin which must be root.

    • classic_ticker_import specification for the PMC ticker.

    • contract_did to reserve the ticker to if classic_ticker_import.is_contract holds.

    • config to use for expiry and ticker length.

    Errors

    • AssetAlreadyCreated if classic_ticker_import.ticker was created as an asset.

    • TickerTooLong if the config considers the classic_ticker_import.ticker too long.

    • TickerAlreadyRegistered if classic_ticker_import.ticker was already registered.

setFundingRound(ticker: Ticker, name: FundingRoundName)

  • interface: api.tx.asset.setFundingRound

  • summary: Sets the name of the current funding round.

    Arguments

    • origin - a signer that has permissions to act as an agent of ticker.

    • ticker - the ticker of the token.

    • name - the desired name of the current funding round.

    Errors

    • FundingRoundNameMaxLengthExceeded if length of name is greater than T::FundingRoundNameMaxLength.

    Permissions

    • Asset

unfreeze(ticker: Ticker)

  • interface: api.tx.asset.unfreeze

  • summary: Unfreezes transfers and minting of a given token.

    Arguments

    • origin - the secondary key of the sender.

    • ticker - the ticker of the frozen token.

    Errors

    • NotFrozen if ticker is not frozen yet.

    Permissions

    • Asset

updateIdentifiers(ticker: Ticker, identifiers: Vec<AssetIdentifier>)

  • interface: api.tx.asset.updateIdentifiers

  • summary: Updates the asset identifiers.

    Arguments

    • origin - a signer that has permissions to act as an agent of ticker.

    • ticker - the ticker of the token.

    • identifiers - the asset identifiers to be updated in the form of a vector of pairs of IdentifierType and AssetIdentifier value.

    Errors

    • InvalidAssetIdentifier if identifiers contains any invalid identifier.

    Permissions

    • Asset

authorityDiscovery


authorship

setUncles(new_uncles: Vec<Header>)

  • interface: api.tx.authorship.setUncles
  • summary: Provide a set of uncles.

babe

reportEquivocation(equivocation_proof: BabeEquivocationProof, key_owner_proof: KeyOwnerProof)

  • interface: api.tx.babe.reportEquivocation
  • summary: Report authority equivocation/misbehavior. This method will verify the equivocation proof and validate the given key ownership proof against the extracted offender. If both are valid, the offence will be reported.

reportEquivocationUnsigned(equivocation_proof: BabeEquivocationProof, key_owner_proof: KeyOwnerProof)

  • interface: api.tx.babe.reportEquivocationUnsigned
  • summary: Report authority equivocation/misbehavior. This method will verify the equivocation proof and validate the given key ownership proof against the extracted offender. If both are valid, the offence will be reported. This extrinsic must be called unsigned and it is expected that only block authors will call it (validated in ValidateUnsigned), as such if the block author is defined it will be defined as the equivocation reporter.

balances

burnAccountBalance(amount: Balance)

  • interface: api.tx.balances.burnAccountBalance
  • summary: Burns the given amount of tokens from the caller's free, unlocked balance.

depositBlockRewardReserveBalance(value: Compact<Balance>)

  • interface: api.tx.balances.depositBlockRewardReserveBalance
  • summary: Move some POLYX from balance of self to balance of BRR.

forceTransfer(source: LookupSource, dest: LookupSource, value: Compact<Balance>)

  • interface: api.tx.balances.forceTransfer
  • summary: Exactly as transfer, except the origin must be root and the source account may be specified.

setBalance(who: LookupSource, new_free: Compact<Balance>, new_reserved: Compact<Balance>)

  • interface: api.tx.balances.setBalance

  • summary: Set the balances of a given account.

    This will alter FreeBalance and ReservedBalance in storage. it will also decrease the total issuance of the system (TotalIssuance).

    The dispatch origin for this call is root.

transfer(dest: LookupSource, value: Compact<Balance>)

  • interface: api.tx.balances.transfer

  • summary: Transfer some liquid free balance to another account.

    transfer will set the FreeBalance of the sender and receiver. It will decrease the total issuance of the system by the TransferFee.

    The dispatch origin for this call must be Signed by the transactor.

transferWithMemo(dest: LookupSource, value: Compact<Balance>, memo: Option<Memo>)

  • interface: api.tx.balances.transferWithMemo
  • summary: Transfer the native currency with the help of identifier string this functionality can help to differentiate the transfers.

base


bridge

addFreezeAdmin(freeze_admin: AccountId)

  • interface: api.tx.bridge.addFreezeAdmin

  • summary: Add a freeze admin.

    Errors

    • BadAdmin if origin is not Self::admin() account.

batchProposeBridgeTx(bridge_txs: Vec<BridgeTx>)

  • interface: api.tx.bridge.batchProposeBridgeTx

  • summary: Proposes a vector of bridge transactions. The vector is processed until the first proposal which causes an error, in which case the error is returned and the rest of proposals are not processed.

    Errors

    • ControllerNotSet if Controllers was not set.

    Weight 500_000_000 + 7_000_000 * bridge_txs.len()

changeAdmin(admin: AccountId)

  • interface: api.tx.bridge.changeAdmin

  • summary: Changes the bridge admin key.

    Errors

    • BadAdmin if origin is not Self::admin() account.

changeBridgeExempted(exempted: Vec<(IdentityId,bool)>)

  • interface: api.tx.bridge.changeBridgeExempted

  • summary: Changes the bridge limit exempted list.

    Errors

    • BadAdmin if origin is not Self::admin() account.

changeBridgeLimit(amount: Balance, duration: BlockNumber)

  • interface: api.tx.bridge.changeBridgeLimit

  • summary: Changes the bridge limits.

    Errors

    • BadAdmin if origin is not Self::admin() account.

    • DivisionByZero if duration is zero.

changeController(controller: AccountId)

  • interface: api.tx.bridge.changeController

  • summary: Changes the controller account as admin.

    Errors

    • BadAdmin if origin is not Self::admin() account.

changeTimelock(timelock: BlockNumber)

  • interface: api.tx.bridge.changeTimelock

  • summary: Changes the timelock period.

    Errors

    • BadAdmin if origin is not Self::admin() account.

forceHandleBridgeTx(bridge_tx: BridgeTx)

  • interface: api.tx.bridge.forceHandleBridgeTx

  • summary: Forces handling a transaction by bypassing the bridge limit and timelock.

    Errors

    • BadAdmin if origin is not Self::admin() account.

    • NoValidCdd if bridge_tx.recipient does not have a valid CDD claim.

freeze()

  • interface: api.tx.bridge.freeze

  • summary: Freezes transaction handling in the bridge module if it is not already frozen. When the bridge is frozen, attempted transactions get postponed instead of getting handled.

    Errors

    • BadAdmin if origin is not Self::admin() account.

freezeTxs(bridge_txs: Vec<BridgeTx>)

  • interface: api.tx.bridge.freezeTxs

  • summary: Freezes given bridge transactions. If any bridge txn is already handled then this function will just ignore it and process next one.

    Errors

    • BadAdmin if origin is not Self::admin() account.

    Weight 400_000_000 + 2_000_000 * bridge_txs.len()

handleBridgeTx(bridge_tx: BridgeTx)

  • interface: api.tx.bridge.handleBridgeTx

  • summary: Handles an approved bridge transaction proposal.

    Errors

    • BadCaller if origin is not Self::controller or Self::admin.

    • TimelockedTx if the transaction status is Timelocked.

    • ProposalAlreadyHandled if the transaction status is Handled.

handleScheduledBridgeTx(bridge_tx: BridgeTx)

  • interface: api.tx.bridge.handleScheduledBridgeTx

  • summary: Root callable extrinsic, used as an internal call to handle a scheduled timelocked bridge transaction.

    Errors

    • BadOrigin if origin is not root.

    • ProposalAlreadyHandled if transaction status is Handled.

    • FrozenTx if transaction status is Frozen.

proposeBridgeTx(bridge_tx: BridgeTx)

  • interface: api.tx.bridge.proposeBridgeTx

  • summary: Proposes a bridge transaction, which amounts to making a multisig proposal for the bridge transaction if the transaction is new or approving an existing proposal if the transaction has already been proposed.

    Errors

    • ControllerNotSet if Controllers was not set.

removeFreezeAdmin(freeze_admin: AccountId)

  • interface: api.tx.bridge.removeFreezeAdmin

  • summary: Remove a freeze admin.

    Errors

    • BadAdmin if origin is not Self::admin() account.

removeTxs(bridge_txs: Vec<BridgeTx>)

  • interface: api.tx.bridge.removeTxs

  • summary: Remove given bridge transactions.

    Errors

    • BadAdmin if origin is not Self::admin() account.

    • NotFrozen if a tx in bridge_txs is not frozen.

unfreeze()

  • interface: api.tx.bridge.unfreeze

  • summary: Unfreezes transaction handling in the bridge module if it is frozen.

    Errors

    • BadAdmin if origin is not Self::admin() account.

unfreezeTxs(bridge_txs: Vec<BridgeTx>)

  • interface: api.tx.bridge.unfreezeTxs

  • summary: Unfreezes given bridge transactions. If any bridge txn is already handled then this function will just ignore it and process next one.

    Errors

    • BadAdmin if origin is not Self::admin() account.

    Weight 400_000_000 + 7_000_000 * bridge_txs.len()


capitalDistribution

claim(ca_id: CAId)

  • interface: api.tx.capitalDistribution.claim

  • summary: Claim a benefit of the capital distribution attached to ca_id.

    Taxes are withheld as specified by the CA. Post-tax earnings are then transferred to the default portfolio of the origin's DID.

    All benefits are rounded by truncation, down to first integer below. Moreover, before post-tax earnings, in indivisible currencies are transferred, they are rounded down to a whole unit.

    Arguments

    • origin which must be a holder of the asset and eligible for the distribution.

    • ca_id identifies the CA to start a capital distribution for.

    Errors

    • HolderAlreadyPaid if origin's DID has already received its benefit.

    • NoSuchDistribution if there's no capital distribution for ca_id.

    • CannotClaimBeforeStart if now < payment_at.

    • CannotClaimAfterExpiry if now > expiry_at.unwrap().

    • NoSuchCA if ca_id does not identify an existing CA.

    • NotTargetedByCA if the CA does not target origin's DID.

    • BalanceAmountProductOverflowed if ba = balance * amount would overflow.

    • BalanceAmountProductSupplyDivisionFailed if ba * supply would overflow.

    • Other errors can occur if the compliance manager rejects the transfer.

distribute(ca_id: CAId, portfolio: Option<PortfolioNumber>, currency: Ticker, per_share: Balance, amount: Balance, payment_at: Moment, expires_at: Option<Moment>)

  • interface: api.tx.capitalDistribution.distribute

  • summary: Start and attach a capital distribution, to the CA identified by ca_id, with amount funds in currency withdrawn from portfolio belonging to origin's DID.

    The distribution will commence at payment_at and expire at expires_at, if provided, or if None, then there's no expiry.

    The funds will be locked in portfolio from when distribute is called. When there's no expiry, some funds may be locked indefinitely in portfolio, due to claimants not withdrawing or no benefits being pushed to them. For indivisible currencies, unlocked amounts, of less than one whole unit, will not be transferable from portfolio. However, if we imagine that users Alice and Bob both are entitled to 1.5 units, and only receive 1 units each, then 0.5 + 0.5 = 1 units are left in portfolio, which is now transferrable.

    Arguments

    • origin is a signer that has permissions to act as an agent of ca_id.ticker.

    • ca_id identifies the CA to start a capital distribution for.

    • portfolio specifies the portfolio number of the agent to distribute amount from.

    • currency to withdraw and distribute from the portfolio.

    • per_share amount of currency to withdraw and distribute. Specified as a per-million, i.e. 1 / 10^6th of one currency token.

    • amount of currency to withdraw and distribute at most.

    • payment_at specifies when benefits may first be pushed or claimed.

    • expires_at specifies, if provided, when remaining benefits are forfeit and may be reclaimed by origin.

    Errors

    • UnauthorizedAgent if origin is not agent-permissioned for ticker.

    • DistributingAsset if ca_id.ticker == currency.

    • ExpiryBeforePayment if expires_at.unwrap() <= payment_at.

    • NoSuchCA if ca_id does not identify an existing CA.

    • NoRecordDate if CA has no record date.

    • RecordDateAfterStart if CA's record date > payment_at.

    • UnauthorizedCustodian if the caller is not the custodian of portfolio.

    • InsufficientPortfolioBalance if portfolio has less than amount of currency.

    • InsufficientBalance if the protocol fee couldn't be charged.

    • CANotBenefit if the CA is not of kind PredictableBenefit/UnpredictableBenefit

    Permissions

    • Asset

    • Portfolio

pushBenefit(ca_id: CAId, holder: IdentityId)

  • interface: api.tx.capitalDistribution.pushBenefit

  • summary: Push benefit of an ongoing distribution to the given holder.

    Taxes are withheld as specified by the CA. Post-tax earnings are then transferred to the default portfolio of the origin's DID.

    All benefits are rounded by truncation, down to first integer below. Moreover, before post-tax earnings, in indivisible currencies are transferred, they are rounded down to a whole unit.

    Arguments

    • origin is a signer that has permissions to act as an agent of ca_id.ticker.

    • ca_id identifies the CA with a capital distributions to push benefits for.

    • holder to push benefits to.

    Errors

    • UnauthorizedAgent if origin is not agent-permissioned for ticker.

    • NoSuchDistribution if there's no capital distribution for ca_id.

    • CannotClaimBeforeStart if now < payment_at.

    • CannotClaimAfterExpiry if now > expiry_at.unwrap().

    • NoSuchCA if ca_id does not identify an existing CA.

    • NotTargetedByCA if the CA does not target holder.

    • BalanceAmountProductOverflowed if ba = balance * amount would overflow.

    • BalanceAmountProductSupplyDivisionFailed if ba * supply would overflow.

    • Other errors can occur if the compliance manager rejects the transfer.

reclaim(ca_id: CAId)

  • interface: api.tx.capitalDistribution.reclaim

  • summary: Assuming a distribution has expired, unlock the remaining amount in the distributor portfolio.

    Arguments

    • origin which must be the creator of the capital distribution tied to ca_id.

    • ca_id identifies the CA with a capital distribution to reclaim for.

    Errors

    • NoSuchDistribution if there's no capital distribution for ca_id.

    • AlreadyReclaimed if this function has already been called successfully.

    • NotExpired if now < expiry.

removeDistribution(ca_id: CAId)

  • interface: api.tx.capitalDistribution.removeDistribution

  • summary: Removes a distribution that hasn't started yet, unlocking the full amount in the distributor portfolio.

    Arguments

    • origin is a signer that has permissions to act as an agent of ca_id.ticker.

    • ca_id identifies the CA with a not-yet-started capital distribution to remove.

    Errors

    • UnauthorizedAgent if origin is not agent-permissioned for ticker.

    • NoSuchDistribution if there's no capital distribution for ca_id.

    • DistributionStarted if payment_at <= now.


cddServiceProviders

abdicateMembership()

  • interface: api.tx.cddServiceProviders.abdicateMembership

  • summary: Allows the calling member to unilaterally quit without this being subject to a GC vote.

    Arguments

    • origin - Member of committee who wants to quit.

    Error

    • Only primary key can abdicate.

    • Last member of a group cannot abdicate.

addMember(who: IdentityId)

  • interface: api.tx.cddServiceProviders.addMember

  • summary: Adds a member who to the group. May only be called from AddOrigin or root.

    Arguments

    • origin - Origin representing AddOrigin or root

    • who - IdentityId to be added to the group.

disableMember(who: IdentityId, expiry: Option<Moment>, at: Option<Moment>)

  • interface: api.tx.cddServiceProviders.disableMember

  • summary: Disables a member at specific moment.

    Please note that if member is already revoked (a "valid member"), its revocation time-stamp will be updated.

    Any disabled member should NOT allow to act like an active member of the group. For instance, a disabled CDD member should NOT be able to generate a CDD claim. However any generated claim issued before at would be considered as a valid one.

    If you want to invalidate any generated claim, you should use Self::remove_member.

    Arguments

    • at - Revocation time-stamp.

    • who - Target member of the group.

    • expiry - Time-stamp when who is removed from CDD. As soon as it is expired, the generated claims will be "invalid" as who is not considered a member of the group.

removeMember(who: IdentityId)

  • interface: api.tx.cddServiceProviders.removeMember

  • summary: Removes a member who from the set. May only be called from RemoveOrigin or root.

    Any claim previously generated by this member is not valid as a group claim. For instance, if a CDD member group generated a claim for a target identity and then it is removed, that claim will be invalid. In case you want to keep the validity of generated claims, you have to use Self::disable_member function

    Arguments

    • origin - Origin representing RemoveOrigin or root

    • who - IdentityId to be removed from the group.

resetMembers(members: Vec<IdentityId>)

  • interface: api.tx.cddServiceProviders.resetMembers

  • summary: Changes the membership to a new set, disregarding the existing membership. May only be called from ResetOrigin or root.

    Arguments

    • origin - Origin representing ResetOrigin or root

    • members - New set of identities

setActiveMembersLimit(limit: MemberCount)

  • interface: api.tx.cddServiceProviders.setActiveMembersLimit

  • summary: Change this group's limit for how many concurrent active members they may be.

    Arguments

    • limit - the number of active members there may be concurrently.

swapMember(remove: IdentityId, add: IdentityId)

  • interface: api.tx.cddServiceProviders.swapMember

  • summary: Swaps out one member remove for another member add.

    May only be called from SwapOrigin or root.

    Arguments

    • origin - Origin representing SwapOrigin or root

    • remove - IdentityId to be removed from the group.

    • add - IdentityId to be added in place of remove.


checkpoint

createCheckpoint(ticker: Ticker)

  • interface: api.tx.checkpoint.createCheckpoint

  • summary: Creates a single checkpoint at the current time.

    Arguments

    • origin is a signer that has permissions to act as an agent of ticker.

    • ticker to create the checkpoint for.

    Errors

    • UnauthorizedAgent if the DID of origin isn't a permissioned agent for ticker.

    • CounterOverflow if the total checkpoint counter would overflow.

createSchedule(ticker: Ticker, schedule: ScheduleSpec)

  • interface: api.tx.checkpoint.createSchedule

  • summary: Creates a schedule generating checkpoints in the future at either a fixed time or at intervals.

    The schedule starts out with strong_ref_count(schedule_id) <- 0.

    Arguments

    • origin is a signer that has permissions to act as owner of ticker.

    • ticker to create the schedule for.

    • schedule that will generate checkpoints.

    Errors

    • UnauthorizedAgent if the DID of origin isn't a permissioned agent for ticker.

    • ScheduleDurationTooShort if the schedule duration is too short.

    • InsufficientAccountBalance if the protocol fee could not be charged.

    • CounterOverflow if the schedule ID or total checkpoint counters would overflow.

    • FailedToComputeNextCheckpoint if the next checkpoint for schedule is in the past.

    Permissions

    • Asset

removeSchedule(ticker: Ticker, id: ScheduleId)

  • interface: api.tx.checkpoint.removeSchedule

  • summary: Removes the checkpoint schedule of an asset identified by id.

    Arguments

    • origin is a signer that has permissions to act as owner of ticker.

    • ticker to remove the schedule from.

    • id of the schedule, when it was created by created_schedule.

    Errors

    • UnauthorizedAgent if the DID of origin isn't a permissioned agent for ticker.

    • NoCheckpointSchedule if id does not identify a schedule for this ticker.

    • ScheduleNotRemovable if id exists but is not removable.

    Permissions

    • Asset

setSchedulesMaxComplexity(max_complexity: u64)

  • interface: api.tx.checkpoint.setSchedulesMaxComplexity

  • summary: Sets the max complexity of a schedule set for an arbitrary ticker to max_complexity. The new maximum is not enforced retroactively, and only applies once new schedules are made.

    Must be called as a PIP (requires "root").

    Arguments

    • origin is the root origin.

    • max_complexity allowed for an arbitrary ticker's schedule set.


committeeMembership

abdicateMembership()

  • interface: api.tx.committeeMembership.abdicateMembership

  • summary: Allows the calling member to unilaterally quit without this being subject to a GC vote.

    Arguments

    • origin - Member of committee who wants to quit.

    Error

    • Only primary key can abdicate.

    • Last member of a group cannot abdicate.

addMember(who: IdentityId)

  • interface: api.tx.committeeMembership.addMember

  • summary: Adds a member who to the group. May only be called from AddOrigin or root.

    Arguments

    • origin - Origin representing AddOrigin or root

    • who - IdentityId to be added to the group.

disableMember(who: IdentityId, expiry: Option<Moment>, at: Option<Moment>)

  • interface: api.tx.committeeMembership.disableMember

  • summary: Disables a member at specific moment.

    Please note that if member is already revoked (a "valid member"), its revocation time-stamp will be updated.

    Any disabled member should NOT allow to act like an active member of the group. For instance, a disabled CDD member should NOT be able to generate a CDD claim. However any generated claim issued before at would be considered as a valid one.

    If you want to invalidate any generated claim, you should use Self::remove_member.

    Arguments

    • at - Revocation time-stamp.

    • who - Target member of the group.

    • expiry - Time-stamp when who is removed from CDD. As soon as it is expired, the generated claims will be "invalid" as who is not considered a member of the group.

removeMember(who: IdentityId)

  • interface: api.tx.committeeMembership.removeMember

  • summary: Removes a member who from the set. May only be called from RemoveOrigin or root.

    Any claim previously generated by this member is not valid as a group claim. For instance, if a CDD member group generated a claim for a target identity and then it is removed, that claim will be invalid. In case you want to keep the validity of generated claims, you have to use Self::disable_member function

    Arguments

    • origin - Origin representing RemoveOrigin or root

    • who - IdentityId to be removed from the group.

resetMembers(members: Vec<IdentityId>)

  • interface: api.tx.committeeMembership.resetMembers

  • summary: Changes the membership to a new set, disregarding the existing membership. May only be called from ResetOrigin or root.

    Arguments

    • origin - Origin representing ResetOrigin or root

    • members - New set of identities

setActiveMembersLimit(limit: MemberCount)

  • interface: api.tx.committeeMembership.setActiveMembersLimit

  • summary: Change this group's limit for how many concurrent active members they may be.

    Arguments

    • limit - the number of active members there may be concurrently.

swapMember(remove: IdentityId, add: IdentityId)

  • interface: api.tx.committeeMembership.swapMember

  • summary: Swaps out one member remove for another member add.

    May only be called from SwapOrigin or root.

    Arguments

    • origin - Origin representing SwapOrigin or root

    • remove - IdentityId to be removed from the group.

    • add - IdentityId to be added in place of remove.


complianceManager

addComplianceRequirement(ticker: Ticker, sender_conditions: Vec<Condition>, receiver_conditions: Vec<Condition>)

  • interface: api.tx.complianceManager.addComplianceRequirement

  • summary: Adds a compliance requirement to an asset's compliance by ticker. If the compliance requirement is a duplicate, it does nothing.

    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

addDefaultTrustedClaimIssuer(ticker: Ticker, issuer: TrustedIssuer)

  • interface: api.tx.complianceManager.addDefaultTrustedClaimIssuer

  • summary: 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

changeComplianceRequirement(ticker: Ticker, new_req: ComplianceRequirement)

  • interface: api.tx.complianceManager.changeComplianceRequirement

  • summary: 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

pauseAssetCompliance(ticker: Ticker)

  • interface: api.tx.complianceManager.pauseAssetCompliance

  • summary: 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

removeComplianceRequirement(ticker: Ticker, id: u32)

  • interface: api.tx.complianceManager.removeComplianceRequirement

  • summary: 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

removeDefaultTrustedClaimIssuer(ticker: Ticker, issuer: IdentityId)

  • interface: api.tx.complianceManager.removeDefaultTrustedClaimIssuer

  • summary: 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

replaceAssetCompliance(ticker: Ticker, asset_compliance: Vec<ComplianceRequirement>)

  • interface: api.tx.complianceManager.replaceAssetCompliance

  • summary: 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 if origin is not the owner of the ticker.

    • DuplicateAssetCompliance if asset_compliance contains multiple entries with the same requirement_id.

    Permissions

    • Asset

resetAssetCompliance(ticker: Ticker)

  • interface: api.tx.complianceManager.resetAssetCompliance

  • summary: 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

resumeAssetCompliance(ticker: Ticker)

  • interface: api.tx.complianceManager.resumeAssetCompliance

  • summary: 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

corporateAction

changeRecordDate(ca_id: CAId, record_date: Option<RecordDateSpec>)

  • interface: api.tx.corporateAction.changeRecordDate

  • summary: 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

initiateCorporateAction(ticker: Ticker, kind: CAKind, decl_date: Moment, record_date: Option<RecordDateSpec>, details: CADetails, targets: Option<TargetIdentities>, default_withholding_tax: Option<Tax>, withholding_tax: Option<Vec<(IdentityId,Tax)>>)

  • interface: api.tx.corporateAction.initiateCorporateAction

  • summary: 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

linkCaDoc(id: CAId, docs: Vec<DocumentId>)

  • interface: api.tx.corporateAction.linkCaDoc

  • summary: 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

removeCa(ca_id: CAId)

  • interface: api.tx.corporateAction.removeCa

  • summary: 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

setDefaultTargets(ticker: Ticker, targets: TargetIdentities)

  • interface: api.tx.corporateAction.setDefaultTargets

  • summary: 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

setDefaultWithholdingTax(ticker: Ticker, tax: Tax)

  • interface: api.tx.corporateAction.setDefaultWithholdingTax

  • summary: 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

setDidWithholdingTax(ticker: Ticker, taxed_did: IdentityId, tax: Option<Tax>)

  • interface: api.tx.corporateAction.setDidWithholdingTax

  • summary: 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

setMaxDetailsLength(length: u32)

  • interface: api.tx.corporateAction.setMaxDetailsLength
  • summary: Set the max length of details in terms of bytes. May only be called via a PIP.

corporateBallot

attachBallot(ca_id: CAId, range: BallotTimeRange, meta: BallotMeta, rcv: bool)

  • interface: api.tx.corporateBallot.attachBallot

  • summary: Attach a corporate ballot to the CA identified by ca_id.

    The ballot will admit votes within range. The ballot's metadata is provided by meta, which includes the ballot title, the motions, their choices, etc. See the BallotMeta for more.

    Arguments

    • origin is a signer that has permissions to act as an agent of ca_id.ticker.

    • ca_id identifies the CA to attach the ballot to.

    • range specifies when voting starts and ends.

    • meta specifies the ballot's metadata as aforementioned.

    • rcv specifies whether RCV is enabled for this ballot.

    Errors

    • UnauthorizedAgent if origin is not agent-permissioned for ticker.

    • NoSuchCA if ca_id does not identify an existing CA.

    • CANotNotice if the CA is not of the IssuerNotice kind.

    • StartAfterEnd if range.start > range.end.

    • NowAfterEnd if now > range.end where now is the current timestamp.

    • NoRecordDate if CA has no record date.

    • RecordDateAfterStart if date > range.start where date is the CA's record date.

    • AlreadyExists if there's a ballot already.

    • NumberOfChoicesOverflow if the total choice in meta overflows usize.

    • TooLong if any of the embedded strings in meta are too long.

    • InsufficientBalance if the protocol fee couldn't be charged.

changeEnd(ca_id: CAId, end: Moment)

  • interface: api.tx.corporateBallot.changeEnd

  • summary: Amend the end date of the ballot of the CA identified by ca_id.

    Arguments

    • origin is a signer that has permissions to act as an agent of ca_id.ticker.

    • ca_id identifies the attached ballot's CA.

    • end specifies the new end date of the ballot.

    Errors

    • UnauthorizedAgent if origin is not agent-permissioned for ticker.

    • NoSuchBallot if ca_id does not identify a ballot.

    • VotingAlreadyStarted if start >= now, where now is the current time.

    • StartAfterEnd if start > end.

changeMeta(ca_id: CAId, meta: BallotMeta)

  • interface: api.tx.corporateBallot.changeMeta

  • summary: Amend the metadata (title, motions, etc.) of the ballot of the CA identified by ca_id.

    Arguments

    • origin is a signer that has permissions to act as an agent of ca_id.ticker.

    • ca_id identifies the attached ballot's CA.

    • meta specifies the new metadata.

    Errors

    • UnauthorizedAgent if origin is not agent-permissioned for ticker.

    • NoSuchBallot if ca_id does not identify a ballot.

    • VotingAlreadyStarted if start >= now, where now is the current time.

    • NumberOfChoicesOverflow if the total choice in meta overflows usize.

    • TooLong if any of the embedded strings in meta are too long.

changeRcv(ca_id: CAId, rcv: bool)

  • interface: api.tx.corporateBallot.changeRcv

  • summary: Amend RCV support for the ballot of the CA identified by ca_id.

    Arguments

    • origin is a signer that has permissions to act as an agent of ca_id.ticker.

    • ca_id identifies the attached ballot's CA.

    • rcv specifies if RCV is to be supported or not.

    Errors

    • UnauthorizedAgent if origin is not agent-permissioned for ticker.

    • NoSuchBallot if ca_id does not identify a ballot.

    • VotingAlreadyStarted if start >= now, where now is the current time.

removeBallot(ca_id: CAId)

  • interface: api.tx.corporateBallot.removeBallot

  • summary: Remove the ballot of the CA identified by ca_id.

    Arguments

    • origin is a signer that has permissions to act as an agent of ca_id.ticker.

    • ca_id identifies the attached ballot's CA.

    Errors

    • UnauthorizedAgent if origin is not agent-permissioned for ticker.

    • NoSuchBallot if ca_id does not identify a ballot.

    • VotingAlreadyStarted if start >= now, where now is the current time.

vote(ca_id: CAId, votes: Vec<BallotVote>)

  • interface: api.tx.corporateBallot.vote

  • summary: Cast votes in the ballot attached to the CA identified by ca_id.

    Arguments

    • origin which must be a permissioned signer targeted by the CA.

    • ca_id identifies the attached ballot's CA.

    • votes specifies the balances to assign to each choice in the ballot. The full voting power of origin's DID may be used for each motion in the ballot.

    Errors

    • NoSuchBallot if ca_id does not identify a ballot.

    • VotingNotStarted if the voting period hasn't commenced yet.

    • VotingAlreadyEnded if the voting period has ended.

    • WrongVoteCount if the number of choices in the ballot does not match votes.len().

    • NoSuchCA if ca_id does not identify an existing CA.

    • NotTargetedByCA if the CA does not target origin's DID.

    • InsufficientVotes if the voting power used for any motion in votes exceeds origin's DID's voting power.


externalAgents

abdicate(ticker: Ticker)

  • interface: api.tx.externalAgents.abdicate

  • summary: Abdicate agentship for ticker.

    Arguments

    • ticker of which the caller is an agent.

    Errors

    • NotAnAgent if the caller is not an agent of ticker.

    • RemovingLastFullAgent if the caller is the last full agent.

    Permissions

    • Asset

acceptBecomeAgent(auth_id: u64)

  • interface: api.tx.externalAgents.acceptBecomeAgent

  • summary: Accept an authorization by an agent "Alice" who issued auth_id to also become an agent of the ticker Alice specified.

    Arguments

    • auth_id identifying the authorization to accept.

    Errors

    • AuthorizationError::Invalid if auth_id does not exist for the given caller.

    • AuthorizationError::Expired if auth_id is for an auth that has expired.

    • AuthorizationError::BadType if auth_id was not for a BecomeAgent auth type.

    • UnauthorizedAgent if "Alice" is not permissioned to provide the auth.

    • NoSuchAG if the group referred to a custom that does not exist.

    • AlreadyAnAgent if the caller is already an agent of the ticker.

    Permissions

    • Agent

changeGroup(ticker: Ticker, agent: IdentityId, group: AgentGroup)

  • interface: api.tx.externalAgents.changeGroup

  • summary: Change the agent group that agent belongs to in ticker.

    Arguments

    • ticker that has the agent.

    • agent of ticker to change the group for.

    • group that agent will belong to in ticker.

    Errors

    • UnauthorizedAgent if origin was not authorized as an agent to call this.

    • NoSuchAG if id does not identify a custom AG.

    • NotAnAgent if agent is not an agent of ticker.

    • RemovingLastFullAgent if agent was a Full one and is being demoted.

    Permissions

    • Asset

    • Agent

createGroup(ticker: Ticker, perms: ExtrinsicPermissions)

  • interface: api.tx.externalAgents.createGroup

  • summary: Creates a custom agent group (AG) for the given ticker.

    The AG will have the permissions as given by perms. This new AG is then assigned id = AGIdSequence::get() + 1 as its AGId, which you can use as AgentGroup::Custom(id) when adding agents for ticker.

    Arguments

    • ticker to add the custom group for.

    • perms that the new AG will have.

    Errors

    • UnauthorizedAgent if origin was not authorized as an agent to call this.

    • TooLong if perms had some string or list length that was too long.

    • CounterOverflow if AGIdSequence::get() + 1 would exceed u32::MAX.

    Permissions

    • Asset

    • Agent

removeAgent(ticker: Ticker, agent: IdentityId)

  • interface: api.tx.externalAgents.removeAgent

  • summary: Remove the given agent from ticker.

    Arguments

    • ticker that has the agent to remove.

    • agent of ticker to remove.

    Errors

    • UnauthorizedAgent if origin was not authorized as an agent to call this.

    • NotAnAgent if agent is not an agent of ticker.

    • RemovingLastFullAgent if agent is the last full one.

    Permissions

    • Asset

    • Agent

setGroupPermissions(ticker: Ticker, id: AGId, perms: ExtrinsicPermissions)

  • interface: api.tx.externalAgents.setGroupPermissions

  • summary: Updates the permissions of the custom AG identified by id, for the given ticker.

    Arguments

    • ticker the custom AG belongs to.

    • id for the custom AG within ticker.

    • perms to update the custom AG to.

    Errors

    • UnauthorizedAgent if origin was not authorized as an agent to call this.

    • TooLong if perms had some string or list length that was too long.

    • NoSuchAG if id does not identify a custom AG.

    Permissions

    • Asset

    • Agent


grandpa

noteStalled(delay: BlockNumber, best_finalized_block_number: BlockNumber)

  • interface: api.tx.grandpa.noteStalled
  • summary: Note that the current authority set of the GRANDPA finality gadget has stalled. This will trigger a forced authority set change at the beginning of the next session, to be enacted delay blocks after that. The delay should be high enough to safely assume that the block signalling the forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters will start the new authority set using the given finalized block as base. Only callable by root.

reportEquivocation(equivocation_proof: GrandpaEquivocationProof, key_owner_proof: KeyOwnerProof)

  • interface: api.tx.grandpa.reportEquivocation
  • summary: Report voter equivocation/misbehavior. This method will verify the equivocation proof and validate the given key ownership proof against the extracted offender. If both are valid, the offence will be reported.

reportEquivocationUnsigned(equivocation_proof: GrandpaEquivocationProof, key_owner_proof: KeyOwnerProof)

  • interface: api.tx.grandpa.reportEquivocationUnsigned

  • summary: Report voter equivocation/misbehavior. This method will verify the equivocation proof and validate the given key ownership proof against the extracted offender. If both are valid, the offence will be reported.

    This extrinsic must be called unsigned and it is expected that only block authors will call it (validated in ValidateUnsigned), as such if the block author is defined it will be defined as the equivocation reporter.


identity

acceptPrimaryKey(rotation_auth_id: u64, optional_cdd_auth_id: Option<u64>)

  • interface: api.tx.identity.acceptPrimaryKey

  • summary: Call this with the new primary key. By invoking this method, caller accepts authorization to become the new primary key of the issuing identity. If a CDD service provider approved this change (or this is not required), primary key of the DID is updated.

    The caller (new primary key) must be either a secondary key of the issuing identity, or unlinked to any identity.

    Differs from rotate_primary_key_to_secondary in that it will unlink the old primary key instead of leaving it as a secondary key.

    Arguments

    • owner_auth_id Authorization from the owner who initiated the change

    • cdd_auth_id Authorization from a CDD service provider

addAuthorization(target: Signatory, data: AuthorizationData, expiry: Option<Moment>)

  • interface: api.tx.identity.addAuthorization
  • summary: Adds an authorization.

addClaim(target: IdentityId, claim: Claim, expiry: Option<Moment>)

  • interface: api.tx.identity.addClaim

  • summary: Adds a new claim record or edits an existing one.

    Only called by did_issuer's secondary key.

addInvestorUniquenessClaim(target: IdentityId, claim: Claim, proof: InvestorZKProofData, expiry: Option<Moment>)

  • interface: api.tx.identity.addInvestorUniquenessClaim

  • summary: Add Claim::InvestorUniqueness claim for a given target identity.

    Arguments

    • origin - Who provides the claim to the user? In this case, it's the user's account id as the user provides.

    • target - IdentityId to which the claim gets assigned.

    • claim - InvestorUniqueness claim details.

    • proof - To validate the self attestation.

    • expiry - Expiry of claim.

    Errors

    • DidMustAlreadyExist Target should already been a part of the ecosystem.

    • ClaimVariantNotAllowed When origin trying to pass claim variant other than InvestorUniqueness.

    • ConfidentialScopeClaimNotAllowed When issuer is different from target or CDD_ID is invalid for given user.

    • `InvalidScopeClaim When proof is invalid.

addInvestorUniquenessClaimV2(target: IdentityId, scope: Scope, claim: Claim, proof: ScopeClaimProof, expiry: Option<Moment>)

  • interface: api.tx.identity.addInvestorUniquenessClaimV2

addSecondaryKeysWithAuthorization(additional_keys: Vec<SecondaryKeyWithAuth>, expires_at: Moment)

  • interface: api.tx.identity.addSecondaryKeysWithAuthorization

  • summary: It adds secondary keys to target identity id. Keys are directly added to identity because each of them has an authorization.

    Arguments:

    • origin Primary key of id identity.

    • id Identity where new secondary keys will be added.

    • additional_keys New secondary items (and their authorization data) to add to target identity.

    Failure

    • It can only called by primary key owner.

    • Keys should be able to linked to any identity.

cddRegisterDid(target_account: AccountId, secondary_keys: Vec<SecondaryKey>)

  • interface: api.tx.identity.cddRegisterDid

  • summary: Register target_account with a new Identity.

    Failure

    • origin has to be a active CDD provider. Inactive CDD providers cannot add new claims.

    • target_account (primary key of the new Identity) can be linked to just one and only one identity.

    • External secondary keys can be linked to just one identity.

    Weight 7_000_000_000 + 600_000 * secondary_keys.len()

changeCddRequirementForMkRotation(auth_required: bool)

  • interface: api.tx.identity.changeCddRequirementForMkRotation

  • summary: Set if CDD authorization is required for updating primary key of an identity. Callable via root (governance)

    Arguments

    • auth_required CDD Authorization required or not

freezeSecondaryKeys()

  • interface: api.tx.identity.freezeSecondaryKeys

  • summary: It disables all secondary keys at did identity.

    Errors

gcAddCddClaim(target: IdentityId)

  • interface: api.tx.identity.gcAddCddClaim
  • summary: Assuming this is executed by the GC voting majority, adds a new cdd claim record.

gcRevokeCddClaim(target: IdentityId)

  • interface: api.tx.identity.gcRevokeCddClaim
  • summary: Assuming this is executed by the GC voting majority, removes an existing cdd claim record.

invalidateCddClaims(cdd: IdentityId, disable_from: Moment, expiry: Option<Moment>)

  • interface: api.tx.identity.invalidateCddClaims

  • summary: Invalidates any claim generated by cdd from disable_from timestamps.

    You can also define an expiration time, which will invalidate all claims generated by that cdd and remove it as CDD member group.

joinIdentityAsKey(auth_id: u64)

  • interface: api.tx.identity.joinIdentityAsKey
  • summary: Join an identity as a secondary key.

leaveIdentityAsKey()

  • interface: api.tx.identity.leaveIdentityAsKey
  • summary: Leave the secondary key's identity.

legacySetPermissionToSigner(signer: Signatory, permissions: LegacyPermissions)

  • interface: api.tx.identity.legacySetPermissionToSigner
  • summary: This function is a workaround for https://github.com/polkadot-js/apps/issues/3632 It sets permissions for an specific target_key key. Only the primary key of an identity is able to set secondary key permissions.

removeAuthorization(target: Signatory, auth_id: u64, _auth_issuer_pays: bool)

  • interface: api.tx.identity.removeAuthorization
  • summary: Removes an authorization. _auth_issuer_pays determines whether the issuer of the authorisation pays the transaction fee

removeSecondaryKeys(signers_to_remove: Vec<Signatory>)

revokeClaim(target: IdentityId, claim: Claim)

  • interface: api.tx.identity.revokeClaim
  • summary: Marks the specified claim as revoked.

revokeClaimByIndex(target: IdentityId, claim_type: ClaimType, scope: Option<Scope>)

  • interface: api.tx.identity.revokeClaimByIndex

  • summary: Revokes a specific claim using its Claim Unique Index composed by target, claim_type, and scope.

    Please note that origin must be the issuer of the target claim.

    Errors

    • TargetHasNonZeroBalanceAtScopeId when you try to revoke a InvestorUniqueness* claim, and target identity still have any balance on the given scope.

rotatePrimaryKeyToSecondary(auth_id: u64, optional_cdd_auth_id: Option<u64>)

  • interface: api.tx.identity.rotatePrimaryKeyToSecondary

  • summary: Call this with the new primary key. By invoking this method, caller accepts authorization to become the new primary key of the issuing identity. If a CDD service provider approved this change, (or this is not required), primary key of the DID is updated.

    The caller (new primary key) must be either a secondary key of the issuing identity, or unlinked to any identity.

    Differs from accept_primary_key in that it will leave the old primary key as a secondary key with the permissions specified in the corresponding RotatePrimaryKeyToSecondary authorization instead of unlinking the old primary key.

    Arguments

    • owner_auth_id Authorization from the owner who initiated the change

    • cdd_auth_id Authorization from a CDD service provider

setPermissionToSigner(signer: Signatory, perms: Permissions)

  • interface: api.tx.identity.setPermissionToSigner

  • summary: Sets permissions for an specific target_key key.

    Only the primary key of an identity is able to set secondary key permissions.

unfreezeSecondaryKeys()

  • interface: api.tx.identity.unfreezeSecondaryKeys
  • summary: Re-enables all secondary keys of the caller's identity.

imOnline

heartbeat(heartbeat: Heartbeat, _signature: Signature)

  • interface: api.tx.imOnline.heartbeat
  • summary:

indices

claim(index: AccountIndex)

  • interface: api.tx.indices.claim

  • summary: Assign an previously unassigned index.

    Payment: Deposit is reserved from the sender account.

    The dispatch origin for this call must be Signed.

    • index: the index to be claimed. This must not be in use.

    Emits IndexAssigned if successful.

forceTransfer(new: AccountId, index: AccountIndex, freeze: bool)

  • interface: api.tx.indices.forceTransfer

  • summary: Force an index to an account. This doesn't require a deposit. If the index is already held, then any deposit is reimbursed to its current owner.

    The dispatch origin for this call must be Root.

    • index: the index to be (re-)assigned.

    • new: the new owner of the index. This function is a no-op if it is equal to sender.

    • freeze: if set to true, will freeze the index so it cannot be transferred.

    Emits IndexAssigned if successful.

free(index: AccountIndex)

  • interface: api.tx.indices.free

  • summary: Free up an index owned by the sender.

    Payment: Any previous deposit placed for the index is unreserved in the sender account.

    The dispatch origin for this call must be Signed and the sender must own the index.

    • index: the index to be freed. This must be owned by the sender.

    Emits IndexFreed if successful.

freeze(index: AccountIndex)

  • interface: api.tx.indices.freeze

  • summary: Freeze an index so it will always point to the sender account. This consumes the deposit.

    The dispatch origin for this call must be Signed and the signing account must have a non-frozen account index.

    • index: the index to be frozen in place.

    Emits IndexFrozen if successful.

transfer(new: AccountId, index: AccountIndex)

  • interface: api.tx.indices.transfer

  • summary: Assign an index already owned by the sender to another account. The balance reservation is effectively transferred to the new account.

    The dispatch origin for this call must be Signed.

    • index: the index to be re-assigned. This must be owned by the sender.

    • new: the new owner of the index. This function is a no-op if it is equal to sender.

    Emits IndexAssigned if successful.


multiSig

acceptMultisigSignerAsIdentity(auth_id: u64)

  • interface: api.tx.multiSig.acceptMultisigSignerAsIdentity

  • summary: Accepts a multisig signer authorization given to signer's identity.

    Arguments

    • auth_id - Auth id of the authorization.

acceptMultisigSignerAsKey(auth_id: u64)

  • interface: api.tx.multiSig.acceptMultisigSignerAsKey

  • summary: Accepts a multisig signer authorization given to signer's key (AccountId).

    Arguments

    • auth_id - Auth id of the authorization.

addMultisigSigner(signer: Signatory)

  • interface: api.tx.multiSig.addMultisigSigner

  • summary: Adds a signer to the multisig. This must be called by the multisig itself.

    Arguments

    • signer - Signatory to add.

addMultisigSignersViaCreator(multisig: AccountId, signers: Vec<Signatory>)

  • interface: api.tx.multiSig.addMultisigSignersViaCreator

  • summary: Adds a signer to the multisig. This must be called by the creator identity of the multisig.

    Arguments

    • multisig - Address of the multi sig

    • signers - Signatories to add.

    Weight 900_000_000 + 3_000_000 * signers.len()

approveAsIdentity(multisig: AccountId, proposal_id: u64)

  • interface: api.tx.multiSig.approveAsIdentity

  • summary: Approves a multisig proposal using the caller's identity.

    Arguments

    • multisig - MultiSig address.

    • proposal_id - Proposal id to approve. If quorum is reached, the proposal will be immediately executed.

approveAsKey(multisig: AccountId, proposal_id: u64)

  • interface: api.tx.multiSig.approveAsKey

  • summary: Approves a multisig proposal using the caller's secondary key (AccountId).

    Arguments

    • multisig - MultiSig address.

    • proposal_id - Proposal id to approve. If quorum is reached, the proposal will be immediately executed.

changeSigsRequired(sigs_required: u64)

  • interface: api.tx.multiSig.changeSigsRequired

  • summary: Changes the number of signatures required by a multisig. This must be called by the multisig itself.

    Arguments

    • sigs_required - New number of required signatures.

createMultisig(signers: Vec<Signatory>, sigs_required: u64)

  • interface: api.tx.multiSig.createMultisig

  • summary: Creates a multisig

    Arguments

    • signers - Signers of the multisig (They need to accept authorization before they are actually added).

    • sigs_required - Number of sigs required to process a multi-sig tx.

createOrApproveProposalAsIdentity(multisig: AccountId, proposal: Proposal, expiry: Option<Moment>, auto_close: bool)

  • interface: api.tx.multiSig.createOrApproveProposalAsIdentity

  • summary: Creates a multisig proposal if it hasn't been created or approves it if it has.

    Arguments

    • multisig - MultiSig address.

    • proposal - Proposal to be voted on.

    • expiry - Optional proposal expiry time.

    • auto_close - Close proposal on receiving enough reject votes. If this is 1 out of m multisig, the proposal will be immediately executed.

createOrApproveProposalAsKey(multisig: AccountId, proposal: Proposal, expiry: Option<Moment>, auto_close: bool)

  • interface: api.tx.multiSig.createOrApproveProposalAsKey

  • summary: Creates a multisig proposal if it hasn't been created or approves it if it has.

    Arguments

    • multisig - MultiSig address.

    • proposal - Proposal to be voted on.

    • expiry - Optional proposal expiry time.

    • auto_close - Close proposal on receiving enough reject votes. If this is 1 out of m multisig, the proposal will be immediately executed.

createProposalAsIdentity(multisig: AccountId, proposal: Proposal, expiry: Option<Moment>, auto_close: bool)

  • interface: api.tx.multiSig.createProposalAsIdentity

  • summary: Creates a multisig proposal

    Arguments

    • multisig - MultiSig address.

    • proposal - Proposal to be voted on.

    • expiry - Optional proposal expiry time.

    • auto_close - Close proposal on receiving enough reject votes. If this is 1 out of m multisig, the proposal will be immediately executed.

createProposalAsKey(multisig: AccountId, proposal: Proposal, expiry: Option<Moment>, auto_close: bool)

  • interface: api.tx.multiSig.createProposalAsKey

  • summary: Creates a multisig proposal

    Arguments

    • multisig - MultiSig address.

    • proposal - Proposal to be voted on.

    • expiry - Optional proposal expiry time.

    • auto_close - Close proposal on receiving enough reject votes. If this is 1 out of m multisig, the proposal will be immediately executed.

executeScheduledProposal(multisig: AccountId, proposal_id: u64, multisig_did: IdentityId, _proposal_weight: Weight)

  • interface: api.tx.multiSig.executeScheduledProposal
  • summary: Root callable extrinsic, used as an internal call for executing scheduled multisig proposal.

makeMultisigPrimary(multisig: AccountId, optional_cdd_auth_id: Option<u64>)

  • interface: api.tx.multiSig.makeMultisigPrimary

  • summary: Adds a multisig as the primary key of the current did if the current DID is the creator of the multisig.

    Arguments

    • multi_sig - multi sig address

makeMultisigSigner(multisig: AccountId)

  • interface: api.tx.multiSig.makeMultisigSigner

  • summary: Adds a multisig as a signer of current did if the current did is the creator of the multisig.

    Arguments

    • multisig - multi sig address

rejectAsIdentity(multisig: AccountId, proposal_id: u64)

  • interface: api.tx.multiSig.rejectAsIdentity

  • summary: Rejects a multisig proposal using the caller's identity.

    Arguments

    • multisig - MultiSig address.

    • proposal_id - Proposal id to reject. If quorum is reached, the proposal will be immediately executed.

rejectAsKey(multisig: AccountId, proposal_id: u64)

  • interface: api.tx.multiSig.rejectAsKey

  • summary: Rejects a multisig proposal using the caller's secondary key (AccountId).

    Arguments

    • multisig - MultiSig address.

    • proposal_id - Proposal id to reject. If quorum is reached, the proposal will be immediately executed.

removeMultisigSigner(signer: Signatory)

  • interface: api.tx.multiSig.removeMultisigSigner

  • summary: Removes a signer from the multisig. This must be called by the multisig itself.

    Arguments

    • signer - Signatory to remove.

removeMultisigSignersViaCreator(multisig: AccountId, signers: Vec<Signatory>)

  • interface: api.tx.multiSig.removeMultisigSignersViaCreator

  • summary: Removes a signer from the multisig. This must be called by the creator identity of the multisig.

    Arguments

    • multisig - Address of the multisig.

    • signers - Signatories to remove.

    Weight 900_000_000 + 3_000_000 * signers.len()


offences


pips

approveCommitteeProposal(id: PipId)

  • interface: api.tx.pips.approveCommitteeProposal

  • summary: Approves the pending committee PIP given by the id.

    Errors

    • BadOrigin unless a GC voting majority executes this function.

    • NoSuchProposal if the PIP with id doesn't exist.

    • IncorrectProposalState if the proposal isn't pending.

    • NotByCommittee if the proposal isn't by a committee.

clearSnapshot()

  • interface: api.tx.pips.clearSnapshot

  • summary: Clears the snapshot and emits the event SnapshotCleared.

    Errors

    • NotACommitteeMember - triggered when a non-GC-member executes the function.

enactSnapshotResults(results: Vec<(PipId,SnapshotResult)>)

  • interface: api.tx.pips.enactSnapshotResults

  • summary: Enacts results for the PIPs in the snapshot queue. The snapshot will be available for further enactments until it is cleared.

    The results are encoded a list of (id, result) where result is applied to id. Note that the snapshot priority queue is encoded with the lowest priority first. so results = [(id, Approve)] will approve SnapshotQueue[SnapshotQueue.len() - 1].

    Errors

    • BadOrigin - unless a GC voting majority executes this function.

    • CannotSkipPip - a given PIP has already been skipped too many times.

    • SnapshotResultTooLarge - on len(results) > len(snapshot_queue).

    • SnapshotIdMismatch - if: text ∃ (i ∈ 0..SnapshotQueue.len()). results[i].0 ≠ SnapshotQueue[SnapshotQueue.len() - i].id This is protects against clearing queue while GC is voting.

executeScheduledPip(id: PipId)

  • interface: api.tx.pips.executeScheduledPip
  • summary: Internal dispatchable that handles execution of a PIP.

expireScheduledPip(did: IdentityId, id: PipId)

  • interface: api.tx.pips.expireScheduledPip
  • summary: Internal dispatchable that handles expiration of a PIP.

propose(proposal: Proposal, deposit: Balance, url: Option<Url>, description: Option<PipDescription>)

  • interface: api.tx.pips.propose

  • summary: A network member creates a PIP by submitting a dispatchable which changes the network in someway. A minimum deposit is required to open a new proposal.

    Arguments

    • proposer is either a signing key or committee. Used to understand whether this is a committee proposal and verified against origin.

    • proposal a dispatchable call

    • deposit minimum deposit value, which is ignored if proposer is a committee.

    • url a link to a website for proposal discussion

pruneProposal(id: PipId)

  • interface: api.tx.pips.pruneProposal

  • summary: Prune the PIP given by the id, refunding any funds not already refunded. The PIP may not be active

    This function is intended for storage garbage collection purposes.

    Errors

    • BadOrigin unless a GC voting majority executes this function.

    • NoSuchProposal if the PIP with id doesn't exist.

    • IncorrectProposalState if the proposal is active.

rejectProposal(id: PipId)

  • interface: api.tx.pips.rejectProposal

  • summary: Rejects the PIP given by the id, refunding any bonded funds, assuming it hasn't been cancelled or executed. Note that proposals scheduled-for-execution can also be rejected.

    Errors

    • BadOrigin unless a GC voting majority executes this function.

    • NoSuchProposal if the PIP with id doesn't exist.

    • IncorrectProposalState if the proposal was cancelled or executed.

rescheduleExecution(id: PipId, until: Option<BlockNumber>)

  • interface: api.tx.pips.rescheduleExecution

  • summary: Updates the execution schedule of the PIP given by id.

    Arguments

    • until defines the future block where the enactment period will finished. None value means that enactment period is going to finish in the next block.

    Errors

    • RescheduleNotByReleaseCoordinator unless triggered by release coordinator.

    • IncorrectProposalState unless the proposal was in a scheduled state.

setActivePipLimit(limit: u32)

  • interface: api.tx.pips.setActivePipLimit

  • summary: Change the maximum number of active PIPs before community members cannot propose anything. Can only be called by root.

    Arguments

    • limit of concurrent active PIPs.

setDefaultEnactmentPeriod(duration: BlockNumber)

  • interface: api.tx.pips.setDefaultEnactmentPeriod

  • summary: Change the default enactment period. Can only be called by root.

    Arguments

    • duration the new default enactment period it takes for a scheduled PIP to be executed.

setMaxPipSkipCount(max: SkippedCount)

  • interface: api.tx.pips.setMaxPipSkipCount

  • summary: Change the maximum skip count (max_pip_skip_count). Can only be called by root.

    Arguments

    • max skips before a PIP cannot be skipped by GC anymore.

setMinProposalDeposit(deposit: Balance)

  • interface: api.tx.pips.setMinProposalDeposit

  • summary: Change the minimum proposal deposit amount required to start a proposal. Can only be called by root.

    Arguments

    • deposit the new min deposit required to start a proposal

setPendingPipExpiry(expiry: MaybeBlock)

  • interface: api.tx.pips.setPendingPipExpiry

  • summary: Change the amount of blocks after which a pending PIP is expired. If expiry is None then PIPs never expire. Can only be called by root.

    Arguments

    • expiry the block-time it takes for a still-Pending PIP to expire.

setPruneHistoricalPips(prune: bool)

  • interface: api.tx.pips.setPruneHistoricalPips

  • summary: Change whether completed PIPs are pruned. Can only be called by root.

    Arguments

    • prune specifies whether completed PIPs should be pruned.

snapshot()

  • interface: api.tx.pips.snapshot

  • summary: Takes a new snapshot of the current list of active && pending PIPs. The PIPs are then sorted into a priority queue based on each PIP's weight.

    Errors

    • NotACommitteeMember - triggered when a non-GC-member executes the function.

vote(id: PipId, aye_or_nay: bool, deposit: Balance)

  • interface: api.tx.pips.vote

  • summary: Vote either in favor (aye_or_nay == true) or against a PIP with id. The "convinction" or strength of the vote is given by deposit, which is reserved.

    Note that vote is not additive. That is, vote(id, true, 50) followed by vote(id, true, 40) will first reserve 50 and then refund 50 - 10, ending up with 40 in deposit. To add atop of existing votes, you'll need existing_deposit + addition.

    Arguments

    • id, proposal id

    • aye_or_nay, a bool representing for or against vote

    • deposit, the "conviction" with which the vote is made.

    Errors

    • NoSuchProposal if id doesn't reference a valid PIP.

    • NotFromCommunity if proposal was made by a committee.

    • IncorrectProposalState if PIP isn't pending.

    • InsufficientDeposit if origin cannot reserve deposit - old_deposit.


polymeshCommittee

setExpiresAfter(expiry: MaybeBlock)

  • interface: api.tx.polymeshCommittee.setExpiresAfter

  • summary: Changes the time after which a proposal expires.

    Arguments

    • expiry - The new expiry time.

setReleaseCoordinator(id: IdentityId)

  • interface: api.tx.polymeshCommittee.setReleaseCoordinator

  • summary: Changes the release coordinator.

    Arguments

    • id - The DID of the new release coordinator.

    Errors

    • NotAMember, If the new coordinator id is not part of the committee.

setVoteThreshold(n: u32, d: u32)

  • interface: api.tx.polymeshCommittee.setVoteThreshold

  • summary: Change the vote threshold the determines the winning proposal. For e.g., for a simple majority use (1, 2) which represents the in-equation ">= 1/2".

    Arguments

    • n - Numerator of the fraction representing vote threshold.

    • d - Denominator of the fraction representing vote threshold.

vote(proposal: Hash, index: ProposalIndex, approve: bool)

  • interface: api.tx.polymeshCommittee.vote

  • summary: Votes approveingly (or not, if false) on an existing proposal given by its hash, index.

    Arguments

    • proposal - A hash of the proposal to be voted on.

    • index - The proposal index.

    • approve - If true than this is a for vote, and against otherwise.

    Errors

    • NotAMember, if the origin is not a member of this committee.

voteOrPropose(approve: bool, call: Call)

  • interface: api.tx.polymeshCommittee.voteOrPropose

  • summary: Proposes to the committee that call should be executed in its name. Alternatively, if the hash of call has already been recorded, i.e., already proposed, then this call counts as a vote, i.e., as if vote_by_hash was called.

    Weight

    The weight of this dispatchable is that of call as well as the complexity for recording the vote itself.

    Arguments

    • approve - is this an approving vote? If the proposal doesn't exist, passing false will result in error FirstVoteReject.

    • call - the call to propose for execution.

    Errors

    • FirstVoteReject, if call hasn't been proposed and approve == false.

    • NotAMember, if the origin is not a member of this committee.


portfolio

acceptPortfolioCustody(auth_id: u64)

  • interface: api.tx.portfolio.acceptPortfolioCustody

createPortfolio(name: PortfolioName)

  • interface: api.tx.portfolio.createPortfolio
  • summary: Creates a portfolio with the given name.

deletePortfolio(num: PortfolioNumber)

  • interface: api.tx.portfolio.deletePortfolio

  • summary: Deletes a user portfolio. A portfolio can be deleted only if it has no funds.

    Errors

    • PortfolioDoesNotExist if num doesn't reference a valid portfolio.

    • PortfolioNotEmpty if the portfolio still holds any asset

    Permissions

    • Portfolio

movePortfolioFunds(from: PortfolioId, to: PortfolioId, items: Vec<MovePortfolioItem>)

  • interface: api.tx.portfolio.movePortfolioFunds

  • summary: Moves a token amount from one portfolio of an identity to another portfolio of the same identity. Must be called by the custodian of the sender. Funds from deleted portfolios can also be recovered via this method.

    A short memo can be added to to each token amount moved.

    Errors

    • PortfolioDoesNotExist if one or both of the portfolios reference an invalid portfolio.

    • destination_is_same_portfolio if both sender and receiver portfolio are the same

    • DifferentIdentityPortfolios if the sender and receiver portfolios belong to different identities

    • UnauthorizedCustodian if the caller is not the custodian of the from portfolio

    • InsufficientPortfolioBalance if the sender does not have enough free balance

    Permissions

    • Portfolio

quitPortfolioCustody(pid: PortfolioId)

  • interface: api.tx.portfolio.quitPortfolioCustody

  • summary: When called by the custodian of portfolio_id, allows returning the custody of the portfolio to the portfolio owner unilaterally.

    Errors

    • UnauthorizedCustodian if the caller is not the current custodian of portfolio_id.

    Permissions

    • Portfolio

renamePortfolio(num: PortfolioNumber, to_name: PortfolioName)

  • interface: api.tx.portfolio.renamePortfolio

  • summary: Renames a non-default portfolio.

    Errors

    • PortfolioDoesNotExist if num doesn't reference a valid portfolio.

    Permissions

    • Portfolio

protocolFee

changeBaseFee(op: ProtocolOp, base_fee: Balance)

  • interface: api.tx.protocolFee.changeBaseFee

  • summary: Changes the a base fee for the root origin.

    Errors

    • BadOrigin - Only root allowed.

changeCoefficient(coefficient: PosRatio)

  • interface: api.tx.protocolFee.changeCoefficient

  • summary: Changes the fee coefficient for the root origin.

    Errors

    • BadOrigin - Only root allowed.

randomnessCollectiveFlip


relayer

acceptPayingKey(auth_id: u64)

  • interface: api.tx.relayer.acceptPayingKey

  • summary: Accepts a paying_key authorization.

    Arguments

    • auth_id the authorization id to accept a paying_key.

    Errors

    • AuthorizationError::Invalid if auth_id does not exist for the given caller.

    • AuthorizationError::Expired if auth_id the authorization has expired.

    • AuthorizationError::BadType if auth_id was not a AddRelayerPayingKey authorization.

    • NotAuthorizedForUserKey if origin is not authorized to accept the authorization for the user_key.

    • NotAuthorizedForPayingKey if the authorization was created an identity different from the paying_key's identity.

    • UserKeyCddMissing if the user_key is not attached to a CDD'd identity.

    • PayingKeyCddMissing if the paying_key is not attached to a CDD'd identity.

    • UnauthorizedCaller if origin is not authorized to call this extrinsic.

decreasePolyxLimit(user_key: AccountId, amount: Balance)

  • interface: api.tx.relayer.decreasePolyxLimit

  • summary: Decrease the available POLYX for a user_key.

    Arguments

    • user_key the user key of the subsidy to update the available POLYX.

    • amount the amount of POLYX to remove from the subsidy of user_key.

    Errors

    • NoPayingKey if the user_key doesn't have a paying_key.

    • NotPayingKey if origin doesn't match the current paying_key.

    • UnauthorizedCaller if origin is not authorized to call this extrinsic.

    • Overlow if the subsidy has less then amount POLYX remaining.

increasePolyxLimit(user_key: AccountId, amount: Balance)

  • interface: api.tx.relayer.increasePolyxLimit

  • summary: Increase the available POLYX for a user_key.

    Arguments

    • user_key the user key of the subsidy to update the available POLYX.

    • amount the amount of POLYX to add to the subsidy of user_key.

    Errors

    • NoPayingKey if the user_key doesn't have a paying_key.

    • NotPayingKey if origin doesn't match the current paying_key.

    • UnauthorizedCaller if origin is not authorized to call this extrinsic.

    • Overlow if the subsidy's remaining POLYX would have overflowed u128::MAX.

removePayingKey(user_key: AccountId, paying_key: AccountId)

  • interface: api.tx.relayer.removePayingKey

  • summary: Removes the paying_key from a user_key.

    Arguments

    • user_key the user key to remove the subsidy from.

    • paying_key the paying key that was subsidising the user_key.

    Errors

    • NotAuthorizedForUserKey if origin is not authorized to remove the subsidy for the user_key.

    • NoPayingKey if the user_key doesn't have a paying_key.

    • NotPayingKey if the paying_key doesn't match the current paying_key.

    • UnauthorizedCaller if origin is not authorized to call this extrinsic.

setPayingKey(user_key: AccountId, polyx_limit: Balance)

  • interface: api.tx.relayer.setPayingKey

  • summary: Creates an authorization to allow user_key to accept the caller (origin == paying_key) as their subsidiser.

    Arguments

    • user_key the user key to subsidise.

    • polyx_limit the initial POLYX limit for this subsidy.

    Errors

    • UnauthorizedCaller if origin is not authorized to call this extrinsic.

updatePolyxLimit(user_key: AccountId, polyx_limit: Balance)

  • interface: api.tx.relayer.updatePolyxLimit

  • summary: Updates the available POLYX for a user_key.

    Arguments

    • user_key the user key of the subsidy to update the available POLYX.

    • polyx_limit the amount of POLYX available for subsidising the user_key.

    Errors

    • NoPayingKey if the user_key doesn't have a paying_key.

    • NotPayingKey if origin doesn't match the current paying_key.

    • UnauthorizedCaller if origin is not authorized to call this extrinsic.


rewards

claimItnReward(reward_address: AccountId, itn_address: AccountId, signature: OffChainSignature)

  • interface: api.tx.rewards.claimItnReward

  • summary: Claim an ITN reward.

    Arguments

    • itn_address specifying the awarded address on ITN.

    • signature authenticating the claim to the reward. The signature should contain reward_address followed by the suffix "claim_itn_reward", and must have been signed by itn_address.

    Errors

    • InsufficientBalance - Itn rewards has insufficient funds to issue the reward.

    • InvalidSignature - signature had an invalid signer or invalid message.

    • ItnRewardAlreadyClaimed - Reward issued to the itn_address has already been claimed.

    • UnknownItnAddress - itn_address is not in the rewards table and has no reward to be claimed.

setItnRewardStatus(itn_address: AccountId, status: ItnRewardStatus)

  • interface: api.tx.rewards.setItnRewardStatus

scheduler

cancel(when: BlockNumber, index: u32)

  • interface: api.tx.scheduler.cancel
  • summary: Cancel an anonymously scheduled task.

cancelNamed(id: Bytes)

  • interface: api.tx.scheduler.cancelNamed
  • summary: Cancel a named scheduled task.

schedule(when: BlockNumber, maybe_periodic: Option<Period>, priority: Priority, call: Call)

  • interface: api.tx.scheduler.schedule
  • summary: Anonymously schedule a task.

scheduleAfter(after: BlockNumber, maybe_periodic: Option<Period>, priority: Priority, call: Call)

  • interface: api.tx.scheduler.scheduleAfter
  • summary: Anonymously schedule a task after a delay.

scheduleNamed(id: Bytes, when: BlockNumber, maybe_periodic: Option<Period>, priority: Priority, call: Call)

  • interface: api.tx.scheduler.scheduleNamed
  • summary: Schedule a named task.

scheduleNamedAfter(id: Bytes, after: BlockNumber, maybe_periodic: Option<Period>, priority: Priority, call: Call)

  • interface: api.tx.scheduler.scheduleNamedAfter
  • summary: Schedule a named task after a delay.

session

purgeKeys()

  • interface: api.tx.session.purgeKeys

  • summary: Removes any session key(s) of the function caller. This doesn't take effect until the next session.

    The dispatch origin of this function must be signed.

setKeys(keys: Keys, proof: Bytes)

  • interface: api.tx.session.setKeys

  • summary: Sets the session key(s) of the function caller to keys. Allows an account to set its session key prior to becoming a validator. This doesn't take effect until the next session.

    The dispatch origin of this function must be signed.


settlement

addAndAffirmInstruction(venue_id: VenueId, settlement_type: SettlementType, trade_date: Option<Moment>, value_date: Option<Moment>, legs: Vec<Leg>, portfolios: Vec<PortfolioId>)

  • interface: api.tx.settlement.addAndAffirmInstruction

  • summary: Adds and affirms a new instruction.

    Arguments

    • venue_id - ID of the venue this instruction belongs to.

    • settlement_type - Defines if the instruction should be settled in the next block after receiving all affirmations or waiting till a specific block.

    • trade_date - Optional date from which people can interact with this instruction.

    • value_date - Optional date after which the instruction should be settled (not enforced)

    • legs - Legs included in this instruction.

    • portfolios - Portfolios that the sender controls and wants to use in this affirmations.

    Permissions

    • Portfolio

addInstruction(venue_id: VenueId, settlement_type: SettlementType, trade_date: Option<Moment>, value_date: Option<Moment>, legs: Vec<Leg>)

  • interface: api.tx.settlement.addInstruction

  • summary: Adds a new instruction.

    Arguments

    • venue_id - ID of the venue this instruction belongs to.

    • settlement_type - Defines if the instruction should be settled in the next block after receiving all affirmations or waiting till a specific block.

    • trade_date - Optional date from which people can interact with this instruction.

    • value_date - Optional date after which the instruction should be settled (not enforced)

    • legs - Legs included in this instruction.

    Weight 950_000_000 + 1_000_000 * legs.len()

affirmInstruction(id: InstructionId, portfolios: Vec<PortfolioId>, max_legs_count: u32)

  • interface: api.tx.settlement.affirmInstruction

  • summary: Provide affirmation to an existing instruction.

    Arguments

    • id - Instruction id to affirm.

    • portfolios - Portfolios that the sender controls and wants to affirm this instruction.

    • max_legs_count - Number of legs that need to be affirmed.

    Permissions

    • Portfolio

affirmWithReceipts(id: InstructionId, receipt_details: Vec<ReceiptDetails>, portfolios: Vec<PortfolioId>, max_legs_count: u32)

  • interface: api.tx.settlement.affirmWithReceipts

  • summary: Accepts an instruction and claims a signed receipt.

    Arguments

    • id - Target instruction id.

    • leg_id - Target leg id for the receipt

    • receipt_uid - Receipt ID generated by the signer.

    • signer - Signer of the receipt.

    • signed_data - Signed receipt.

    • portfolios - Portfolios that the sender controls and wants to accept this instruction with

    Permissions

    • Portfolio

allowVenues(ticker: Ticker, venues: Vec<VenueId>)

  • interface: api.tx.settlement.allowVenues

  • summary: Allows additional venues to create instructions involving an asset.

    • ticker - Ticker of the token in question.

    • venues - Array of venues that are allowed to create instructions for the token in question.

    Permissions

    • Asset

changeReceiptValidity(receipt_uid: u64, validity: bool)

  • interface: api.tx.settlement.changeReceiptValidity

  • summary: Marks a receipt issued by the caller as claimed or not claimed. This allows the receipt issuer to invalidate an already issued receipt or revalidate an already claimed receipt.

    • receipt_uid - Unique ID of the receipt.

    • validity - New validity of the receipt.

claimReceipt(id: InstructionId, receipt_details: ReceiptDetails)

  • interface: api.tx.settlement.claimReceipt

  • summary: Claims a signed receipt.

    Arguments

    • id - Target instruction id for the receipt.

    • leg_id - Target leg id for the receipt

    • receipt_uid - Receipt ID generated by the signer.

    • signer - Signer of the receipt.

    • signed_data - Signed receipt.

    Permissions

    • Portfolio

createVenue(details: VenueDetails, signers: Vec<AccountId>, typ: VenueType)

  • interface: api.tx.settlement.createVenue

  • summary: Registers a new venue.

    • details - Extra details about a venue

    • signers - Array of signers that are allowed to sign receipts for this venue

    • typ - Type of venue being created

disallowVenues(ticker: Ticker, venues: Vec<VenueId>)

  • interface: api.tx.settlement.disallowVenues

  • summary: Revokes permission given to venues for creating instructions involving a particular asset.

    • ticker - Ticker of the token in question.

    • venues - Array of venues that are no longer allowed to create instructions for the token in question.

    Permissions

    • Asset

executeScheduledInstruction(id: InstructionId, _legs_count: u32)

  • interface: api.tx.settlement.executeScheduledInstruction
  • summary: Root callable extrinsic, used as an internal call to execute a scheduled settlement instruction.

rejectInstruction(id: InstructionId, portfolio: PortfolioId, num_of_legs: u32)

  • interface: api.tx.settlement.rejectInstruction

  • summary: Rejects an existing instruction.

    Arguments

    • id - Instruction id to reject.

    • portfolio - Portfolio to reject the instruction.

    • num_of_legs - Number of legs in the instruction.

    Permissions

    • Portfolio

rescheduleInstruction(id: InstructionId)

  • interface: api.tx.settlement.rescheduleInstruction

  • summary: Reschedules a failed instruction.

    Arguments

    • id - Target instruction id to reschedule.

    Permissions

    • Portfolio

    Errors

    • InstructionNotFailed - Instruction not in a failed state or does not exist.

setVenueFiltering(ticker: Ticker, enabled: bool)

  • interface: api.tx.settlement.setVenueFiltering

  • summary: Enables or disabled venue filtering for a token.

    Arguments

    • ticker - Ticker of the token in question.

    • enabled - Boolean that decides if the filtering should be enabled.

    Permissions

    • Asset

unclaimReceipt(instruction_id: InstructionId, leg_id: LegId)

  • interface: api.tx.settlement.unclaimReceipt

  • summary: Unclaims a previously claimed receipt.

    Arguments

    • instruction_id - Target instruction id for the receipt.

    • leg_id - Target leg id for the receipt

    Permissions

    • Portfolio

updateVenueDetails(id: VenueId, details: VenueDetails)

  • interface: api.tx.settlement.updateVenueDetails

  • summary: Edit a venue's details.

    • id specifies the ID of the venue to edit.

    • details specifies the updated venue details.

updateVenueType(id: VenueId, typ: VenueType)

  • interface: api.tx.settlement.updateVenueType

  • summary: Edit a venue's type.

    • id specifies the ID of the venue to edit.

    • type specifies the new type of the venue.

withdrawAffirmation(id: InstructionId, portfolios: Vec<PortfolioId>, max_legs_count: u32)

  • interface: api.tx.settlement.withdrawAffirmation

  • summary: Withdraw an affirmation for a given instruction.

    Arguments

    • id - Instruction id for that affirmation get withdrawn.

    • portfolios - Portfolios that the sender controls and wants to withdraw affirmation.

    • max_legs_count - Number of legs that need to be un-affirmed.

    Permissions

    • Portfolio

staking

addPermissionedValidator(identity: IdentityId, intended_count: Option<u32>)

  • interface: api.tx.staking.addPermissionedValidator

  • summary: Governance committee on 2/3 rds majority can introduce a new potential identity to the pool of permissioned entities who can run validators. Staking module uses PermissionedIdentity to ensure validators have completed KYB compliance and considers them for validation.

    Arguments

    • origin Required origin for adding a potential validator.

    • identity Validator's IdentityId.

    • intended_count No. of validators given identity intends to run.

bond(controller: LookupSource, value: Compact<BalanceOf>, payee: RewardDestination)

  • interface: api.tx.staking.bond

  • summary: Take the origin account as a stash and lock up value of its balance. controller will be the account that controls it.

    value must be more than the minimum_balance specified by T::Currency.

    The dispatch origin for this call must be Signed by the stash account.

    Emits Bonded.

bondExtra(max_additional: Compact<BalanceOf>)

  • interface: api.tx.staking.bondExtra

  • summary: Add some extra amount that have appeared in the stash free_balance into the balance up for staking.

    Use this if there are additional funds in your stash account that you wish to bond. Unlike [bond] or [unbond] this function does not impose any limitation on the amount that can be added.

    The dispatch origin for this call must be Signed by the stash, not the controller and it can be only called when [EraElectionStatus] is Closed.

    Emits Bonded.

cancelDeferredSlash(era: EraIndex, slash_indices: Vec<u32>)

  • interface: api.tx.staking.cancelDeferredSlash

  • summary: Cancel enactment of a deferred slash.

    Can be called by the T::SlashCancelOrigin.

    Parameters: era and indices of the slashes for that era to kill.

changeSlashingAllowedFor(slashing_switch: SlashingSwitch)

  • interface: api.tx.staking.changeSlashingAllowedFor

  • summary: Switch slashing status on the basis of given SlashingSwitch. Can only be called by root.

    Arguments

    • origin - AccountId of root.

    • slashing_switch - Switch used to set the targets for slashing.

chill()

  • interface: api.tx.staking.chill

  • summary: Declare no desire to either validate or nominate.

    Effects will be felt at the beginning of the next era.

    The dispatch origin for this call must be Signed by the controller, not the stash. And, it can be only called when [EraElectionStatus] is Closed.

forceNewEra()

  • interface: api.tx.staking.forceNewEra

  • summary: Force there to be a new era at the end of the next session. After this, it will be reset to normal (non-forced) behaviour.

    The dispatch origin must be Root.

forceNewEraAlways()

  • interface: api.tx.staking.forceNewEraAlways

  • summary: Force there to be a new era at the end of sessions indefinitely.

    The dispatch origin must be Root.

forceNoEras()

  • interface: api.tx.staking.forceNoEras

  • summary: Force there to be no new eras indefinitely.

    The dispatch origin must be Root.

forceUnstake(stash: AccountId, num_slashing_spans: u32)

  • interface: api.tx.staking.forceUnstake

  • summary: Force a current staker to become completely unstaked, immediately.

    The dispatch origin must be Root.

increaseValidatorCount(additional: Compact<u32>)

  • interface: api.tx.staking.increaseValidatorCount

  • summary: Increments the ideal number of validators.

    The dispatch origin must be Root.

nominate(targets: Vec<LookupSource>)

  • interface: api.tx.staking.nominate

  • summary: Declare the desire to nominate targets for the origin controller.

    Effects will be felt at the beginning of the next era. This can only be called when [EraElectionStatus] is Closed.

    The dispatch origin for this call must be Signed by the controller, not the stash. And, it can be only called when [EraElectionStatus] is Closed.

payoutStakers(validator_stash: AccountId, era: EraIndex)

  • interface: api.tx.staking.payoutStakers

  • summary: Pay out all the stakers behind a single validator for a single era.

    • validator_stash is the stash account of the validator. Their nominators, up to T::MaxNominatorRewardedPerValidator, will also receive their rewards.

    • era may be any era between [current_era - history_depth; current_era].

    The origin of this call must be Signed. Any account can call this function, even if it is not one of the stakers.

    This can only be called when [EraElectionStatus] is Closed.

payoutStakersBySystem(validator_stash: AccountId, era: EraIndex)

  • interface: api.tx.staking.payoutStakersBySystem
  • summary: System version of payout_stakers(). Only be called by the root origin.

reapStash(stash: AccountId, num_slashing_spans: u32)

  • interface: api.tx.staking.reapStash

  • summary: Remove all data structure concerning a staker/stash once its balance is at the minimum. This is essentially equivalent to withdraw_unbonded except it can be called by anyone and the target stash must have no funds left beyond the ED.

    This can be called from any origin.

    • stash: The stash account to reap. Its balance must be zero.

rebond(value: Compact<BalanceOf>)

  • interface: api.tx.staking.rebond

  • summary: Rebond a portion of the stash scheduled to be unlocked.

    The dispatch origin must be signed by the controller, and it can be only called when [EraElectionStatus] is Closed.

removePermissionedValidator(identity: IdentityId)

  • interface: api.tx.staking.removePermissionedValidator

  • summary: Remove an identity from the pool of (wannabe) validator identities. Effects are known in the next session. Staking module checks PermissionedIdentity to ensure validators have completed KYB compliance

    Arguments

    • origin Required origin for removing a potential validator.

    • identity Validator's IdentityId.

scaleValidatorCount(factor: Percent)

  • interface: api.tx.staking.scaleValidatorCount

  • summary: Scale up the ideal number of validators by a factor.

    The dispatch origin must be Root.

setCommissionCap(new_cap: Perbill)

  • interface: api.tx.staking.setCommissionCap

  • summary: Changes commission rate which applies to all validators. Only Governance committee is allowed to change this value.

    Arguments

    • new_cap the new commission cap.

setController(controller: LookupSource)

  • interface: api.tx.staking.setController

  • summary: (Re-)set the controller of a stash.

    Effects will be felt at the beginning of the next era.

    The dispatch origin for this call must be Signed by the stash, not the controller.

setHistoryDepth(new_history_depth: Compact<EraIndex>, _era_items_deleted: Compact<u32>)

  • interface: api.tx.staking.setHistoryDepth

  • summary: Set HistoryDepth value. This function will delete any history information when HistoryDepth is reduced.

    Parameters:

    • new_history_depth: The new history depth you would like to set.

    • era_items_deleted: The number of items that will be deleted by this dispatch. This should report all the storage items that will be deleted by clearing old era history. Needed to report an accurate weight for the dispatch. Trusted by Root to report an accurate number.

    Origin must be root.

setInvulnerables(invulnerables: Vec<AccountId>)

  • interface: api.tx.staking.setInvulnerables

  • summary: Set the validators who cannot be slashed (if any).

    The dispatch origin must be Root.

setMinBondThreshold(new_value: BalanceOf)

  • interface: api.tx.staking.setMinBondThreshold

  • summary: Changes min bond value to be used in validate(). Only Governance committee is allowed to change this value.

    Arguments

    • new_value the new minimum

setPayee(payee: RewardDestination)

  • interface: api.tx.staking.setPayee

  • summary: (Re-)set the payment target for a controller.

    Effects will be felt at the beginning of the next era.

    The dispatch origin for this call must be Signed by the controller, not the stash.

setValidatorCount(new: Compact<u32>)

  • interface: api.tx.staking.setValidatorCount

  • summary: Sets the ideal number of validators.

    The dispatch origin must be Root.

submitElectionSolution(winners: Vec<ValidatorIndex>, compact: CompactAssignments, score: ElectionScore, era: EraIndex, size: ElectionSize)

  • interface: api.tx.staking.submitElectionSolution

  • summary: Submit an election result to the chain. If the solution:

    1. is valid. 2. has a better score than a potentially existing solution on chain.

    then, it will be put on chain.

    A solution consists of two pieces of data:

    1. winners: a flat vector of all the winners of the round. 2. assignments: the compact version of an assignment vector that encodes the edge weights.

    Both of which may be computed using phragmen, or any other algorithm.

    Additionally, the submitter must provide:

    • The score that they claim their solution has.

    Both validators and nominators will be represented by indices in the solution. The indices should respect the corresponding types ([ValidatorIndex] and [NominatorIndex]). Moreover, they should be valid when used to index into [SnapshotValidators] and [SnapshotNominators]. Any invalid index will cause the solution to be rejected. These two storage items are set during the election window and may be used to determine the indices.

    A solution is valid if:

    1. It is submitted when [EraElectionStatus] is Open. 1. Its claimed score is equal to the score computed on-chain. 2. Presents the correct number of winners. 3. All indexes must be value according to the snapshot vectors. All edge values must also be correct and should not overflow the granularity of the ratio type (i.e. 256 or billion). 4. For each edge, all targets are actually nominated by the voter. 5. Has correct self-votes.

    A solutions score is consisted of 3 parameters:

    1. min { support.total } for each support of a winner. This value should be maximized. 2. sum { support.total } for each support of a winner. This value should be minimized. 3. sum { support.total^2 } for each support of a winner. This value should be minimized (to ensure less variance)

submitElectionSolutionUnsigned(winners: Vec<ValidatorIndex>, compact: CompactAssignments, score: ElectionScore, era: EraIndex, size: ElectionSize)

  • interface: api.tx.staking.submitElectionSolutionUnsigned

  • summary: Unsigned version of submit_election_solution.

    Note that this must pass the [ValidateUnsigned] check which only allows transactions from the local node to be included. In other words, only the block author can include a transaction in the block.

unbond(value: Compact<BalanceOf>)

  • interface: api.tx.staking.unbond

  • summary: Schedule a portion of the stash to be unlocked ready for transfer out after the bond period ends. If this leaves an amount actively bonded less than T::Currency::minimum_balance(), then it is increased to the full amount.

    Once the unlock period is done, you can call withdraw_unbonded to actually move the funds out of management ready for transfer.

    No more than a limited number of unlocking chunks (see MAX_UNLOCKING_CHUNKS) can co-exists at the same time. In that case, [Call::withdraw_unbonded] need to be called first to remove some of the chunks (if possible).

    The dispatch origin for this call must be Signed by the controller, not the stash. And, it can be only called when [EraElectionStatus] is Closed.

    Emits Unbonded.

    See also [Call::withdraw_unbonded].

updatePermissionedValidatorIntendedCount(identity: IdentityId, new_intended_count: u32)

  • interface: api.tx.staking.updatePermissionedValidatorIntendedCount

  • summary: Update the intended validator count for a given DID.

    Arguments

    • origin which must be the required origin for adding a potential validator.

    • identity to add as a validator.

    • new_intended_count New value of intended count.

validate(prefs: ValidatorPrefs)

  • interface: api.tx.staking.validate

  • summary: Declare the desire to validate for the origin controller.

    Effects will be felt at the beginning of the next era.

    The dispatch origin for this call must be Signed by the controller, not the stash. And, it can be only called when [EraElectionStatus] is Closed.

validateCddExpiryNominators(targets: Vec<AccountId>)

  • interface: api.tx.staking.validateCddExpiryNominators

  • summary: Validate the nominators CDD expiry time.

    If an account from a given set of address is nominating then check the CDD expiry time of it and if it is expired then the account should be unbonded and removed from the nominating process.

withdrawUnbonded(num_slashing_spans: u32)

  • interface: api.tx.staking.withdrawUnbonded

  • summary: Remove any unlocked chunks from the unlocking queue from our management.

    This essentially frees up that balance to be used by the stash account to do whatever it wants.

    The dispatch origin for this call must be Signed by the controller, not the stash. And, it can be only called when [EraElectionStatus] is Closed.

    Emits Withdrawn.

    See also [Call::unbond].


statistics

addExemptedEntities(ticker: Ticker, transfer_manager: TransferManager, exempted_entities: Vec<ScopeId>)

  • interface: api.tx.statistics.addExemptedEntities

  • summary: Exempt entities from a transfer manager

    Arguments

    • origin It contains the secondary key of the caller (i.e who signed the transaction to execute this function).

    • ticker ticker for which the exemption list is being modified.

    • transfer_manager Transfer manager for which the exemption list is being modified.

    • exempted_entities ScopeIds for which the exemption list is being modified.

    Errors

    • Unauthorized if origin is not the owner of the ticker.

    Permissions

    • Asset

addTransferManager(ticker: Ticker, new_transfer_manager: TransferManager)

  • interface: api.tx.statistics.addTransferManager

  • summary: Adds a new transfer manager.

    Arguments

    • origin It contains the secondary key of the caller (i.e who signed the transaction to execute this function).

    • ticker ticker for which the transfer managers are being updated.

    • new_transfer_manager Transfer manager being added.

    Errors

    • Unauthorized if origin is not the owner of the ticker.

    • DuplicateTransferManager if new_transfer_manager is already enabled for the ticker.

    • TransferManagersLimitReached if the ticker already has max TMs attached

    Permissions

    • Asset

removeExemptedEntities(ticker: Ticker, transfer_manager: TransferManager, entities: Vec<ScopeId>)

  • interface: api.tx.statistics.removeExemptedEntities

  • summary: remove entities from exemption list of a transfer manager

    Arguments

    • origin It contains the secondary key of the caller (i.e who signed the transaction to execute this function).

    • ticker ticker for which the exemption list is being modified.

    • transfer_manager Transfer manager for which the exemption list is being modified.

    • scope_ids ScopeIds for which the exemption list is being modified.

    Errors

    • Unauthorized if origin is not the owner of the ticker.

    Permissions

    • Asset

removeTransferManager(ticker: Ticker, transfer_manager: TransferManager)

  • interface: api.tx.statistics.removeTransferManager

  • summary: Removes a transfer manager.

    Arguments

    • origin It contains the secondary key of the caller (i.e who signed the transaction to execute this function).

    • ticker ticker for which the transfer managers are being updated.

    • transfer_manager Transfer manager being removed.

    Errors

    • Unauthorized if origin is not the owner of the ticker.

    • TransferManagerMissing if asset_compliance contains multiple entries with the same requirement_id.

    Permissions

    • Asset

sto

createFundraiser(offering_portfolio: PortfolioId, offering_asset: Ticker, raising_portfolio: PortfolioId, raising_asset: Ticker, tiers: Vec<PriceTier>, venue_id: VenueId, start: Option<Moment>, end: Option<Moment>, minimum_investment: Balance, fundraiser_name: FundraiserName)

  • interface: api.tx.sto.createFundraiser

  • summary: Create a new fundraiser.

    • offering_portfolio - Portfolio containing the offering_asset.

    • offering_asset - Asset being offered.

    • raising_portfolio - Portfolio containing the raising_asset.

    • raising_asset - Asset being exchanged for offering_asset on investment.

    • tiers - Price tiers to charge investors on investment.

    • venue_id - Venue to handle settlement.

    • start - Fundraiser start time, if None the fundraiser will start immediately.

    • end - Fundraiser end time, if None the fundraiser will never expire.

    • minimum_investment - Minimum amount of raising_asset that an investor needs to spend to invest in this raise.

    • fundraiser_name - Fundraiser name, only used in the UIs.

    Permissions

    • Asset

    • Portfolio

freezeFundraiser(offering_asset: Ticker, id: FundraiserId)

  • interface: api.tx.sto.freezeFundraiser

  • summary: Freeze a fundraiser.

    • offering_asset - Asset to freeze.

    • id - ID of the fundraiser to freeze.

    Permissions

    • Asset

invest(investment_portfolio: PortfolioId, funding_portfolio: PortfolioId, offering_asset: Ticker, id: FundraiserId, purchase_amount: Balance, max_price: Option<Balance>, receipt: Option<ReceiptDetails>)

  • interface: api.tx.sto.invest

  • summary: Invest in a fundraiser.

    • investment_portfolio - Portfolio that offering_asset will be deposited in.

    • funding_portfolio - Portfolio that will fund the investment.

    • offering_asset - Asset to invest in.

    • id - ID of the fundraiser to invest in.

    • purchase_amount - Amount of offering_asset to purchase.

    • max_price - Maximum price to pay per unit of offering_asset, If Nonethere are no constraints on price.

    • receipt - Off-chain receipt to use instead of on-chain balance in funding_portfolio.

    Permissions

    • Portfolio

modifyFundraiserWindow(offering_asset: Ticker, id: FundraiserId, start: Moment, end: Option<Moment>)

  • interface: api.tx.sto.modifyFundraiserWindow

  • summary: Modify the time window a fundraiser is active

    • offering_asset - Asset to modify.

    • id - ID of the fundraiser to modify.

    • start - New start of the fundraiser.

    • end - New end of the fundraiser to modify.

    Permissions

    • Asset

stop(offering_asset: Ticker, id: FundraiserId)

  • interface: api.tx.sto.stop

  • summary: Stop a fundraiser.

    • offering_asset - Asset to stop.

    • id - ID of the fundraiser to stop.

    Permissions

    • Asset

unfreezeFundraiser(offering_asset: Ticker, id: FundraiserId)

  • interface: api.tx.sto.unfreezeFundraiser

  • summary: Unfreeze a fundraiser.

    • offering_asset - Asset to unfreeze.

    • id - ID of the fundraiser to unfreeze.

    Permissions

    • Asset

sudo

setKey(new: LookupSource)

  • interface: api.tx.sudo.setKey

  • summary: Authenticates the current sudo key and sets the given AccountId (new) as the new sudo key.

    The dispatch origin for this call must be Signed.

sudo(call: Call)

  • interface: api.tx.sudo.sudo

  • summary: Authenticates the sudo key and dispatches a function call with Root origin.

    The dispatch origin for this call must be Signed.

sudoAs(who: LookupSource, call: Call)

  • interface: api.tx.sudo.sudoAs

  • summary: Authenticates the sudo key and dispatches a function call with Signed origin from a given account.

    The dispatch origin for this call must be Signed.

sudoUncheckedWeight(call: Call, _weight: Weight)

  • interface: api.tx.sudo.sudoUncheckedWeight

  • summary: Authenticates the sudo key and dispatches a function call with Root origin. This function does not check the weight of the call, and instead allows the Sudo user to specify the weight of the call.

    The dispatch origin for this call must be Signed.


system

fillBlock(_ratio: Perbill)

  • interface: api.tx.system.fillBlock
  • summary: A dispatch that will fill the block weight up to the given ratio.

killPrefix(prefix: Key, _subkeys: u32)

  • interface: api.tx.system.killPrefix

  • summary: Kill all storage items with a key that starts with the given prefix.

    NOTE: We rely on the Root origin to provide us the number of subkeys under the prefix we are removing to accurately calculate the weight of this function.

killStorage(keys: Vec<Key>)

  • interface: api.tx.system.killStorage
  • summary: Kill some items from storage.

remark(_remark: Bytes)

  • interface: api.tx.system.remark
  • summary: Make some on-chain remark.

setChangesTrieConfig(changes_trie_config: Option<ChangesTrieConfiguration>)

  • interface: api.tx.system.setChangesTrieConfig
  • summary: Set the new changes trie configuration.

setCode(code: Bytes)

  • interface: api.tx.system.setCode
  • summary: Set the new runtime code.

setCodeWithoutChecks(code: Bytes)

  • interface: api.tx.system.setCodeWithoutChecks
  • summary: Set the new runtime code without doing any checks of the given code.

setHeapPages(pages: u64)

  • interface: api.tx.system.setHeapPages
  • summary: Set the number of pages in the WebAssembly environment's heap.

setStorage(items: Vec<KeyValue>)

  • interface: api.tx.system.setStorage
  • summary: Set some items of storage.

technicalCommittee

setExpiresAfter(expiry: MaybeBlock)

  • interface: api.tx.technicalCommittee.setExpiresAfter

  • summary: Changes the time after which a proposal expires.

    Arguments

    • expiry - The new expiry time.

setReleaseCoordinator(id: IdentityId)

  • interface: api.tx.technicalCommittee.setReleaseCoordinator

  • summary: Changes the release coordinator.

    Arguments

    • id - The DID of the new release coordinator.

    Errors

    • NotAMember, If the new coordinator id is not part of the committee.

setVoteThreshold(n: u32, d: u32)

  • interface: api.tx.technicalCommittee.setVoteThreshold

  • summary: Change the vote threshold the determines the winning proposal. For e.g., for a simple majority use (1, 2) which represents the in-equation ">= 1/2".

    Arguments

    • n - Numerator of the fraction representing vote threshold.

    • d - Denominator of the fraction representing vote threshold.

vote(proposal: Hash, index: ProposalIndex, approve: bool)

  • interface: api.tx.technicalCommittee.vote

  • summary: Votes approveingly (or not, if false) on an existing proposal given by its hash, index.

    Arguments

    • proposal - A hash of the proposal to be voted on.

    • index - The proposal index.

    • approve - If true than this is a for vote, and against otherwise.

    Errors

    • NotAMember, if the origin is not a member of this committee.

voteOrPropose(approve: bool, call: Call)

  • interface: api.tx.technicalCommittee.voteOrPropose

  • summary: Proposes to the committee that call should be executed in its name. Alternatively, if the hash of call has already been recorded, i.e., already proposed, then this call counts as a vote, i.e., as if vote_by_hash was called.

    Weight

    The weight of this dispatchable is that of call as well as the complexity for recording the vote itself.

    Arguments

    • approve - is this an approving vote? If the proposal doesn't exist, passing false will result in error FirstVoteReject.

    • call - the call to propose for execution.

    Errors

    • FirstVoteReject, if call hasn't been proposed and approve == false.

    • NotAMember, if the origin is not a member of this committee.


technicalCommitteeMembership

abdicateMembership()

  • interface: api.tx.technicalCommitteeMembership.abdicateMembership

  • summary: Allows the calling member to unilaterally quit without this being subject to a GC vote.

    Arguments

    • origin - Member of committee who wants to quit.

    Error

    • Only primary key can abdicate.

    • Last member of a group cannot abdicate.

addMember(who: IdentityId)

  • interface: api.tx.technicalCommitteeMembership.addMember

  • summary: Adds a member who to the group. May only be called from AddOrigin or root.

    Arguments

    • origin - Origin representing AddOrigin or root

    • who - IdentityId to be added to the group.

disableMember(who: IdentityId, expiry: Option<Moment>, at: Option<Moment>)

  • interface: api.tx.technicalCommitteeMembership.disableMember

  • summary: Disables a member at specific moment.

    Please note that if member is already revoked (a "valid member"), its revocation time-stamp will be updated.

    Any disabled member should NOT allow to act like an active member of the group. For instance, a disabled CDD member should NOT be able to generate a CDD claim. However any generated claim issued before at would be considered as a valid one.

    If you want to invalidate any generated claim, you should use Self::remove_member.

    Arguments

    • at - Revocation time-stamp.

    • who - Target member of the group.

    • expiry - Time-stamp when who is removed from CDD. As soon as it is expired, the generated claims will be "invalid" as who is not considered a member of the group.

removeMember(who: IdentityId)

  • interface: api.tx.technicalCommitteeMembership.removeMember

  • summary: Removes a member who from the set. May only be called from RemoveOrigin or root.

    Any claim previously generated by this member is not valid as a group claim. For instance, if a CDD member group generated a claim for a target identity and then it is removed, that claim will be invalid. In case you want to keep the validity of generated claims, you have to use Self::disable_member function

    Arguments

    • origin - Origin representing RemoveOrigin or root

    • who - IdentityId to be removed from the group.

resetMembers(members: Vec<IdentityId>)

  • interface: api.tx.technicalCommitteeMembership.resetMembers

  • summary: Changes the membership to a new set, disregarding the existing membership. May only be called from ResetOrigin or root.

    Arguments

    • origin - Origin representing ResetOrigin or root

    • members - New set of identities

setActiveMembersLimit(limit: MemberCount)

  • interface: api.tx.technicalCommitteeMembership.setActiveMembersLimit

  • summary: Change this group's limit for how many concurrent active members they may be.

    Arguments

    • limit - the number of active members there may be concurrently.

swapMember(remove: IdentityId, add: IdentityId)

  • interface: api.tx.technicalCommitteeMembership.swapMember

  • summary: Swaps out one member remove for another member add.

    May only be called from SwapOrigin or root.

    Arguments

    • origin - Origin representing SwapOrigin or root

    • remove - IdentityId to be removed from the group.

    • add - IdentityId to be added in place of remove.


testUtils

getCddOf(of: AccountId)

  • interface: api.tx.testUtils.getCddOf
  • summary: Emits an event with caller's identity and CDD status.

getMyDid()

  • interface: api.tx.testUtils.getMyDid
  • summary: Emits an event with caller's identity.

mockCddRegisterDid(target_account: AccountId)

  • interface: api.tx.testUtils.mockCddRegisterDid

  • summary: Registers a new Identity for the target_account and issues a CDD claim to it. The Investor UID is generated deterministically by the hash of the generated DID and then we fix it to be compliant with UUID v4.

    See

    Failure

    • origin has to be an active CDD provider. Inactive CDD providers cannot add new claims.

    • target_account (primary key of the new Identity) can be linked to just one and only one identity.

registerDid(uid: InvestorUid, secondary_keys: Vec<SecondaryKey>)

  • interface: api.tx.testUtils.registerDid

  • summary: Generates a new IdentityID for the caller, and issues a self-generated CDD claim.

    The caller account will be the primary key of that identity. For each account of secondary_keys, a new JoinIdentity authorization is created, so each of them will need to accept it before become part of this new IdentityID.

    Errors

    • AlreadyLinked if the caller account or if any of the given secondary_keys has already linked to an IdentityID

    • SecondaryKeysContainPrimaryKey if secondary_keys contains the caller account.

    • DidAlreadyExists if auto-generated DID already exists.


timestamp

set(now: Compact<Moment>)

  • interface: api.tx.timestamp.set

  • summary: Set the current time.

    This call should be invoked exactly once per block. It will panic at the finalization phase, if this call hasn't been invoked by that time.

    The timestamp should be greater than the previous one by the amount specified by MinimumPeriod.

    The dispatch origin for this call must be Inherent.


treasury

disbursement(beneficiaries: Vec<Beneficiary>)

  • interface: api.tx.treasury.disbursement

  • summary: It transfers balances from treasury to each of beneficiaries and the specific amount for each of them.

    Error

    • BadOrigin: Only root can execute transaction.

    • InsufficientBalance: If treasury balances is not enough to cover all beneficiaries.

reimbursement(amount: BalanceOf)

  • interface: api.tx.treasury.reimbursement

  • summary: It transfers the specific amount from origin account into treasury.

    Only accounts which are associated to an identity can make a donation to treasury.


upgradeCommittee

setExpiresAfter(expiry: MaybeBlock)

  • interface: api.tx.upgradeCommittee.setExpiresAfter

  • summary: Changes the time after which a proposal expires.

    Arguments

    • expiry - The new expiry time.

setReleaseCoordinator(id: IdentityId)

  • interface: api.tx.upgradeCommittee.setReleaseCoordinator

  • summary: Changes the release coordinator.

    Arguments

    • id - The DID of the new release coordinator.

    Errors

    • NotAMember, If the new coordinator id is not part of the committee.

setVoteThreshold(n: u32, d: u32)

  • interface: api.tx.upgradeCommittee.setVoteThreshold

  • summary: Change the vote threshold the determines the winning proposal. For e.g., for a simple majority use (1, 2) which represents the in-equation ">= 1/2".

    Arguments

    • n - Numerator of the fraction representing vote threshold.

    • d - Denominator of the fraction representing vote threshold.

vote(proposal: Hash, index: ProposalIndex, approve: bool)

  • interface: api.tx.upgradeCommittee.vote

  • summary: Votes approveingly (or not, if false) on an existing proposal given by its hash, index.

    Arguments

    • proposal - A hash of the proposal to be voted on.

    • index - The proposal index.

    • approve - If true than this is a for vote, and against otherwise.

    Errors

    • NotAMember, if the origin is not a member of this committee.

voteOrPropose(approve: bool, call: Call)

  • interface: api.tx.upgradeCommittee.voteOrPropose

  • summary: Proposes to the committee that call should be executed in its name. Alternatively, if the hash of call has already been recorded, i.e., already proposed, then this call counts as a vote, i.e., as if vote_by_hash was called.

    Weight

    The weight of this dispatchable is that of call as well as the complexity for recording the vote itself.

    Arguments

    • approve - is this an approving vote? If the proposal doesn't exist, passing false will result in error FirstVoteReject.

    • call - the call to propose for execution.

    Errors

    • FirstVoteReject, if call hasn't been proposed and approve == false.

    • NotAMember, if the origin is not a member of this committee.


upgradeCommitteeMembership

abdicateMembership()

  • interface: api.tx.upgradeCommitteeMembership.abdicateMembership

  • summary: Allows the calling member to unilaterally quit without this being subject to a GC vote.

    Arguments

    • origin - Member of committee who wants to quit.

    Error

    • Only primary key can abdicate.

    • Last member of a group cannot abdicate.

addMember(who: IdentityId)

  • interface: api.tx.upgradeCommitteeMembership.addMember

  • summary: Adds a member who to the group. May only be called from AddOrigin or root.

    Arguments

    • origin - Origin representing AddOrigin or root

    • who - IdentityId to be added to the group.

disableMember(who: IdentityId, expiry: Option<Moment>, at: Option<Moment>)

  • interface: api.tx.upgradeCommitteeMembership.disableMember

  • summary: Disables a member at specific moment.

    Please note that if member is already revoked (a "valid member"), its revocation time-stamp will be updated.

    Any disabled member should NOT allow to act like an active member of the group. For instance, a disabled CDD member should NOT be able to generate a CDD claim. However any generated claim issued before at would be considered as a valid one.

    If you want to invalidate any generated claim, you should use Self::remove_member.

    Arguments

    • at - Revocation time-stamp.

    • who - Target member of the group.

    • expiry - Time-stamp when who is removed from CDD. As soon as it is expired, the generated claims will be "invalid" as who is not considered a member of the group.

removeMember(who: IdentityId)

  • interface: api.tx.upgradeCommitteeMembership.removeMember

  • summary: Removes a member who from the set. May only be called from RemoveOrigin or root.

    Any claim previously generated by this member is not valid as a group claim. For instance, if a CDD member group generated a claim for a target identity and then it is removed, that claim will be invalid. In case you want to keep the validity of generated claims, you have to use Self::disable_member function

    Arguments

    • origin - Origin representing RemoveOrigin or root

    • who - IdentityId to be removed from the group.

resetMembers(members: Vec<IdentityId>)

  • interface: api.tx.upgradeCommitteeMembership.resetMembers

  • summary: Changes the membership to a new set, disregarding the existing membership. May only be called from ResetOrigin or root.

    Arguments

    • origin - Origin representing ResetOrigin or root

    • members - New set of identities

setActiveMembersLimit(limit: MemberCount)

  • interface: api.tx.upgradeCommitteeMembership.setActiveMembersLimit

  • summary: Change this group's limit for how many concurrent active members they may be.

    Arguments

    • limit - the number of active members there may be concurrently.

swapMember(remove: IdentityId, add: IdentityId)

  • interface: api.tx.upgradeCommitteeMembership.swapMember

  • summary: Swaps out one member remove for another member add.

    May only be called from SwapOrigin or root.

    Arguments

    • origin - Origin representing SwapOrigin or root

    • remove - IdentityId to be removed from the group.

    • add - IdentityId to be added in place of remove.


utility

batch(calls: Vec<Call>)

  • interface: api.tx.utility.batch

  • summary: Dispatch multiple calls from the sender's origin.

    This will execute until the first one fails and then stop.

    May be called from root or a signed origin.

    Parameters

    • calls: The calls to be dispatched from the same origin.

    Weight

    • The sum of the weights of the calls.

    • One event.

    This will return Ok in all circumstances except an unsigned origin. To determine the success of the batch, an event is deposited. If a call failed and the batch was interrupted, then the BatchInterrupted event is deposited, along with the number of successful calls made and the error of the failed call. If all were successful, then the BatchCompleted event is deposited.

batchAtomic(calls: Vec<Call>)

  • interface: api.tx.utility.batchAtomic

  • summary: Dispatch multiple calls from the sender's origin.

    This will execute all calls, in order, stopping at the first failure, in which case the state changes are rolled back. On failure, an event BatchInterrupted(failure_idx, error) is deposited.

    May be called from root or a signed origin.

    Parameters

    • calls: The calls to be dispatched from the same origin.

    Weight

    • The sum of the weights of the calls.

    • One event.

    This will return Ok in all circumstances except an unsigned origin. To determine the success of the batch, an event is deposited. If any call failed, then BatchInterrupted is deposited. If all were successful, then the BatchCompleted event is deposited.

batchOptimistic(calls: Vec<Call>)

  • interface: api.tx.utility.batchOptimistic

  • summary: Dispatch multiple calls from the sender's origin.

    This will execute all calls, in order, irrespective of failures. Any failures will be available in a BatchOptimisticFailed event.

    May be called from root or a signed origin.

    Parameters

    • calls: The calls to be dispatched from the same origin.

    Weight

    • The sum of the weights of the calls.

    • One event.

    This will return Ok in all circumstances except an unsigned origin. To determine the success of the batch, an event is deposited. If any call failed, then BatchOptimisticFailed is deposited, with a vector of event counts for each call as well as a vector of errors. If all were successful, then the BatchCompleted event is deposited.

relayTx(target: AccountId, signature: OffChainSignature, call: UniqueCall)

  • interface: api.tx.utility.relayTx

  • summary: Relay a call for a target from an origin

    Relaying in this context refers to the ability of origin to make a call on behalf of target.

    Fees are charged to origin

    Parameters

    • target: Account to be relayed

    • signature: Signature from target authorizing the relay

    • call: Call to be relayed on behalf of target