This page is ported from FVM Hackathon Cheat Sheet (retired, use for reference only).
Hi there builders! Not sure where to begin? Too many docs to navigate?
Here’s a cheat sheet to get you from zero to hero. This cheat sheet provides a guide to the following, in order:
💡 Filecoin & FVM concepts
📍 Navigate what you need to use for your hackathon project
🚀 Resources to get you building
- Filecoin 101 You know nothing BUT that's okay, this will help!
- FVM 101 & Docs What is FVM? What does it do?
- The EVM-compatible FVM How is Filecoin able to run EVM features?
- Filecoin address types To learn 4 different Filecoin address types, especially EVM-compatible type f410
- ERC20 quickstart with Remix Tutorial FROM SCRATCH: Deploy your first FEVM actor (smart contract equivalent).
- Data + FVM See how we are thinking about new concepts on Programmable Storage Markets, including dataDAOs and decentralized data aggregators
- Request for Startups L2 solution ideas built on top of FVM & FVM tooling ideas. These are some ideas that Filecoin finds valuable to the ecosystem, but is not a finite list.
- FEVM Hardhat Kit A starter hardhat project for developing, deploying, and testing Solidity actors on the FEVM.
- FEVM Foundry Kit A starter foundry project for developing, deploying, and testing Solidity smart contracts on the FEVM.
- FVM Deal Making starter kit use the client contract here to make a deal proposal directly with the Storage Provider for data >4GB.
- DataDao starter kit quickly spin up a DataDAO using client contract & OpenZepplin's Dao contracts.
- RaaS starter kit fork this repo to build your own storage deal replication/renewal/repair services
- Transfer FIL between different address types learn how to send FIL to ETH compatible address.
- Convert different Filecoin addresses convert from f410 to 0x, or ID address to 0x or see the docs.
- Send FIL to my Filecoin ID address using MetaMask
- Verify your smart contracts
Filecoin? FVM? IPFS? What should I use to store data for my projects.?
We got you. Follow the decision-making guide below, to see which resource is recommended for your use case:
Recommended resources from the guide above:
- Open data sets Access existing datasets on Filecoin for sampling in your project
- Lighthouse.storage SDK easy frontend data upload, access control, replication/renewal/repair of storage deals through an SDK
- Direct dealmaking starter kit (Direct deal making with Storage Providers with): Use the Client Contract here to make a deal proposal, directly with the Storage Provider (SPs are actively picking up deals on calibration testnet but on mainnet, various factors affect their decision to pick up a deal including type of data, data size, SP's data capabilities)
- RaaS starter kit
- Storage Onramps: easy API integration for non-programmatic storage in your dApp.
- DataDAO Starter Kit: uses Client Contract for storage and Open Zepplin's Governor contract to quickly spin up a dataDAO. Keep building from there!
- Hackathon FVM Starter Ideas: detailed description for solutions and tools to build with and/or to support programmatic storage.
-
Programmatic storage
- Filecoin.solidity: Solidity library for FEVM development to call methods on system/built-in actors on Filecoin.
- To learn how to use Filecoin.sol check out the FEVM Hardhat Starter Kit's Filecoin API contract examples here.
- proof of small data storage (PoDSI)
- Client contract Boost logs dashboard (for calibration testnet only) guide on how to view submitted deal proposals through client contract
- Storage provider reputation database (for mainnet SPs only) piloting a SP reputation dataDAO to pick the most suitable SP for your deal proposal
- Filecoin.solidity: Solidity library for FEVM development to call methods on system/built-in actors on Filecoin.
-
Calibration testnet the one and only testnet to build with during hackathons!
- Testnet docs (no, you don't need datacap during hackathons as SPs are ready to pick up deals without it. On mainnet, it significantly increases the likelihood of your deal getting picked up if you have datacap)
- Distributed Storage Solutions (DSS) storage provider on testnet actively picking up deals. Miner ID: t033435
- Piknik storage provider on testnet actively picking up deals. Has Boost logs to view client contract emitted deal proposals (guide here). Miner ID: t017840
-
Blockchain Explorer support FVM
-
Network analytics APIs
- Starboard FVM contract analytics on Filecoin
- Zondax Beryx API: Open API for indexing Filecoin. There is a Beryx client for JS
- Spacescope API: Protocol-generated APIs for indexing Filecoin
- Storage Provider FilRep reputation system API: query storage provider reputations. FilRep is not FEVM-compatible yet but is a useful resource to reference for reputation systems
-
Decentralized compute
- Lilypad (Bacalhau) distributed compute network which leverages Bacalhau & FVM
- Shale Protocol Shale-Serve API is a production-ready inference API for open-source LLMs (large language models). It currently supports Llama 2 13B by default. It can be used as a drop-in replacement for the OpenAI API (specifically GPT3.5-turbo) in any language, including Python, cURL, and HTTP requests.
-
Access control
- Lighthouse Kavach access control SDK: Access control encryption SDK to build trustless applications using distributed key shards with threshold cryptography
- Lit Protocol with FVM distributed cryptographic key-pairs for condition-based encryption and programmatic signing, see how to use with FVM (hint: dataDAOs!)
-
DeFi
- Axelar & Squid Router for cross-chain liquidity and cross-chain general message passing with FVM
- Celer cross-chain token bridging & cross-chain inter-chain messaging
- wFIL - wrapped FIL for DeFi scenarios like bridging assets, AMM, token swap, etc.
- Magmo Nitro State Channels for payment: ultra-low cost, near-zero-latency conditional transfer of cryptoassets via a "layer 2" network that sits above the blockchain
- BANYAN interface for SushiSwap: DEX template, need to configure to point to hyperspace instead of wallaby
-
Oracles
- Tellor oracle: list of testnet contract addresses
-
FVM smart contract templates
- Cookbook.dev contracts from other successful builder projects
-
Naming Service
-
Gaming
- LYNC Integrate FVM into any game and enable features such as dynamic NFTs and more
How can I use FVM to store data to Filecoin? / How can I store data with FVM?
The intent of FEVM/FVM is to compute over state data (the metadata of your stored data). Storage Providers are the ones that are able to store your data and upload the deal to the Filecoin network. You can check out the deal flow here, where various steps can benefit from integrating FEVM! Data retrieval happens via Retrieval Providers, accepting the client's ask to retrieve and working with Storage Providers to decrypt the data to deliver to the client. FEVM/FVM is able to build logic around these 2 processes and automate, add verification and proofs, time-lock retrievals etc.
-
Awesome! But what specifically can I do today to automate filecoin storage deals on FVM?
As of today, we allow you to create deal bounties to incentivize the storage of data through FEVM. Read more here (this repo is specifically tracks the creation of deal bounties to build a DataDAO; the same pattern applies for any other dapps that need to incentivize the creation of data deals). This means that you need to incentivize the storage of the deal off-chain, and then a user of your dapp can claim the rewards on-chain. We recommend this approach for the hackathon. In the future, we aim to allow you to do this in a few different ways, which will make an exciting landscape to incentivize the storage of deals.
When a storage deal is made, is the data only stored by a single storage provider? What would happen if the storage provider (for some reason) removed all the data, would it be recoverable or is it lost completely?
When a SP stores your data and the deal is active, over time, the SP has to provide Proof of Replication (porep) of the stored data. They also have to provide Proofs of Spacetime (PoST), where randomly selected SPs have to provide PoReps for randomly selected storage sectors they maintain. So your data is replicated and not easily lost. and SPs get slashed if they are unable to provide the proofs so they are not incentivized to delete your data. However, let's say a miner does delete your data for some reason, then to prevent against that, the individual client can choose to store with various SPs. Or you can upload your data via storage helpers like web3storage and estuary, who do the replication across various SPs for you. more reading https://filecoin.io/blog/posts/filecoin-features-verifiable-storage/ https://docs.filecoin.io/developers/storage-helpers/overview/
How do I close a storage deal on Filecoin and stop Storage Providers from storing my data on-chain?
How can I manipulate storage deals? It’s not impossible but SPs are incentivized not to close the storage deal as they are slashed for not providing Proof of Spacetime (PoST). Someone has to pay for the broken promise a miner makes to the chain and you need a custom market actor for it most likely to make the deal. You need to make deals for a certain amount of time - right now the boundaries are 6-18 months. You cannot ask a storage provider to take down your data without contacting them off-chain.
What’s the benefit of deploying EVM to FVM/Filecoin instead of Ethereum network? Or write a dApp that way?
What are the unique features of Filecoin as compared to Ethereum? Need narrative/article on why Eth devs should care about FVM, covering gas expectations, performance, dApp benefits. Our current answer is around using FVM for storage-heavy parts of the dApp (at exabibyte level) which might not be priority for most devs.
Do I have to install Lotus to work with FVM? How do I install it? How do I install it on Hyperspace?
Here is a public lotus node you can use https://api.hyperspace.node.glif.io/rpc/v0
How do I check SP’s balance with their FEVM address?
You can query balance of any address https://docs.zondax.ch/openapi#get-/account/balance/-address-
Who is the beneficiary role, in the deal flow process?
The beneficiary role takes on the financial control from the Storage Provider, who then focuses on node control. The node owner, who is the SP, has overarching control over both roles. See more here.
How do I control access or encrypt data before storing on Filecoin?
You can check out lighthouse.storage. They are an FVM Early Builder who has built an access control SDK https://github.com/lighthouse-web3/encryption-sdk
For the frontend, what's a recommended framework(s) to use?
Most frontend that works for EVM works for FEVM too including Flutter, Dart, Ethers.js, web.js, ReactJs. These can also query events on the frontend.
How is the Filecoin network accessed through Solidity?
We have a feature-complete Ethereum JSON-RPC API that enables EVM tooling to deploy seamlessly to Filecoin. This is a good talk to learn more about the various architectural considerations and features https://youtu.be/TD-LsOpFeMU?t=6665
Could someone tell me the characteristics of fvm robust addresses and f4 addresses?
https://docs.filecoin.io/developers/smart-contracts/concepts/accounts-and-assets/
Can someone explain what the t0 and t1 addresses are?
- 0 - ID Address
- 1 - SECP256K1 Public Key Address
- 2 - Actor Address
- 3 - BLS Public Key Address
- 4 - F4 translated address from foreign runtime to Filecoin
Where can I see other projects built on FEVM?
- Filecoin Ecosystem Dashboard (with FVM filter) - these showcase our early builders and is still being updated through next week
- ETHGlobal HackFEVM Finalists - we ran a FEVM-focused smaller hackathon in Nov 2022, before the latest release of FEVM.