Skip to main content
Version: 27.0.x

Class: TransferRestrictionBase<T>

api/entities/Asset/Fungible/TransferRestrictions/TransferRestrictionBase.TransferRestrictionBase

Base class for managing Transfer Restrictions

Type parameters

NameType
Textends TransferRestrictionType

Hierarchy

Methods

addRestriction

addRestriction(args, opts?): Promise<GenericPolymeshTransaction<BigNumber, BigNumber>>

Add a Transfer Restriction of the corresponding type to this Asset

Parameters

NameType
argsAddRestrictionParams<T>
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<BigNumber, BigNumber>>

Note

the result is the total amount of restrictions after the procedure has run

Note

this method is of type ProcedureMethod, which means you can call addRestriction.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Defined in

api/entities/Asset/Fungible/TransferRestrictions/TransferRestrictionBase.ts:180


disableStat

disableStat(args, opts?): Promise<GenericPolymeshTransaction<void, void>>

Removes an Asset statistic

Parameters

NameType
argsRemoveAssetStatParamsBase<T>
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Throws

if the statistic is being used or is not set

Note

this method is of type ProcedureMethod, which means you can call disableStat.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Defined in

api/entities/Asset/Fungible/TransferRestrictions/TransferRestrictionBase.ts:226


enableStat

enableStat(args, opts?): Promise<GenericPolymeshTransaction<void, void>>

Enables statistic of the corresponding type for this Asset, which are required for restrictions to be created

Parameters

NameType
argsSetAssetStatParams<T>
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

this method is of type ProcedureMethod, which means you can call enableStat.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Defined in

api/entities/Asset/Fungible/TransferRestrictions/TransferRestrictionBase.ts:214


get

get(): Promise<GetTransferRestrictionReturnType<T>>

Retrieve all active Transfer Restrictions of the corresponding type

Returns

Promise<GetTransferRestrictionReturnType<T>>

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

Defined in

api/entities/Asset/Fungible/TransferRestrictions/TransferRestrictionBase.ts:237


getStat

getStat(): Promise<ActiveStats>

Retrieve all active Transfer Restrictions of the corresponding type

Returns

Promise<ActiveStats>

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

Defined in

api/entities/Asset/Fungible/TransferRestrictions/TransferRestrictionBase.ts:354


removeRestrictions

removeRestrictions(opts?): Promise<GenericPolymeshTransaction<BigNumber, BigNumber>>

Removes all Transfer Restrictions of the corresponding type from this Asset

Parameters

NameType
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<BigNumber, BigNumber>>

Note

the result is the total amount of restrictions after the procedure has run

Note

this method is of type NoArgsProcedureMethod, which means you can call removeRestrictions.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Defined in

api/entities/Asset/Fungible/TransferRestrictions/TransferRestrictionBase.ts:204


setRestrictions

setRestrictions(args, opts?): Promise<GenericPolymeshTransaction<BigNumber, BigNumber>>

Sets all Transfer Restrictions of the corresponding type on this Asset

Parameters

NameType
argsSetRestrictionsParams<T>
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<BigNumber, BigNumber>>

Note

the result is the total amount of restrictions after the procedure has run

Note

this method is of type ProcedureMethod, which means you can call setRestrictions.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Defined in

api/entities/Asset/Fungible/TransferRestrictions/TransferRestrictionBase.ts:192