api.entities.Asset.TransferRestrictions.ClaimCount.ClaimCount - PolymeshAssociation/polymesh-sdk GitHub Wiki
Class: ClaimCount
api/entities/Asset/TransferRestrictions/ClaimCount.ClaimCount
Handles all Claim Count Transfer Restriction related functionality
Hierarchy
-
TransferRestrictionBase
<ClaimCount
>↳
ClaimCount
Table of contents
Properties
Properties
addRestriction
• addRestriction: ProcedureMethod
<Omit
<AddClaimCountTransferRestrictionParams
, "type"
>, BigNumber
, BigNumber
>
Add a ClaimCount Transfer Restriction to this Asset. This limits to total number of individual investors that may hold the Asset scoped by some Claim. This can limit the number of holders that are non accredited, or ensure all holders are of a certain nationality
Note
the result is the total amount of restrictions after the procedure has run
Throws
if the appropriate count statistic (matching ClaimType and issuer) is not enabled for the Asset. enableStat should be called with appropriate arguments before this method
Overrides
TransferRestrictionBase.addRestriction
Defined in
api/entities/Asset/TransferRestrictions/ClaimCount.ts:31
disableStat
• disableStat: ProcedureMethod
<Omit
<RemoveScopedCountParams
, "type"
>, void
, void
>
Disables a claim count statistic for the Asset. Since statistics introduce slight overhead to each transaction involving the Asset, disabling unused stats will reduce gas fees for investors
Throws
if the stat is being used by a restriction or is not set
Overrides
TransferRestrictionBase.disableStat
Defined in
api/entities/Asset/TransferRestrictions/ClaimCount.ts:77
enableStat
• enableStat: ProcedureMethod
<Omit
<AddClaimCountStatParams
, "type"
>, void
, void
>
Enables an investor count statistic for the Asset to be scoped by a claim, which is required before creating restrictions
The counter is only updated automatically with each transfer of tokens after the stat has been enabled.
As such the initial values for the stat should be passed in.
For Affiliate
and Accredited
scoped stats the both the number of investors who have the Claim and who do not have the claim
should be given. For Jurisdiction
scoped stats the amount of holders for each CountryCode need to be given.
Note
Currently there is a potential race condition if passing in counts values when the Asset is being traded. It is recommended to call this method during the initial configuration of the Asset, before people are trading it. Otherwise the Asset should be frozen, or the stat checked after being set to ensure the correct value is used. Future versions of the chain may expose a new extrinsic to avoid this issue
Overrides
TransferRestrictionBase.enableStat
Defined in
api/entities/Asset/TransferRestrictions/ClaimCount.ts:69
get
• get: () => Promise
<ActiveTransferRestrictions
<ClaimCountTransferRestriction
>>
Type declaration
▸ (): Promise
<ActiveTransferRestrictions
<ClaimCountTransferRestriction
>>
Retrieve all active Claim Count Transfer Restrictions
Note
there is a maximum number of restrictions allowed across all types.
The availableSlots
property of the result represents how many more restrictions can be added
before reaching that limit
Returns
Promise
<ActiveTransferRestrictions
<ClaimCountTransferRestriction
>>
Overrides
Defined in
api/entities/Asset/TransferRestrictions/ClaimCount.ts:86
removeRestrictions
• removeRestrictions: NoArgsProcedureMethod
<BigNumber
, BigNumber
>
Removes all Claim Count Transfer Restrictions from this Asset
Note
the result is the total amount of restrictions after the procedure has run
Overrides
TransferRestrictionBase.removeRestrictions
Defined in
api/entities/Asset/TransferRestrictions/ClaimCount.ts:54
setRestrictions
• setRestrictions: ProcedureMethod
<Omit
<SetClaimCountTransferRestrictionsParams
, "type"
>, BigNumber
, BigNumber
>
Sets all Claim Count Transfer Restrictions on this Asset
Note
this method sets exempted Identities for restrictions as well. If an Identity is currently exempted from a Claim Count Transfer Restriction but not passed into this call then it will be removed
Note
the result is the total amount of restrictions after the procedure has run
Overrides
TransferRestrictionBase.setRestrictions