LogoLogo
WebsiteAppWiki
  • 🤙Start here
    • Overview
    • Shell Protocol Basics
    • Quickstart: Deploy a liquidity pool
    • Tutorial: Executing swap with Shell Protocol
    • Reference Library
      • Contract addresses
  • 🤿Deep dive
    • Important concepts
      • Separating accounting logic & business logic
      • Ocean Primitives
    • The Ocean
    • Primitives
      • Adapters
      • Proteus AMM Engine
      • NFT Fractionalizer
  • 📜Smart Contracts Specification
    • Ocean
      • Ocean.sol
      • IOceanPrimitive.sol
      • IOceanToken.sol
      • OceanAdapter.sol
    • Proteus
      • Proteus.sol
      • EvolvingProteus.sol
      • LiquidityPoolProxy.sol
    • Fractionalizer
      • FractionalizerFactory.sol
  • 🧠Tutorials
    • Build an AMM with Proteus
    • Build an NFT Fractionalizer
    • Build an NFT AMM
Powered by GitBook
On this page
  1. Smart Contracts Specification
  2. Fractionalizer

FractionalizerFactory.sol

PreviousFractionalizerNextBuild an AMM with Proteus

Last updated 1 year ago

Github Link:

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 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

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