Skip to main content
Version: 26.0.0-beta.2

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


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


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


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


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


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


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