> For the complete documentation index, see [llms.txt](https://developers.polymath.network/classic-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.polymath.network/classic-sdk/beta/external-modules/_procedures_approveerc20_.approveerc20.md).

# ApproveErc20

Procedure to approve spending funds on an ERC20 token. If no token address is specified, it defaults to POLY

## Type parameters

▪ **ReturnType**

## Hierarchy

* Procedure‹[ApproveErc20ProcedureArgs](broken://pages/-M-tw-cAZcAsJc106P8M)›

  ↳ **ApproveErc20**

## Index

### Constructors

* [constructor](broken://pages/-M-tw-a2eG0e1oSUiy25#constructor)

### Properties

* [args](broken://pages/-M-tw-a2eG0e1oSUiy25#protected-args)
* [context](broken://pages/-M-tw-a2eG0e1oSUiy25#protected-context)
* [type](broken://pages/-M-tw-a2eG0e1oSUiy25#type)

### Methods

* [addProcedure](broken://pages/-M-tw-a2eG0e1oSUiy25#addprocedure)
* [addSignatureRequest](broken://pages/-M-tw-a2eG0e1oSUiy25#addsignaturerequest)
* [addTransaction](broken://pages/-M-tw-a2eG0e1oSUiy25#addtransaction)
* [prepare](broken://pages/-M-tw-a2eG0e1oSUiy25#prepare)
* [prepareTransactions](broken://pages/-M-tw-a2eG0e1oSUiy25#preparetransactions)

## Constructors

### constructor

\+ **new ApproveErc20**(`args`: [ApproveErc20ProcedureArgs](broken://pages/-M-tw-cAZcAsJc106P8M), `context`: [Context](broken://pages/-M-tw-_Q7PZbtE8P8eVD)): [*ApproveErc20*](broken://pages/-M-tw-a2eG0e1oSUiy25)

*Inherited from void*

*Defined in* [*src/procedures/Procedure.ts:40*](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/procedures/Procedure.ts#L40)

**Parameters:**

| Name      | Type                                                             |
| --------- | ---------------------------------------------------------------- |
| `args`    | [ApproveErc20ProcedureArgs](broken://pages/-M-tw-cAZcAsJc106P8M) |
| `context` | [Context](broken://pages/-M-tw-_Q7PZbtE8P8eVD)                   |

**Returns:** [*ApproveErc20*](broken://pages/-M-tw-a2eG0e1oSUiy25)

## Properties

### `Protected` args

• **args**: [*ApproveErc20ProcedureArgs*](broken://pages/-M-tw-cAZcAsJc106P8M)

*Inherited from void*

*Defined in* [*src/procedures/Procedure.ts:34*](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/procedures/Procedure.ts#L34)

### `Protected` context

• **context**: [*Context*](broken://pages/-M-tw-_Q7PZbtE8P8eVD)

*Inherited from void*

*Defined in* [*src/procedures/Procedure.ts:36*](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/procedures/Procedure.ts#L36)

### type

• **type**: [*ProcedureType*](broken://pages/-M-tw-awanLJUxGQ6Ike) = ProcedureType.ApproveErc20

*Overrides void*

*Defined in* [*src/procedures/ApproveErc20.ts:10*](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/procedures/ApproveErc20.ts#L10)

## Methods

### addProcedure

▸ **addProcedure**<**A**, **R**>(`Proc`: [ProcedureClass](broken://pages/-M-tw-c9gj9AYLarSHLB)‹A, R›): *(Anonymous function)*

*Inherited from void*

*Defined in* [*src/procedures/Procedure.ts:91*](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/procedures/Procedure.ts#L91)

Appends a Procedure into the TransactionQueue's queue. This defines what will be run by the TransactionQueue when it is started.

**Type parameters:**

▪ **A**

▪ **R**: *any*

**Parameters:**

| Name   | Type                                                        | Description                                                      |
| ------ | ----------------------------------------------------------- | ---------------------------------------------------------------- |
| `Proc` | [ProcedureClass](broken://pages/-M-tw-c9gj9AYLarSHLB)‹A, R› | A Procedure that will be run in the Procedure's TransactionQueue |

**Returns:** *(Anonymous function)*

whichever value is returned by the Procedure

### addSignatureRequest

▸ **addSignatureRequest**<**A**>(`request`: [SignatureRequest](/classic-sdk/beta/external-modules/_types_index_.md#signaturerequest)‹A›): *(Anonymous function)*

*Inherited from void*

*Defined in* [*src/procedures/Procedure.ts:179*](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/procedures/Procedure.ts#L179)

Appends a signature request into the TransactionQueue's queue. This defines what will be run by the TransactionQueue when it is started.

**Type parameters:**

▪ **A**

**Parameters:**

| Name      | Type                                                                                        | Description                                                              |
| --------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| `request` | [SignatureRequest](/classic-sdk/beta/external-modules/_types_index_.md#signaturerequest)‹A› | A signature request that will be run in the Procedure's TransactionQueue |

**Returns:** *(Anonymous function)*

a PostTransactionResolver that resolves to the signed data

### addTransaction

▸ **addTransaction**<**A**, **R**, **V**>(`method`: [LowLevelMethod](/classic-sdk/beta/external-modules/_types_index_.md#lowlevelmethod)‹A› | [FutureLowLevelMethod](broken://pages/-M-tw-cUEz2WxGIRd4IU)‹V, A›, `__namedParameters`: object): *(Anonymous function)*

*Inherited from void*

*Defined in* [*src/procedures/Procedure.ts:137*](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/procedures/Procedure.ts#L137)

Appends a method or future method into the TransactionQueue's queue. This defines what will be run by the TransactionQueue when it is started.

**Type parameters:**

▪ **A**

▪ **R**: *any\[]*

▪ **V**: *any*

**Parameters:**

▪ **method**: [*LowLevelMethod*](/classic-sdk/beta/external-modules/_types_index_.md#lowlevelmethod)*‹A› |* [*FutureLowLevelMethod*](broken://pages/-M-tw-cUEz2WxGIRd4IU)*‹V, A›*

A method (or future method) that will be run in the Procedure's TransactionQueue. A future method is a transaction that doesn't exist at prepare time (for example a transaction on a module that hasn't been attached but will be by the time the previous transactions are run)

▪`Default value` **\_\_namedParameters**: *object*= {}

| Name        | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Default                           |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
| `fees`      | undefined \| [Fees](broken://pages/-M-tw-cRf8gW2vbD2nnc)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | -                                 |
| `resolvers` | object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | (\[] as unknown) as ResolverArray |
| `tag`       | undefined \| [Any](broken://pages/-M-tw-avmNLFQXnbxhC_#any) \| [GetTokens](broken://pages/-M-tw-avmNLFQXnbxhC_#gettokens) \| [ApproveErc20](broken://pages/-M-tw-avmNLFQXnbxhC_#approveerc20) \| [TransferErc20](broken://pages/-M-tw-avmNLFQXnbxhC_#transfererc20) \| [ReserveSecurityToken](broken://pages/-M-tw-avmNLFQXnbxhC_#reservesecuritytoken) \| [CreateSecurityToken](broken://pages/-M-tw-avmNLFQXnbxhC_#createsecuritytoken) \| [CreateCheckpoint](broken://pages/-M-tw-avmNLFQXnbxhC_#createcheckpoint) \| [CreateErc20DividendDistribution](broken://pages/-M-tw-avmNLFQXnbxhC_#createerc20dividenddistribution) \| [SetErc20TaxWithholding](broken://pages/-M-tw-avmNLFQXnbxhC_#seterc20taxwithholding) \| [SetEtherTaxWithholding](broken://pages/-M-tw-avmNLFQXnbxhC_#setethertaxwithholding) \| [SetDefaultExcluded](broken://pages/-M-tw-avmNLFQXnbxhC_#setdefaultexcluded) \| [EnableDividends](broken://pages/-M-tw-avmNLFQXnbxhC_#enabledividends) \| [EnableCappedSto](broken://pages/-M-tw-avmNLFQXnbxhC_#enablecappedsto) \| [EnableTieredSto](broken://pages/-M-tw-avmNLFQXnbxhC_#enabletieredsto) \| [EnableGeneralPermissionManager](broken://pages/-M-tw-avmNLFQXnbxhC_#enablegeneralpermissionmanager) \| [EnableGeneralTransferManager](broken://pages/-M-tw-avmNLFQXnbxhC_#enablegeneraltransfermanager) \| [EnableCountTransferManager](broken://pages/-M-tw-avmNLFQXnbxhC_#enablecounttransfermanager) \| [EnablePercentageTransferManager](broken://pages/-M-tw-avmNLFQXnbxhC_#enablepercentagetransfermanager) \| [DisableController](broken://pages/-M-tw-avmNLFQXnbxhC_#disablecontroller) \| [FreezeIssuance](broken://pages/-M-tw-avmNLFQXnbxhC_#freezeissuance) \| [DisableFeature](broken://pages/-M-tw-avmNLFQXnbxhC_#disablefeature) \| [ReclaimDividendFunds](broken://pages/-M-tw-avmNLFQXnbxhC_#reclaimdividendfunds) \| [WithdrawTaxWithholdings](broken://pages/-M-tw-avmNLFQXnbxhC_#withdrawtaxwithholdings) \| [PushDividendPayment](broken://pages/-M-tw-avmNLFQXnbxhC_#pushdividendpayment) \| [PullDividendPayment](broken://pages/-M-tw-avmNLFQXnbxhC_#pulldividendpayment) \| [SetDividendsWallet](broken://pages/-M-tw-avmNLFQXnbxhC_#setdividendswallet) \| [AddDelegate](broken://pages/-M-tw-avmNLFQXnbxhC_#adddelegate) \| [ChangePermission](broken://pages/-M-tw-avmNLFQXnbxhC_#changepermission) \| [ControllerTransfer](broken://pages/-M-tw-avmNLFQXnbxhC_#controllertransfer) \| [ControllerRedeem](broken://pages/-M-tw-avmNLFQXnbxhC_#controllerredeem) \| [PauseSto](broken://pages/-M-tw-avmNLFQXnbxhC_#pausesto) \| [UnpauseSto](broken://pages/-M-tw-avmNLFQXnbxhC_#unpausesto) \| [FinalizeSto](broken://pages/-M-tw-avmNLFQXnbxhC_#finalizesto) \| [SetController](broken://pages/-M-tw-avmNLFQXnbxhC_#setcontroller) \| [SetDocument](broken://pages/-M-tw-avmNLFQXnbxhC_#setdocument) \| [RemoveDocument](broken://pages/-M-tw-avmNLFQXnbxhC_#removedocument) \| [ModifyKycDataMulti](broken://pages/-M-tw-avmNLFQXnbxhC_#modifykycdatamulti) \| [ModifyInvestorFlagMulti](broken://pages/-M-tw-avmNLFQXnbxhC_#modifyinvestorflagmulti) \| [IssueMulti](broken://pages/-M-tw-avmNLFQXnbxhC_#issuemulti) \| [AllowPreMinting](broken://pages/-M-tw-avmNLFQXnbxhC_#allowpreminting) \| [RevokePreMinting](broken://pages/-M-tw-avmNLFQXnbxhC_#revokepreminting) \| [ChangeAllowBeneficialInvestments](broken://pages/-M-tw-avmNLFQXnbxhC_#changeallowbeneficialinvestments) \| [ModifyTimes](broken://pages/-M-tw-avmNLFQXnbxhC_#modifytimes) \| [ModifyFunding](broken://pages/-M-tw-avmNLFQXnbxhC_#modifyfunding) \| [ModifyAddresses](broken://pages/-M-tw-avmNLFQXnbxhC_#modifyaddresses) \| [ModifyTiers](broken://pages/-M-tw-avmNLFQXnbxhC_#modifytiers) \| [ModifyLimits](broken://pages/-M-tw-avmNLFQXnbxhC_#modifylimits) \| [ModifyOracles](broken://pages/-M-tw-avmNLFQXnbxhC_#modifyoracles) \| [BuyWithScRateLimited](broken://pages/-M-tw-avmNLFQXnbxhC_#buywithscratelimited) \| [BuyWithPolyRateLimited](broken://pages/-M-tw-avmNLFQXnbxhC_#buywithpolyratelimited) \| [BuyWithEthRateLimited](broken://pages/-M-tw-avmNLFQXnbxhC_#buywithethratelimited) \| [BuyTokens](broken://pages/-M-tw-avmNLFQXnbxhC_#buytokens) \| [BuyTokensWithPoly](broken://pages/-M-tw-avmNLFQXnbxhC_#buytokenswithpoly) \| [ChangeHolderCount](broken://pages/-M-tw-avmNLFQXnbxhC_#changeholdercount) \| [ChangeHolderPercentage](broken://pages/-M-tw-avmNLFQXnbxhC_#changeholderpercentage) \| [ModifyWhitelistMulti](broken://pages/-M-tw-avmNLFQXnbxhC_#modifywhitelistmulti) \| [SetAllowPrimaryIssuance](broken://pages/-M-tw-avmNLFQXnbxhC_#setallowprimaryissuance) \| [TransferSecurityTokens](broken://pages/-M-tw-avmNLFQXnbxhC_#transfersecuritytokens) \| [UnfreezeTransfers](broken://pages/-M-tw-avmNLFQXnbxhC_#unfreezetransfers) \| [FreezeTransfers](broken://pages/-M-tw-avmNLFQXnbxhC_#freezetransfers) \| [Signature](broken://pages/-M-tw-avmNLFQXnbxhC_#signature) \| [TransferReservationOwnership](broken://pages/-M-tw-avmNLFQXnbxhC_#transferreservationownership) \| [TransferOwnership](broken://pages/-M-tw-avmNLFQXnbxhC_#transferownership) | -                                 |

**Returns:** *(Anonymous function)*

a PostTransactionResolver that resolves to the value returned by the resolver function, or undefined if no resolver function was passed

### prepare

▸ **prepare**(): *Promise‹*[*TransactionQueue*](broken://pages/-M-tw-_ttRjEt_eA5M8H)*‹Args, ReturnType››*

*Inherited from void*

*Defined in* [*src/procedures/Procedure.ts:52*](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/procedures/Procedure.ts#L52)

Mandatory method that builds a list of transactions that will be run

**Returns:** *Promise‹*[*TransactionQueue*](broken://pages/-M-tw-_ttRjEt_eA5M8H)*‹Args, ReturnType››*

### prepareTransactions

▸ **prepareTransactions**(): *Promise‹void›*

*Overrides void*

*Defined in* [*src/procedures/ApproveErc20.ts:21*](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/procedures/ApproveErc20.ts#L21)

Approve spend of an ERC20 token by another wallet. The token in question defaults to POLY if no address is supplied

Note that if the amount has already been approved, the spending approval transaction will not be added to the queue and the procedure will return

Note that the procedure will fail if the owner's token balance is less than the amount being approved. The only exception to this is when approving a POLY spend on a testnet. If that is the case, an extra transaction will be submitted to request the missing amount of tokens from the faucet

**Returns:** *Promise‹void›*
