# CCIP v1.6.1 BurnFromMintTokenPool Contract API Reference
Source: https://docs.chain.link/ccip/api-reference/evm/v1.6.1/burn-from-mint-token-pool

> For the complete documentation index, see [llms.txt](/llms.txt).

<Aside type="note" title="Integrate Chainlink CCIP v1.6.1 into your project">
  <Tabs sharedStore="ccip-v1-6-1-package" client:visible>
    <Fragment slot="tab.1">npm</Fragment>
    <Fragment slot="tab.2">yarn</Fragment>
    <Fragment slot="tab.3">foundry</Fragment>

    <Fragment slot="panel.1">
      If you use [NPM](https://www.npmjs.com/), install the [@chainlink/contracts-ccip NPM package](https://www.npmjs.com/package/@chainlink/contracts-ccip):

      ```shell
      npm install @chainlink/contracts-ccip@1.6.1
      ```
    </Fragment>

    <Fragment slot="panel.2">
      If you use [Yarn](https://yarnpkg.com/), install the [@chainlink/contracts-ccip NPM package](https://www.npmjs.com/package/@chainlink/contracts-ccip):

      ```shell
      yarn add @chainlink/contracts-ccip@1.6.1
      ```
    </Fragment>

    <Fragment slot="panel.3">
      If you use [Foundry](https://book.getfoundry.sh/), install the package:

      ```shell
      forge install smartcontractkit/chainlink-ccip@bbab0601244ce58e2ffac0dbc178a80aab1fa4a3
      ```
    </Fragment>
  </Tabs>
</Aside>

## BurnFromMintTokenPool

A specialized token pool contract that manages third-party tokens through minting and burning operations, specifically using the `burnFrom` function.

[Git Source](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v1.6.1/chains/evm/contracts/pools/BurnFromMintTokenPool.sol)

**Inherits:**

- [BurnMintTokenPoolAbstract](/ccip/api-reference/evm/v1.6.1/burn-mint-token-pool-abstract)
- [ITypeAndVersion](/ccip/api-reference/evm/v1.6.1/i-type-and-version)

> \*\*NOTE\*\*
>
>
>
> This pool manages third-party token minting and burning operations with the following characteristics:
>
> - The pool's whitelisting mode is permanently set during contract deployment
> - The pool can be configured to either:
>   - Accept transactions from any address as originalSender
>   - Accept transactions only from whitelisted originalSender addresses
> - Whitelisting mode can only be changed by deploying a new pool
> - Before deployment, ensure the token's burner/minter roles can be adjusted if needed
> - This implementation extends BurnMintTokenPool by using the `burnFrom(from, amount)` function

## State Variables

### typeAndVersion

```solidity
string public constant override typeAndVersion = "BurnFromMintTokenPool 1.6.1";
```

<Aside>A constant identifier that specifies the contract type and version number.</Aside>

**Returns**

| Type     | Description                                           |
| -------- | ----------------------------------------------------- |
| `string` | The contract identifier "BurnFromMintTokenPool 1.6.1" |

## Functions

### \_lockOrBurn

Internal function that implements the token burning logic for the `BurnFromMintTokenPool`.

```solidity
function _lockOrBurn(uint256 amount) internal virtual override;
```

> \*\*NOTE\*\*
>
>
>
> Overrides the virtual [`_lockOrBurn`](/ccip/api-reference/evm/v1.6.1/token-pool#_lockorburn) function from the base `TokenPool` contract:
>
> - Provides the specific "burn" implementation for the `BurnFromMintTokenPool`.
> - Calls the token's `burnFrom(address(this), amount)` function.
> - Relies on the token allowance set in the constructor to authorize the burn operation from the pool's own address.

**Parameters**

| Name     | Type      | Description                  |
| -------- | --------- | ---------------------------- |
| `amount` | `uint256` | The number of tokens to burn |

### constructor

```solidity
constructor(
  IBurnMintERC20 token,
  uint8 localTokenDecimals,
  address[] memory allowlist,
  address rmnProxy,
  address router
) TokenPool(token, localTokenDecimals, allowlist, rmnProxy, router);
```

> \*\*NOTE\*\*
>
>
>
> Sets up the BurnFromMintTokenPool contract with initial configuration.
>
> For maximum compatibility, the constructor automatically grants the pool maximum allowance to burn tokens from itself, as some tokens require explicit approval for burning operations.

**Parameters**

| Name                 | Type             | Description                                            |
| -------------------- | ---------------- | ------------------------------------------------------ |
| `token`              | `IBurnMintERC20` | Address of the token contract to be managed            |
| `localTokenDecimals` | `uint8`          | Decimal precision of the local token                   |
| `allowlist`          | `address[]`      | List of addresses authorized to interact with the pool |
| `rmnProxy`           | `address`        | Address of the RMN proxy contract                      |
| `router`             | `address`        | Address of the router contract                         |