# TransferRestrictionBase

Base class for managing Transfer Restrictions

## Type parameters

▪ **T**: [*TransferRestrictionType*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/enums/transferrestrictiontype)

## Hierarchy

* Namespace‹[SecurityToken](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/classes/securitytoken)›

  ↳ **TransferRestrictionBase**

  ↳ [Count](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/classes/count)

  ↳ [Percentage](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/classes/percentage)

## Index

### Properties

* [context](#protected-context)
* [exemptedScopeIds](#optional-exemptedscopeids)
* [parent](#protected-parent)
* [type](#protected-abstract-type)

### Methods

* [addRestriction](#addrestriction)
* [get](#get)
* [removeRestrictions](#removerestrictions)
* [setRestrictions](#setrestrictions)

## Properties

### `Protected` context

• **context**: [*Context*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/classes/context)

*Inherited from void*

*Defined in* [*src/api/entities/Namespace.ts:11*](https://github.com/PolymathNetwork/polymesh-sdk/blob/959efb76/src/api/entities/Namespace.ts#L11)

### `Optional` exemptedScopeIds

• **exemptedScopeIds**? : *string\[]*

*Defined in* [*src/types/index.ts:1053*](https://github.com/PolymathNetwork/polymesh-sdk/blob/959efb76/src/types/index.ts#L1053)

array of Scope IDs that are exempted from the Restriction

### `Protected` parent

• **parent**: [*SecurityToken*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/classes/securitytoken)

*Inherited from void*

*Defined in* [*src/api/entities/Namespace.ts:9*](https://github.com/PolymathNetwork/polymesh-sdk/blob/959efb76/src/api/entities/Namespace.ts#L9)

### `Protected` `Abstract` type

• **type**: *T*

*Defined in* [*src/api/entities/SecurityToken/TransferRestrictions/TransferRestrictionBase.ts:56*](https://github.com/PolymathNetwork/polymesh-sdk/blob/959efb76/src/api/entities/SecurityToken/TransferRestrictions/TransferRestrictionBase.ts#L56)

## Methods

### addRestriction

▸ **addRestriction**(`args`: [AddRestrictionParams](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/globals#addrestrictionparams)‹T›, `opts?`: [ProcedureOpts](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/interfaces/procedureopts)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/classes/transactionqueue)*‹number››*

*Defined in* [*src/api/entities/SecurityToken/TransferRestrictions/TransferRestrictionBase.ts:123*](https://github.com/PolymathNetwork/polymesh-sdk/blob/959efb76/src/api/entities/SecurityToken/TransferRestrictions/TransferRestrictionBase.ts#L123)

Add a Transfer Restriction of the corresponding type to this Security Token

**`note`** the result is the total amount of restrictions after the procedure has run

**`note`** this method is of type [ProcedureMethod](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/interfaces/proceduremethod), which means you can call `addRestriction.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name    | Type                                                                                                                            |
| ------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `args`  | [AddRestrictionParams](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/globals#addrestrictionparams)‹T› |
| `opts?` | [ProcedureOpts](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/interfaces/procedureopts)               |

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/classes/transactionqueue)*‹number››*

### get

▸ **get**(): *Promise‹*[*GetReturnType*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/globals#getreturntype)*‹T››*

*Defined in* [*src/api/entities/SecurityToken/TransferRestrictions/TransferRestrictionBase.ts:158*](https://github.com/PolymathNetwork/polymesh-sdk/blob/959efb76/src/api/entities/SecurityToken/TransferRestrictions/TransferRestrictionBase.ts#L158)

Retrieve all active Transfer Restrictions of the corresponding type

**`note`** there is a maximum number of restrictions allowed accross all types. The `availableSlots` property of the result represents how many more restrictions can be added before reaching that limit

**Returns:** *Promise‹*[*GetReturnType*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/globals#getreturntype)*‹T››*

### removeRestrictions

▸ **removeRestrictions**(`args`: void, `opts?`: [ProcedureOpts](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/interfaces/procedureopts)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/classes/transactionqueue)*‹number››*

*Defined in* [*src/api/entities/SecurityToken/TransferRestrictions/TransferRestrictionBase.ts:147*](https://github.com/PolymathNetwork/polymesh-sdk/blob/959efb76/src/api/entities/SecurityToken/TransferRestrictions/TransferRestrictionBase.ts#L147)

Removes all Transfer Restrictions of the corresponding type from this Security Token

**`note`** the result is the total amount of restrictions after the procedure has run

**`note`** this method is of type [ProcedureMethod](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/interfaces/proceduremethod), which means you can call `removeRestrictions.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name    | Type                                                                                                              |
| ------- | ----------------------------------------------------------------------------------------------------------------- |
| `args`  | void                                                                                                              |
| `opts?` | [ProcedureOpts](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/interfaces/procedureopts) |

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/classes/transactionqueue)*‹number››*

### setRestrictions

▸ **setRestrictions**(`args`: [SetRestrictionsParams](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/globals#setrestrictionsparams)‹T›, `opts?`: [ProcedureOpts](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/interfaces/procedureopts)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/classes/transactionqueue)*‹number››*

*Defined in* [*src/api/entities/SecurityToken/TransferRestrictions/TransferRestrictionBase.ts:135*](https://github.com/PolymathNetwork/polymesh-sdk/blob/959efb76/src/api/entities/SecurityToken/TransferRestrictions/TransferRestrictionBase.ts#L135)

Sets all Transfer Restrictions of the corresponding type on this Security Token

**`note`** the result is the total amount of restrictions after the procedure has run

**`note`** this method is of type [ProcedureMethod](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/interfaces/proceduremethod), which means you can call `setRestrictions.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name    | Type                                                                                                                              |
| ------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `args`  | [SetRestrictionsParams](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/globals#setrestrictionsparams)‹T› |
| `opts?` | [ProcedureOpts](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/interfaces/procedureopts)                 |

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/classes/transactionqueue)*‹number››*
