FractionalizerFactory.sol

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

deploy()

/**
* @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 (
    address fractionalizer
)
Parameter NameTypeDescription

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

Last updated