Base Onchain Summer project. (Discovery track)
DevNet is a website for developers to create personal profiles, like Linkedin / Github, but in DevNet, you can also create "learning plans", and "mint NFTs" upon completing plan, the minting price of SBT is set by plan creator.
People can create a learning plan, setting appropriate learning paths according to different goals like a roadmap, to provide guidance for newcomers who are not yet familiar with the technology.
Creators can also use these features to build their own business models. For example, create plans as part of a comprehensive course, and allow NFT holders to access to subsequent course content. In this case, NFTs can serve as a source of revenue for the course.
User can login with their social account, like Github, Google, Twitter, etc.
User can create learning plan, and set the price of SBT, and the number of SBT.
User can start the plan, and the plan will be shown in the user's profile.
User can mint NFT when finishing the plan, the price of NFT is set by plan creator. And the NFT will shown in the user's profile.
User can explore recently created / minted / completed plans.
Note: not finished yet, only display plan contract address by fetched event log
Core contract to implement main plan functions.
createPlan()
Create newPlan
contract and record plan address owned by useractive()
Active(start) specific plan contract
ERC721 Contract record the information of each plan
The information include totalSupply / period / mintPrice
active()
recorder starter and timestampmint()
mint NFT to starter and pay mintPrice etherwithdraw()
withdraw ether from plan creator
In fleek-fn/getEvents.ts
Use Fleek Functions to read event(minted / created) from on-chain contracts.
- create .env file by .env.example
pnpm install
pnpm dev
If you want to know more details on deploy Fleek Function, please check this guide
- esbuild bundle
getEvents.ts
with package toout/out.js
pnpm bundle
- create function
fleek functions create --name <YOUR_FUNCTION_NAME>
- deploy function (--path must be out.js file path)
fleek functions deploy \
--name <YOUR_FUNCTION_NAME> \
--path <out.js file path>
- check function deployment
fleek function deployments --name <YOUR_FUNCTION_NAME>