The Fractional NFT Application will lock an NFT into a fractional-NFT(f-NFT) contract and allow users to purchase the newly minted fractionalized tokens. These tokens can then be bought and sold on an AMM or if a buyback is initiated, return them to the distribution contract. If all tokens are returned, the admin may unlock the NFT from the f-NFT contract and regain full ownership.
More information can be found in the specification.
The project consists of two smart contracts.
fractional-NFT
├── project
│ ├── contracts
│ │ ├── fractional-NFT-contract
│ │ │ ├── src/main.sw
│ │ │ └── tests/harness.rs
│ │ └── token-distributor-contract
│ │ ├── src/main.sw
│ │ └── tests/harness.rs
│ ├── README.md
│ └── SPECIFICATION.md
├── ui
│ ├── README.md
│ └── SPECIFICATION.md
└── README.md
TODO: The user interface does not currently exist therefore its README.md and SPECIFICATION.md are empty.
In order to run the subsequent commands change into the following directory /path/to/fractional-NFT/project/<here>
.
forc build --locked
Before running the tests the programs must be compiled with the command above.
cargo test --locked