> For the complete documentation index, see [llms.txt](https://docs-core.allbridge.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-core.allbridge.io/sdk/guides/evm/allowance-and-approve.md).

# Allowance and approve

This is an example demonstrating how to use the Allbridge Core SDK to check the allowance and create an approval.

The contract that has to be approved depends on the messenger of the transfer, so `messenger` is a required parameter of both methods.

```typescript
if (
  // check if tokens already approved
  await sdk.bridge.checkAllowance({
    token: sourceTokenInfo,
    owner: fromAddress,
    gasFeePaymentMethod: gasFeePaymentMethod,
    amount: totalAmountFloat,
    messenger: Messenger.CCTP_V2,
  })
) {
  console.log("The granted allowance is enough for the transaction");
} else {
  console.log("The granted allowance is NOT enough for the transaction");
}
```

To make approve transaction

```typescript
  // authorize the bridge to transfer tokens from the sender's address
  const rawTransactionApprove = await sdk.bridge.rawTxBuilder.approve({
    token: sourceTokenInfo,
    owner: fromAddress,
    messenger: Messenger.CCTP_V2,
  });
  const approveTxReceipt = await sendEvmRawTransaction(rawTransactionApprove as RawEvmTransaction);
  console.log("approve tx id:", approveTxReceipt.transactionHash);
```

NEAR Intents transfers and native tokens need no approval.

[Full example](https://github.com/allbridge-io/allbridge-core-js-sdk/blob/main/examples/src/examples/bridge/evm/evm-build-send-tx.ts)
