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
(seepallet_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
ifauth_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 ofticker
. -
ticker
Ticker of the token. -
docs
Documents to be attached toticker
.
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 theorigin
's identity.To verify that the
origin
is in control of the Ethereum account on the books, anethereum_signature
containing theorigin
'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., byorigin
. -
TickerRegistrationExpired
if the ticker's registration has expired. -
BadOrigin
if not signed. -
InvalidEthereumSignature
if theethereum_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 ofidentifiers
are invalid. -
MaxLengthOfAssetNameExceeded
ifname
's length exceedsT::AssetNameMaxLength
. -
FundingRoundNameMaxLengthExceeded
if the name of the funding round is longer thatT::FundingRoundNameMaxLength
. -
AssetAlreadyCreated
if asset was already created. -
TickerTooLong
ifticker
's length is greater thanconfig.max_ticker_length
chain parameter. -
TickerNotAscii
ifticker
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
ifticker
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 ofticker
. -
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 ofticker
. -
ticker
Ticker of the token.
Errors
AssetAlreadyDivisible
ifticker
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 ofticker
. -
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 inAssetType::Custom
. Should thety
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 ofticker
. -
ticker
Ticker of the token. -
ids
Documents ids to be removed fromticker
.
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 ofname
is greater thanT::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 ifclassic_ticker_import.is_contract
holds. -
config
to use for expiry and ticker length.
Errors
-
AssetAlreadyCreated
ifclassic_ticker_import.ticker
was created as an asset. -
TickerTooLong
if theconfig
considers theclassic_ticker_import.ticker
too long. -
TickerAlreadyRegistered
ifclassic_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 ofticker
. -
ticker
- the ticker of the token. -
name
- the desired name of the current funding round.
Errors
FundingRoundNameMaxLengthExceeded
if length ofname
is greater thanT::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
ifticker
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 ofticker
. -
ticker
- the ticker of the token. -
identifiers
- the asset identifiers to be updated in the form of a vector of pairs ofIdentifierType
andAssetIdentifier
value.
Errors
InvalidAssetIdentifier
ifidentifiers
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
andReservedBalance
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 theFreeBalance
of the sender and receiver. It will decrease the total issuance of the system by theTransferFee
.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
iforigin
is notSelf::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
ifControllers
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
iforigin
is notSelf::admin()
account.
changeBridgeExempted(exempted: Vec<(IdentityId,bool)>
)
-
interface:
api.tx.bridge.changeBridgeExempted
-
summary: Changes the bridge limit exempted list.
Errors
BadAdmin
iforigin
is notSelf::admin()
account.
changeBridgeLimit(amount: Balance
, duration: BlockNumber
)
-
interface:
api.tx.bridge.changeBridgeLimit
-
summary: Changes the bridge limits.
Errors
-
BadAdmin
iforigin
is notSelf::admin()
account. -
DivisionByZero
ifduration
is zero.
-
changeController(controller: AccountId
)
-
interface:
api.tx.bridge.changeController
-
summary: Changes the controller account as admin.
Errors
BadAdmin
iforigin
is notSelf::admin()
account.
changeTimelock(timelock: BlockNumber
)
-
interface:
api.tx.bridge.changeTimelock
-
summary: Changes the timelock period.
Errors
BadAdmin
iforigin
is notSelf::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
iforigin
is notSelf::admin()
account. -
NoValidCdd
ifbridge_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
iforigin
is notSelf::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
iforigin
is notSelf::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
iforigin
is notSelf::controller
orSelf::admin
. -
TimelockedTx
if the transaction status isTimelocked
. -
ProposalAlreadyHandled
if the transaction status isHandled
.
-
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
iforigin
is not root. -
ProposalAlreadyHandled
if transaction status isHandled
. -
FrozenTx
if transaction status isFrozen
.
-
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
ifControllers
was not set.
removeFreezeAdmin(freeze_admin: AccountId
)
-
interface:
api.tx.bridge.removeFreezeAdmin
-
summary: Remove a freeze admin.
Errors
BadAdmin
iforigin
is notSelf::admin()
account.
removeTxs(bridge_txs: Vec<BridgeTx>
)
-
interface:
api.tx.bridge.removeTxs
-
summary: Remove given bridge transactions.
Errors
-
BadAdmin
iforigin
is notSelf::admin()
account. -
NotFrozen
if a tx inbridge_txs
is not frozen.
-
unfreeze()
-
interface:
api.tx.bridge.unfreeze
-
summary: Unfreezes transaction handling in the bridge module if it is frozen.
Errors
BadAdmin
iforigin
is notSelf::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
iforigin
is notSelf::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
iforigin
's DID has already received its benefit. -
NoSuchDistribution
if there's no capital distribution forca_id
. -
CannotClaimBeforeStart
ifnow < payment_at
. -
CannotClaimAfterExpiry
ifnow > expiry_at.unwrap()
. -
NoSuchCA
ifca_id
does not identify an existing CA. -
NotTargetedByCA
if the CA does not targetorigin
's DID. -
BalanceAmountProductOverflowed
ifba = balance * amount
would overflow. -
BalanceAmountProductSupplyDivisionFailed
ifba * 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
, withamount
funds incurrency
withdrawn fromportfolio
belonging toorigin
's DID.The distribution will commence at
payment_at
and expire atexpires_at
, if provided, or ifNone
, then there's no expiry.The funds will be locked in
portfolio
from whendistribute
is called. When there's no expiry, some funds may be locked indefinitely inportfolio
, 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 fromportfolio
. However, if we imagine that usersAlice
andBob
both are entitled to 1.5 units, and only receive1
units each, then0.5 + 0.5 = 1
units are left inportfolio
, which is now transferrable.Arguments
-
origin
is a signer that has permissions to act as an agent ofca_id.ticker
. -
ca_id
identifies the CA to start a capital distribution for. -
portfolio
specifies the portfolio number of the agent to distributeamount
from. -
currency
to withdraw and distribute from theportfolio
. -
per_share
amount ofcurrency
to withdraw and distribute. Specified as a per-million, i.e.1 / 10^6
th of onecurrency
token. -
amount
ofcurrency
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 byorigin
.
Errors
-
UnauthorizedAgent
iforigin
is not agent-permissioned forticker
. -
DistributingAsset
ifca_id.ticker == currency
. -
ExpiryBeforePayment
ifexpires_at.unwrap() <= payment_at
. -
NoSuchCA
ifca_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 ofportfolio
. -
InsufficientPortfolioBalance
ifportfolio
has less thanamount
ofcurrency
. -
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 ofca_id.ticker
. -
ca_id
identifies the CA with a capital distributions to push benefits for. -
holder
to push benefits to.
Errors
-
UnauthorizedAgent
iforigin
is not agent-permissioned forticker
. -
NoSuchDistribution
if there's no capital distribution forca_id
. -
CannotClaimBeforeStart
ifnow < payment_at
. -
CannotClaimAfterExpiry
ifnow > expiry_at.unwrap()
. -
NoSuchCA
ifca_id
does not identify an existing CA. -
NotTargetedByCA
if the CA does not targetholder
. -
BalanceAmountProductOverflowed
ifba = balance * amount
would overflow. -
BalanceAmountProductSupplyDivisionFailed
ifba * 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 toca_id
. -
ca_id
identifies the CA with a capital distribution to reclaim for.
Errors
-
NoSuchDistribution
if there's no capital distribution forca_id
. -
AlreadyReclaimed
if this function has already been called successfully. -
NotExpired
ifnow < 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 ofca_id.ticker
. -
ca_id
identifies the CA with a not-yet-started capital distribution to remove.
Errors
-
UnauthorizedAgent
iforigin
is not agent-permissioned forticker
. -
NoSuchDistribution
if there's no capital distribution forca_id
. -
DistributionStarted
ifpayment_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 fromAddOrigin
or root.Arguments
-
origin
- Origin representingAddOrigin
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 whenwho
is removed from CDD. As soon as it is expired, the generated claims will be "invalid" aswho
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 fromRemoveOrigin
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
functionArguments
-
origin
- Origin representingRemoveOrigin
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 representingResetOrigin
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 memberadd
.May only be called from
SwapOrigin
or root.Arguments
-
origin
- Origin representingSwapOrigin
or root -
remove
- IdentityId to be removed from the group. -
add
- IdentityId to be added in place ofremove
.
-
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 ofticker
. -
ticker
to create the checkpoint for.
Errors
-
UnauthorizedAgent
if the DID oforigin
isn't a permissioned agent forticker
. -
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 ofticker
. -
ticker
to create the schedule for. -
schedule
that will generate checkpoints.
Errors
-
UnauthorizedAgent
if the DID oforigin
isn't a permissioned agent forticker
. -
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 forschedule
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 ofticker
. -
ticker
to remove the schedule from. -
id
of the schedule, when it was created bycreated_schedule
.
Errors
-
UnauthorizedAgent
if the DID oforigin
isn't a permissioned agent forticker
. -
NoCheckpointSchedule
ifid
does not identify a schedule for thisticker
. -
ScheduleNotRemovable
ifid
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 fromAddOrigin
or root.Arguments
-
origin
- Origin representingAddOrigin
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 whenwho
is removed from CDD. As soon as it is expired, the generated claims will be "invalid" aswho
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 fromRemoveOrigin
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
functionArguments
-
origin
- Origin representingRemoveOrigin
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 representingResetOrigin
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 memberadd
.May only be called from
SwapOrigin
or root.Arguments
-
origin
- Origin representingSwapOrigin
or root -
remove
- IdentityId to be removed from the group. -
add
- IdentityId to be added in place ofremove
.
-
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
iforigin
is not the owner of the ticker. -
DuplicateAssetCompliance
ifasset_compliance
contains multiple entries with the samerequirement_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 ofca_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
iforigin
is not agent-permissioned forticker
. -
NoSuchCA
ifid
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
ofkind
withdetails
and other provided arguments.Arguments
-
origin
which must be an external agent ofticker
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
ifdetails.len()
goes beyondmax_details_length
. -
UnauthorizedAgent
iforigin
is not agent-permissioned forticker
. -
CounterOverflow
in the unlikely event that so many CAs were created for thisticker
, that integer overflow would have occured if instead allowed. -
TooManyDidTaxes
ifwithholding_tax.unwrap().len()
would go over the limitMaxDidWhts
. -
DuplicateDidTax
if a DID is included more than once inwt
. -
TooManyTargetIds
iftargets.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 givendocs
. Any previous links for the CA are removed in favor ofdocs
.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 ofid.ticker
with relevant permissions. -
id
of the CA to associate withdocs
. -
docs
to associate with the CA withid
.
Errors
-
UnauthorizedAgent
iforigin
is not agent-permissioned forticker
. -
NoSuchCA
ifid
does not identify an existing CA. -
NoSuchDoc
if any ofdocs
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 ofca_id.ticker
with relevant permissions. -
ca_id
of the CA to remove.
Errors
-
UnauthorizedAgent
iforigin
is not agent-permissioned forticker
. -
NoSuchCA
ifid
does not identify an existing CA.
Permissions
- Asset
-
setDefaultTargets(ticker: Ticker
, targets: TargetIdentities
)
-
interface:
api.tx.corporateAction.setDefaultTargets
-
summary: Set the default CA
TargetIdentities
totargets
.Arguments
-
origin
which must be an external agent ofticker
with relevant permissions. -
ticker
for which the default identities are changing. -
targets
the default target identities for a CA.
Errors
-
UnauthorizedAgent
iforigin
is not agent-permissioned forticker
. -
TooManyTargetIds
iftargets.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 ofticker
with relevant permissions. -
ticker
that the withholding tax will apply to. -
tax
that should be withheld when distributing dividends, etc.
Errors
UnauthorizedAgent
iforigin
is not agent-permissioned forticker
.
Permissions
- Asset
-
setDidWithholdingTax(ticker: Ticker
, taxed_did: IdentityId
, tax: Option<Tax>
)
-
interface:
api.tx.corporateAction.setDidWithholdingTax
-
summary: Set the withholding tax of
ticker
fortaxed_did
totax
. IfSome(tax)
, this overrides the default withholding tax ofticker
totax
fortaxed_did
. Otherwise, ifNone
, the default withholding tax will be used.Arguments
-
origin
which must be an external agent ofticker
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
iforigin
is not agent-permissioned forticker
. -
TooManyDidTaxes
ifSome(tax)
and adding the override would go over the limitMaxDidWhts
.
Permissions
- Asset
-
setMaxDetailsLength(length: u32
)
- interface:
api.tx.corporateAction.setMaxDetailsLength
- summary: Set the max
length
ofdetails
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 bymeta
, which includes the ballot title, the motions, their choices, etc. See theBallotMeta
for more.Arguments
-
origin
is a signer that has permissions to act as an agent ofca_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
iforigin
is not agent-permissioned forticker
. -
NoSuchCA
ifca_id
does not identify an existing CA. -
CANotNotice
if the CA is not of theIssuerNotice
kind. -
StartAfterEnd
ifrange.start > range.end
. -
NowAfterEnd
ifnow > range.end
wherenow
is the current timestamp. -
NoRecordDate
if CA has no record date. -
RecordDateAfterStart
ifdate > range.start
wheredate
is the CA's record date. -
AlreadyExists
if there's a ballot already. -
NumberOfChoicesOverflow
if the total choice inmeta
overflowsusize
. -
TooLong
if any of the embedded strings inmeta
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 ofca_id.ticker
. -
ca_id
identifies the attached ballot's CA. -
end
specifies the new end date of the ballot.
Errors
-
UnauthorizedAgent
iforigin
is not agent-permissioned forticker
. -
NoSuchBallot
ifca_id
does not identify a ballot. -
VotingAlreadyStarted
ifstart >= now
, wherenow
is the current time. -
StartAfterEnd
ifstart > 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 ofca_id.ticker
. -
ca_id
identifies the attached ballot's CA. -
meta
specifies the new metadata.
Errors
-
UnauthorizedAgent
iforigin
is not agent-permissioned forticker
. -
NoSuchBallot
ifca_id
does not identify a ballot. -
VotingAlreadyStarted
ifstart >= now
, wherenow
is the current time. -
NumberOfChoicesOverflow
if the total choice inmeta
overflowsusize
. -
TooLong
if any of the embedded strings inmeta
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 ofca_id.ticker
. -
ca_id
identifies the attached ballot's CA. -
rcv
specifies if RCV is to be supported or not.
Errors
-
UnauthorizedAgent
iforigin
is not agent-permissioned forticker
. -
NoSuchBallot
ifca_id
does not identify a ballot. -
VotingAlreadyStarted
ifstart >= now
, wherenow
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 ofca_id.ticker
. -
ca_id
identifies the attached ballot's CA.
Errors
-
UnauthorizedAgent
iforigin
is not agent-permissioned forticker
. -
NoSuchBallot
ifca_id
does not identify a ballot. -
VotingAlreadyStarted
ifstart >= now
, wherenow
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 byca_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 oforigin
's DID may be used for each motion in the ballot.
Errors
-
NoSuchBallot
ifca_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 matchvotes.len()
. -
NoSuchCA
ifca_id
does not identify an existing CA. -
NotTargetedByCA
if the CA does not targetorigin
's DID. -
InsufficientVotes
if the voting power used for any motion invotes
exceedsorigin
'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 ofticker
. -
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
ifauth_id
does not exist for the given caller. -
AuthorizationError::Expired
ifauth_id
is for an auth that has expired. -
AuthorizationError::BadType
ifauth_id
was not for aBecomeAgent
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 inticker
.Arguments
-
ticker
that has theagent
. -
agent
ofticker
to change the group for. -
group
thatagent
will belong to inticker
.
Errors
-
UnauthorizedAgent
iforigin
was not authorized as an agent to call this. -
NoSuchAG
ifid
does not identify a custom AG. -
NotAnAgent
ifagent
is not an agent ofticker
. -
RemovingLastFullAgent
ifagent
was aFull
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 assignedid = AGIdSequence::get() + 1
as itsAGId
, which you can use asAgentGroup::Custom(id)
when adding agents forticker
.Arguments
-
ticker
to add the custom group for. -
perms
that the new AG will have.
Errors
-
UnauthorizedAgent
iforigin
was not authorized as an agent to call this. -
TooLong
ifperms
had some string or list length that was too long. -
CounterOverflow
ifAGIdSequence::get() + 1
would exceedu32::MAX
.
Permissions
-
Asset
-
Agent
-
removeAgent(ticker: Ticker
, agent: IdentityId
)
-
interface:
api.tx.externalAgents.removeAgent
-
summary: Remove the given
agent
fromticker
.Arguments
-
ticker
that has theagent
to remove. -
agent
ofticker
to remove.
Errors
-
UnauthorizedAgent
iforigin
was not authorized as an agent to call this. -
NotAnAgent
ifagent
is not an agent ofticker
. -
RemovingLastFullAgent
ifagent
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 giventicker
.Arguments
-
ticker
the custom AG belongs to. -
id
for the custom AG withinticker
. -
perms
to update the custom AG to.
Errors
-
UnauthorizedAgent
iforigin
was not authorized as an agent to call this. -
TooLong
ifperms
had some string or list length that was too long. -
NoSuchAG
ifid
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 thanInvestorUniqueness
. -
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 ofid
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
fromdisable_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>
)
-
interface:
api.tx.identity.removeSecondaryKeys
-
summary: Removes specified secondary keys of a DID if present.
Failure It can only called by primary key owner.
Weight
950_000_000 + 60_000 * signers_to_remove.len()
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
, andscope
.Please note that
origin
must be the issuer of the target claim.Errors
TargetHasNonZeroBalanceAtScopeId
when you try to revoke aInvestorUniqueness*
claim, andtarget
identity still have any balance on the givenscope
.
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 totrue
, 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 ofm
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 ofm
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 ofm
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 ofm
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 withid
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)
whereresult
is applied toid
. Note that the snapshot priority queue is encoded with the lowest priority first. soresults = [(id, Approve)]
will approveSnapshotQueue[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 againstorigin
. -
proposal
a dispatchable call -
deposit
minimum deposit value, which is ignored ifproposer
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 activeThis function is intended for storage garbage collection purposes.
Errors
-
BadOrigin
unless a GC voting majority executes this function. -
NoSuchProposal
if the PIP withid
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 withid
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
isNone
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 withid
. The "convinction" or strength of the vote is given bydeposit
, which is reserved.Note that
vote
is not additive. That is,vote(id, true, 50)
followed byvote(id, true, 40)
will first reserve50
and then refund50 - 10
, ending up with40
in deposit. To add atop of existing votes, you'll needexisting_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
ifid
doesn't reference a valid PIP. -
NotFromCommunity
if proposal was made by a committee. -
IncorrectProposalState
if PIP isn't pending. -
InsufficientDeposit
iforigin
cannot reservedeposit - 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 coordinatorid
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
approve
ingly (or not, iffalse
) on an existingproposal
given by its hash,index
.Arguments
-
proposal
- A hash of the proposal to be voted on. -
index
- The proposal index. -
approve
- Iftrue
than this is afor
vote, andagainst
otherwise.
Errors
NotAMember
, if theorigin
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 ofcall
has already been recorded, i.e., already proposed, then this call counts as a vote, i.e., as ifvote_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, passingfalse
will result in errorFirstVoteReject
. -
call
- the call to propose for execution.
Errors
-
FirstVoteReject
, ifcall
hasn't been proposed andapprove == false
. -
NotAMember
, if theorigin
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
ifnum
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 ofportfolio_id
.
Permissions
- Portfolio
renamePortfolio(num: PortfolioNumber
, to_name: PortfolioName
)
-
interface:
api.tx.portfolio.renamePortfolio
-
summary: Renames a non-default portfolio.
Errors
PortfolioDoesNotExist
ifnum
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 apaying_key
.
Errors
-
AuthorizationError::Invalid
ifauth_id
does not exist for the given caller. -
AuthorizationError::Expired
ifauth_id
the authorization has expired. -
AuthorizationError::BadType
ifauth_id
was not aAddRelayerPayingKey
authorization. -
NotAuthorizedForUserKey
iforigin
is not authorized to accept the authorization for theuser_key
. -
NotAuthorizedForPayingKey
if the authorization was created an identity different from thepaying_key
's identity. -
UserKeyCddMissing
if theuser_key
is not attached to a CDD'd identity. -
PayingKeyCddMissing
if thepaying_key
is not attached to a CDD'd identity. -
UnauthorizedCaller
iforigin
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 ofuser_key
.
Errors
-
NoPayingKey
if theuser_key
doesn't have apaying_key
. -
NotPayingKey
iforigin
doesn't match the currentpaying_key
. -
UnauthorizedCaller
iforigin
is not authorized to call this extrinsic. -
Overlow
if the subsidy has less thenamount
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 ofuser_key
.
Errors
-
NoPayingKey
if theuser_key
doesn't have apaying_key
. -
NotPayingKey
iforigin
doesn't match the currentpaying_key
. -
UnauthorizedCaller
iforigin
is not authorized to call this extrinsic. -
Overlow
if the subsidy's remaining POLYX would have overflowedu128::MAX
.
-
removePayingKey(user_key: AccountId
, paying_key: AccountId
)
-
interface:
api.tx.relayer.removePayingKey
-
summary: Removes the
paying_key
from auser_key
.Arguments
-
user_key
the user key to remove the subsidy from. -
paying_key
the paying key that was subsidising theuser_key
.
Errors
-
NotAuthorizedForUserKey
iforigin
is not authorized to remove the subsidy for theuser_key
. -
NoPayingKey
if theuser_key
doesn't have apaying_key
. -
NotPayingKey
if thepaying_key
doesn't match the currentpaying_key
. -
UnauthorizedCaller
iforigin
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
iforigin
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 theuser_key
.
Errors
-
NoPayingKey
if theuser_key
doesn't have apaying_key
. -
NotPayingKey
iforigin
doesn't match the currentpaying_key
. -
UnauthorizedCaller
iforigin
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 containreward_address
followed by the suffix"claim_itn_reward"
, and must have been signed byitn_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 theitn_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 theminimum_balance
specified byT::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
] isClosed
.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
] isClosed
.
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
] isClosed
.The dispatch origin for this call must be Signed by the controller, not the stash. And, it can be only called when [
EraElectionStatus
] isClosed
.
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 toT::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
] isClosed
. -
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 targetstash
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
] isClosed
.
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 complianceArguments
-
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 whenHistoryDepth
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 byRoot
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:
- 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:
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:
- It is submitted when [
EraElectionStatus
] isOpen
. 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:
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
] isClosed
.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
] isClosed
.
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
] isClosed
.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
iforigin
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
iforigin
is not the owner of the ticker. -
DuplicateTransferManager
ifnew_transfer_manager
is already enabled for the ticker. -
TransferManagersLimitReached
if theticker
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
iforigin
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
iforigin
is not the owner of the ticker. -
TransferManagerMissing
ifasset_compliance
contains multiple entries with the samerequirement_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 theoffering_asset
. -
offering_asset
- Asset being offered. -
raising_portfolio
- Portfolio containing theraising_asset
. -
raising_asset
- Asset being exchanged foroffering_asset
on investment. -
tiers
- Price tiers to charge investors on investment. -
venue_id
- Venue to handle settlement. -
start
- Fundraiser start time, ifNone
the fundraiser will start immediately. -
end
- Fundraiser end time, ifNone
the fundraiser will never expire. -
minimum_investment
- Minimum amount ofraising_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 thatoffering_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 ofoffering_asset
to purchase. -
max_price
- Maximum price to pay per unit ofoffering_asset
, IfNone
there are no constraints on price. -
receipt
- Off-chain receipt to use instead of on-chain balance infunding_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 coordinatorid
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
approve
ingly (or not, iffalse
) on an existingproposal
given by its hash,index
.Arguments
-
proposal
- A hash of the proposal to be voted on. -
index
- The proposal index. -
approve
- Iftrue
than this is afor
vote, andagainst
otherwise.
Errors
NotAMember
, if theorigin
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 ofcall
has already been recorded, i.e., already proposed, then this call counts as a vote, i.e., as ifvote_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, passingfalse
will result in errorFirstVoteReject
. -
call
- the call to propose for execution.
Errors
-
FirstVoteReject
, ifcall
hasn't been proposed andapprove == false
. -
NotAMember
, if theorigin
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 fromAddOrigin
or root.Arguments
-
origin
- Origin representingAddOrigin
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 whenwho
is removed from CDD. As soon as it is expired, the generated claims will be "invalid" aswho
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 fromRemoveOrigin
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
functionArguments
-
origin
- Origin representingRemoveOrigin
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 representingResetOrigin
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 memberadd
.May only be called from
SwapOrigin
or root.Arguments
-
origin
- Origin representingSwapOrigin
or root -
remove
- IdentityId to be removed from the group. -
add
- IdentityId to be added in place ofremove
.
-
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 newJoinIdentity
authorization is created, so each of them will need to accept it before become part of this newIdentityID
.Errors
-
AlreadyLinked
if the caller account or if any of the givensecondary_keys
has already linked to anIdentityID
-
SecondaryKeysContainPrimaryKey
ifsecondary_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
fromorigin
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 coordinatorid
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
approve
ingly (or not, iffalse
) on an existingproposal
given by its hash,index
.Arguments
-
proposal
- A hash of the proposal to be voted on. -
index
- The proposal index. -
approve
- Iftrue
than this is afor
vote, andagainst
otherwise.
Errors
NotAMember
, if theorigin
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 ofcall
has already been recorded, i.e., already proposed, then this call counts as a vote, i.e., as ifvote_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, passingfalse
will result in errorFirstVoteReject
. -
call
- the call to propose for execution.
Errors
-
FirstVoteReject
, ifcall
hasn't been proposed andapprove == false
. -
NotAMember
, if theorigin
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 fromAddOrigin
or root.Arguments
-
origin
- Origin representingAddOrigin
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 whenwho
is removed from CDD. As soon as it is expired, the generated claims will be "invalid" aswho
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 fromRemoveOrigin
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
functionArguments
-
origin
- Origin representingRemoveOrigin
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 representingResetOrigin
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 memberadd
.May only be called from
SwapOrigin
or root.Arguments
-
origin
- Origin representingSwapOrigin
or root -
remove
- IdentityId to be removed from the group. -
add
- IdentityId to be added in place ofremove
.
-
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 theBatchInterrupted
event is deposited, along with the number of successful calls made and the error of the failed call. If all were successful, then theBatchCompleted
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, thenBatchInterrupted
is deposited. If all were successful, then theBatchCompleted
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, thenBatchOptimisticFailed
is deposited, with a vector of event counts for each call as well as a vector of errors. If all were successful, then theBatchCompleted
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
-