IMPORTANT: _This repo is a work in progress, and contracts have not been audited and only accessible on Ethereum/Base Sepolia until completed audit and mainnet deployment. Use with your own risk
- Fundi Overview
- The example in this repo
- Getting Started
- Chainlink
- Openzeppellin
- What does this unlock?
- Disclaimer
Fundi is an open verifiable network of digital keys that tokenize validators and protocols to mint smart contracts and assets. These customizable contract keys adhere to a new NFT standard designed to facilitate seamless ownership transfer, making them verifiable by Fundi users and incentivized for security.
This repository utilizes the Fundi Factory Protocol, a protocol that tokenizes smart contract factories and can be monetized with any ERC20 cryptocurrency for minting contracts and assets. 100% of the proceeds are claimable by the owner.
The keys that tokenizes factories and assets are represented by NFTs.
This Factory image represents a factory key for a Custom (white) Unverified (silver) Factory
This Asset image represents a asset key for an asset that was minted by a Custom (white) Unverified (silver) Factory
Check out Fundi Tokenized Factories at Opensea on Base Sepolia
Interact with protocol functions at : Etherscan
In this repo, we will go over how to tokenize a smart contract factory.
- Example Fundi Asset, smart contract that factory should mint and tokenize:
ExampleFundiAsset.sol
- Example Fundi Factory, factory that mints and tokenizes asset using Fundi
ExampleFundiFactory.sol
The idea here, is that once you see the power of this example, you should be able to tokenize anything.
- This is the smart contract that is tokenized. It could be anything or use case that you can think of 😉
- This contract inherits the
FundiAsset.sol
implementation which allows it to be tokenized by aFundiFactory.sol
on the Fundi Factory Protocol
For ExampleFundiAsset.sol
we are tokenizing a contract that can accept native and ERC-20 cryptocurrencies and only the owner of the protocol minted key can ownerWithdraw
- This is the smart contract that is tokenized and also tokenizes a
FundiAsset.sol
. 😉 - This contract inherits the
FundiFactory.sol
implementation which allows it to tokenizeFundiAsset.sol
and be tokenized on the Fundi Factory Protocol
For ExampleFundiFactory.sol
we are tokenizing a contract factory that mints ExampleFundiAsset.sol
contracts on Fundi. The owner of this factory key can collect mint fees through Fundi Factory Protocol withdrawFundiProceeds
and withdrawFundiProceeds
functions.
- git
- You'll know you did it right if you can run
git --version
and you see a response likegit version x.x.x
- You'll know you did it right if you can run
- foundry
- You'll know you did it right if you can run
forge --version
and you see a response likeforge 0.2.0 (816e00b 2023-03-16T00:05:26.396218Z)
- You'll know you did it right if you can run
- node
- You'll know you did it right if you can run
node --version
and you see a response likev16.13.0
- You'll know you did it right if you can run
- npm
- You'll know you did it right if you can run
npm --version
and you see a response like8.1.0
- You'll know you did it right if you can run
- fundi faucet
- Use this test faucet to get FUNDI for minting fee(1 FUNDI per factory mint/.5 FUNDI per asset mint) you will know if you have a balance for ERC-20 address:
0x7891Cd6E291A79302bF47958806a9801D22feeB5
. - You can request FUNDI tokens once every 24 hours for 5 FUNDI by connecting wallet and calling the
requestTokens
function below.
- Use this test faucet to get FUNDI for minting fee(1 FUNDI per factory mint/.5 FUNDI per asset mint) you will know if you have a balance for ERC-20 address:
- Clone the repo, navigate to the directory, and begin building your smart contract factory with the same implementations as
src/Factories/ExampleFundiFactory.sol
andsrc/Assets/ExampleFundiAsset.sol
git clone https://github.com/fundiprotocol/FundiFactoryFoundryKit
cd FundiFactoryFoundryKit
- Using
ExampleFundiAsset.sol
as a template create your own custom smart contract using Chainlink and Openzeppelin inlib
- Use function modifier
onlyOwner
to only give access to token holder - Using
ExampleFundiFactory.sol
as a template - There are 7 types of
FundiAsset.sol
you can specify: PAYROLL(blue), TRUST(red), ESCROW(yellow), CROWDFUND(green), PERSONAL_ACCOUNT(purple), CONTRACT(red), and CUSTOM(white)
- Build test for your factory and the asset that it mints to ensure that your contracts work as expected
- You can upload audits to your contracts using
addContractAudit(string memory auditReport)
if you want to be verified by Fundi Governance
- Write deployment script using
script/DeployFundiFactory.s.sol
as an example. - This script deploys the Factory and then mints a key that tokenizes the factory on Fundi Factory Protocol.
- Update your Factory type, contractURI, and required fee in
fundiProtocol.mintFactoryKey( address(exampleFactory), <-address of deployed factory IFundiProtocol.AssetType.CUSTOM, <-custom factory "FactoryContractURI", <-factory contract info address(fundiToken), <-fundi token 0 <-no fee )
- Make sure your wallet has at least 1 FUNDI for factory mint and .5 for asset mint
- Test deployment using
forge script scripts/DeployFundiFactory.s.sol --rpc-url YOUR_RPC_URL
- View your Factory on NFT Marketplaces at the Fundi Factory Protocol address
This repository includes Chainlink contracts, which expand the capabilities of smart contracts by enabling access to real-world data and off-chain computation while maintaining the security and reliability guarantees inherent to blockchain technology
Products
- CCIP - enables cross-chain functionality to contracts
- Functions - enables off chain api calls through Chainlink nodes
- Automation - automate functions based on set conditions
- Price feeds - get price feeds from Chainlink oracles for defi
- VRF - verifiable randomness
Go to Chainlink Dev Hub to learn more
This repo has Openzeppelin, a library for secure smart contract development. Build on a solid foundation of community-vetted code.
Implementations of standards like ERC20 and ERC721. Flexible role-based permissioning scheme. Reusable Solidity components to build custom contracts and complex decentralized systems.
Go to Openzeppelin to learn more
Being able to verify and tokenize ownership of contract factories, funds, protocols, business processes, or any smart contract! 🤯
The repository has not been audited, use at your own risk.