# ensure_fee_account · FT4 Rell API · Chromia Docs (concept)

> function ensure_ fee_ account(custom_ account_ id: byte_ array?, blockchain_ rid: byte_ array): account Returns the fee account for a chain, creating it if

Source: https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts.strategies.transfer/ensure_fee_account/

FUNCTION

# ensure\_fee\_account

```signature
function ensure_fee_account(custom_account_id: byte_array?, blockchain_rid: byte_array): account
```

[Source](https://gitlab.com/chromaway/ft4-lib/-/blob/development/rell/src/lib/ft4/core/accounts/strategies/transfer/module.rell#lines-699)

Returns the fee account for a chain, creating it if needed. This function should not
normally be used, `ensure_chain_fee_account` should be preferred.

Can only be called from an operation.

Throws if `custom_account_id` is not null, but the account specified does not exist.

**Parameters**

* **custom\_account\_id** — the ID of the fee account that should be used for this chain, or null if the account can be generated automatically
* **blockchain\_rid** — the ID of the blockchain the pool account represents. It will normally be this chain's ID

**See Also**

* [ensure\_chain\_fee\_account](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts.strategies.transfer/ensure_chain_fee_account/)

[View this page on docs.chromia.com](https://docs.chromia.com/pages/ft4-rell/-f-t4%20-library/lib.ft4.core.accounts.strategies.transfer/ensure_fee_account.html)Generated API reference, mirrored from the live docs
