api.entities.Asset.TransferRestrictions.TransferRestrictionBase.TransferRestrictionBase - PolymeshAssociation/polymesh-sdk GitHub Wiki

Class: TransferRestrictionBase<T>

api/entities/Asset/TransferRestrictions/TransferRestrictionBase.TransferRestrictionBase

Base class for managing Transfer Restrictions

Type parameters

Name Type
T extends TransferRestrictionType

Hierarchy

Table of contents

Methods

Methods

addRestriction

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

Add a Transfer Restriction of the corresponding type to this Asset

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

Parameters

Name Type
args AddRestrictionParams<T>
opts? ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<BigNumber, BigNumber>>


disableStat

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

Removes an Asset statistic

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

Parameters

Name Type
args RemoveAssetStatParamsBase<T>
opts? ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>


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

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

Parameters

Name Type
args SetAssetStatParams<T>
opts? ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>


get

get(): Promise<GetTransferRestrictionReturnType<T>>

Retrieve all active Transfer Restrictions of the corresponding type

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<GetTransferRestrictionReturnType<T>>


removeRestrictions

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

Removes all Transfer Restrictions of the corresponding type from this Asset

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

Parameters

Name Type
opts? ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<BigNumber, BigNumber>>


setRestrictions

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

Sets all Transfer Restrictions of the corresponding type on this Asset

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

Parameters

Name Type
args SetRestrictionsParams<T>
opts? ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<BigNumber, BigNumber>>

⚠️ **GitHub.com Fallback** ⚠️