Skip to content

FilOzone/filecoin-services

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Filecoin Services

Building Filecoin onchain programmable services that integrate with the Filecoin network for decentralized storage.

⚠️ IMPORTANT DISCLAIMER

🚨 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.

Overview

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

🚀 Quick Start

Prerequisites

  • Foundry - Ethereum development toolchain
  • Git with submodule support

Installation

  1. Clone the repository:
git clone https://github.com/your-org/filecoin-services.git
cd filecoin-services/service_contracts
  1. Install dependencies and initialize submodules:
make install
  1. Build the contracts:
make build
  1. Run tests:
make test

📋 Project Structure

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

🌐 Deployed Contracts

Calibnet (Testnet)

Mainnet

🚧 Coming Soon - Mainnet deployment is in progress

Version History

Check the latest tags to find specific commit hashes and corresponding contract addresses for each deployment.

🔧 Development

Running Tests

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

Code Quality

# Format code
make fmt

# Check code formatting
make fmt-check

# Generate test coverage
make coverage

# Clean build artifacts
make clean

Available Make Targets

Run make help to see all available targets:

make help

Deployment

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

🔗 Dependencies

This project builds on several key components:

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Ensure all tests pass
  6. Submit a pull request

📄 License

Dual-licensed under MIT + Apache 2.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 14