Building Filecoin onchain programmable services that integrate with the Filecoin network for decentralized storage.
🚨 THE WARM STORAGE CONTRACT IS CURRENTLY UNDER ACTIVE DEVELOPMENT AND IS NOT READY FOR PRODUCTION USE 🚨
DO NOT USE IN PRODUCTION ENVIRONMENTS
This software is provided for development, testing, and research purposes only. The smart contracts have not undergone comprehensive security audits and may contain bugs, vulnerabilities, or other issues that could result in loss of funds or data.
Use at your own risk. The developers and contributors are not responsible for any losses or damages.
This repository contains smart contracts and services for the Filecoin ecosystem, featuring:
- FilecoinWarmStorageService: A comprehensive service contract that combines PDP (Proof of Data Possession) verification with integrated payment rails for data set management
- Payment Integration: Built on top of the Filecoin Services Payments framework
- Data Verification: Uses PDP verifiers for cryptographic proof of data possession
- Foundry - Ethereum development toolchain
- Git with submodule support
- Clone the repository:
git clone https://github.com/your-org/filecoin-services.git
cd filecoin-services/service_contracts
- Install dependencies and initialize submodules:
make install
- Build the contracts:
make build
- Run tests:
make test
service_contracts/
├── src/ # Smart contract source files
│ └── FilecoinWarmStorageService.sol # Main service contract with PDP and payment integration
├── test/ # Test files
│ └── FilecoinWarmStorageService.t.sol # Contract tests
├── tools/ # Deployment and utility scripts
├── lib/ # Dependencies (git submodules)
│ ├── forge-std/ # Foundry standard library
│ ├── openzeppelin-contracts/
│ ├── fws-payments/ # Filecoin Services payments
│ └── pdp/ # PDP verifier contracts
└── out/ # Compiled artifacts
- Warm Storage Service:
0xf49ba5eaCdFD5EE3744efEdf413791935FE4D4c5
- Warm Storage service implements
UUPSUpgradeable
&EIP712Upgradeable
and this is the proxy contract address - it is relatively stable at this point.
- Warm Storage service implements
- Latest Implementation:
0xA970e9517425FA4C09d9ECAf7d24a5677170392a
🚧 Coming Soon - Mainnet deployment is in progress
Check the latest tags to find specific commit hashes and corresponding contract addresses for each deployment.
cd ./service_contracts/
# Run all tests
make test
# Run tests with specific verbosity (using forge directly)
forge test -vvv --via-ir
# Run specific test file (using forge directly)
forge test --match-path test/FilecoinWarmStorageService.t.sol --via-ir
# Format code
make fmt
# Check code formatting
make fmt-check
# Generate test coverage
make coverage
# Clean build artifacts
make clean
Run make help
to see all available targets:
make help
Use the provided deployment scripts in the tools/
directory:
# Deploy to Calibnet
./tools/deploy-warm-storage-calibnet.sh
# Deploy all contracts
./tools/deploy-all-warm-storage-calibnet.sh
# Upgrade existing deployment
./tools/upgrade-warm-storage-calibnet.sh
This project builds on several key components:
- PDP Contracts: FilOzone/pdp - Proof of Data Possession verification
- Payment Rails: FilOzone/filecoin-services-payments - Payment infrastructure
- OpenZeppelin: Industry-standard smart contract libraries for security and upgradeability
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
Dual-licensed under MIT + Apache 2.0