Skip to main content
Version: 23.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:174


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:220


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:208


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:231


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:198


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:186