> For the complete documentation index, see [llms.txt](https://docs.shellprotocol.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shellprotocol.io/smart-contracts-specification/fractionalizer/fractionalizerfactory.sol.md).

# FractionalizerFactory.sol

Github Link: <https://github.com/Shell-Protocol/Shell-Protocol/blob/main/src/fractionalizer/FractionalizerFactory.sol>

## deploy()

<pre class="language-solidity" data-overflow="wrap"><code class="lang-solidity">/**
* @notice
* Deploys Fractionalizer with create2(https://eips.ethereum.org/EIPS/eip-1014)
* 
* @param oceanAddress Ocean contract address.
* @param nftCollection_ NFT collection address
* @param exchangeRate_ No of fungible tokens per each NFT.
* 
* @return fractionalizer fractionalizer contract address
*/
function deploy(
    address oceanAddress,
    address nftCollection_,
    uint256 exchangeRate_,
    bool isErc721
) external returns (
<strong>    address fractionalizer
</strong>)
</code></pre>

| Parameter Name  | Type    | Description                                                                           |
| --------------- | ------- | ------------------------------------------------------------------------------------- |
| oceanAddress    | address | address of the deployed Ocean smart contract                                          |
| nftCollection\_ | address | address of the NFT smart contract you want to create fractionalizer for               |
| exchangeRate\_  | unit256 | number of fungible tokens per each NFT (basically, how many tokens each NFT is worth) |
| isErc721        | bool    | if true NFT smart contract is ERC-721, if false NFT smart contract is ERC-1155        |

This function creates a new `Fractionalizer721` or `Fractionalizer1155` smart contract for a given collection.

It should...

1. Deploy new smart contract based on whether the forwarded NFT smart contract is ERC-721 or ERC-1155
