This repo contains the smart contract for the Frak.id plateform.
It uses hardhat for deployment and upgrades, and foundry for unit test.
Our vision is to give Creators the rightful place they deserve in society. The value has to be shared equally between those who create, those who fund and those who consume content. By empowering all these people to govern and to be rewarded for the value they create, whether that be through work, investment or engagement, the Frak ecosystem believes that Web3 is the ideal way to make that happens.
To install and build with Hardhat :
# Install
git clone https://github.com/frak-id/frak-id-blockchain.git
cd frak-id-blockchain/
pnpm i
# Build
pnpm run build
# Test
pnpm run test
forge test
To install with Foundry:
# Install
git clone https://github.com/frak-id/frak-id-blockchain.git
cd frak-id-blockchain/
# Build
forge build
minter
├─ Minter — "Mint new content, mint fraktions of content and increase fraktions supply"
├─ badges
│ ├─ FractionCostBadges — "Small contract that store the cost badges of each fraktions"
reward
├─ Rewarder — "Reward the user content consumption, from contentIds and CCU's"
├─ badges
│ ├─ ContentBadges — "Small contract storing the badges for each content's"
│ ├─ ListenerBadges — "Small contract storing the badges for each listener's"
├─ pool
│ ├─ ContentPool — "Pool that split reward gain for each content between each investor's"
│ ├─ ReferralPool — "Pool that split reward gain by each listener to each one of his referrer"
tokens
├─ FraktionTransferCallback — "Callback interface for the transfer of content fraktions"
├─ FraktionTokens — "ERC1155 storing all of our fraktions"
├─ FrakTokenL1 — "FrkToken on the ETH chain (for bridge purpose only)"
├─ FrakTokenL2 — "FrkToken on the Polygon chain"
wallets
├─ MultiVestingWallets — "Contract that handle the vestings of multiple user's"
├─ VestingWalletFactory — "Helping us with the creation of vestings following some defined criteria (initial drop, cliff etc)"
utils
├─ FrakRoles — "All the roles we use in our contracts"
├─ FrakMath — "Some math utils, to create fraktionId, or extract contentId from fraktionId."
├─ FrakAccessControlUpgradeable — "Base access control contract used by every contract"
├─ MintingAccessControlUpgradeable — "Reviewed access control contract, with more options for the minting part (so for token's and minter)"
├─ PushPullReward — "Abtract contract that implement basic Push/Pull reward (we store reward amount, then the user withdraw it), helping us gain some gas"
Contract name | Status | Audited | Deployment |
---|---|---|---|
FrakToken | Finalized | 1 | Proxy |
FraktionTokens | Finalized | 2 | Proxy |
VestingWalletFactory | Finalized | 2 | Proxy |
MultiVestingWallets | Finalized | 2 | Proxy |
Minter | Finalized | 2 | Proxy |
Rewarder | Finalized | 2 | Proxy |
ContentPool | Finalized | 2 | Proxy |
ReferralPool | Finalized | 2 | Proxy |