BeefChain is a comprehensive traceability platform for the meat industry that uses StarkNet to ensure transparency, security and efficiency throughout the supply chain. From producer to end consumer, every step is immutably recorded on the blockchain.
- Immutable History: Every transaction recorded on StarkNet
- Dynamic QR Codes: Unique codes per cut with real-time data
- Full Audit Trail: Complete journey from birth to sale
- Environmental impact reports
- Carbon footprint estimation
- Supply chain efficiency metrics
- Role-based permission system (Access Control)
- Multiple administration levels
- User-specific functions
- Producers - Register animals and manage batches
- Slaughterhouses - Process animals and generate QR cuts
- Veterinarians - Certify animal health and welfare
- IoT Operators - Record real-time sensor data
- Certifiers - Validate quality standards
- Exporters - Manage international shipments
- Auditors - Supervise regulatory compliance
- Consumers - Scan QR for traceability
- Address:
0x065f45868a08c394cb54d94a6e4eb08012435b5c9803bb41d22ecb9e603e535d - Class Hash:
0x0712b9eac6e7653cd2abe5e45a0da9197da4657fddfb7de8af2ba9532a3ee404 - Network: StarkNet Sepolia
0x02d0234b0a1d7015c8fa5f13c3a5d9aed7512ac02a9df2713c3cf1650b22cafe(Previous version)
- Deployer:
0x1baaeb194649d3ec0c78942f9b462bfaf602b9a4ec84275f3d8af78ea19df2e(Main funded account) - System Wallet:
0x3226a67cc925c443ae7f31971393cece97c0f4abb967e4c5a0dbbb936a08fd9(2% commissions) - Backup Wallet:
0x154b998302478a2377bd8122fb081273494db55407efcb7e3fd8c31d6108679(Emergencies)
- Current Contract: Voyager Explorer
- Deployer: Voyager Explorer
- Previous Contract: Voyager Explorer
create_animal_simple(raza)- Quick animal creationcreate_animal()- Complete registration with metadatacreate_animal_batch()- Batch managementupdate_animal_weight()- Weight updates
procesar_animal()- Individual processingprocesar_batch()- Batch processingcrear_corte()- Cut generation with QRcrear_cortes_para_batch()- Mass production
add_health_record()- Medical history recordingquarantine_animal()- Animal quarantineauthorize_veterinarian_for_animal()- Authorizations
record_iot_reading()- Real-time sensor dataget_latest_iot_reading()- Metric queries
certify_animal()- Individual certificationcertify_batch()- Batch certificationcertify_corte()- Cut certification
prepare_export_batch()- Shipment preparationconfirm_export()- Export confirmationupdate_export_temperature()- Cold chain control
get_public_consumer_data()- Traceability dataverify_qr_authenticity()- Authenticity verificationgenerate_qr_for_corte()- QR code generation
- Node.js 18+
- StarkNet wallet
- Git
- Clone the repository
bash
git clone https://github.com/your-username/beefchain.git
cd beefchain
- Install dependencies
bash
cd frontend
npm install --legacy-peer-deps
- Configure environment
bash
cp .env.example .env.local
- Update environment variables
env
# BeefChain Configuration - StarkNet Sepolia
NEXT_PUBLIC_CONTRACT_ADDRESS=0x065f45868a08c394cb54d94a6e4eb08012435b5c9803bb41d22ecb9e603e535d
NEXT_PUBLIC_CONTRACT_CLASS_HASH=0x0712b9eac6e7653cd2abe5e45a0da9197da4657fddfb7de8af2ba9532a3ee404
NEXT_PUBLIC_RPC_URL=https://starknet-sepolia.public.blastapi.io/rpc/v0_9
- Run the development server
bash
npm run dev
text
beefchain/frontend/
βββ π src/
β βββ π app/ # Next.js App Router Pages
β β βββ π admin/ # Admin dashboard
β β βββ π certification/ # Certification interface
β β βββ π consumidor/ # Consumer portal
β β βββ π exportador/ # Exporter management
β β βββ π frigorifico/ # Slaughterhouse operations
β β βββ π productor/ # Producer management
β β βββ π veterinario/ # Veterinarian portal
β βββ π components/ # React Components
β β βββ π admin/ # Admin components
β β βββ π common/ # Shared components
β β βββ π exportador/ # Exporter components
β β βββ π frigorifico/ # Slaughterhouse components
β β βββ π productor/ # Producer components
β β βββ π veterinario/ # Veterinarian components
β βββ π contracts/ # Smart Contract Integration
β βββ π hooks/ # Custom React Hooks
β βββ π providers/ # React Providers
β βββ π services/ # Business Logic Services
β βββ π types/ # TypeScript Definitions
β βββ π utils/ # Utility Functions
βββ π public/ # Static Assets
β βββ next.svg
β βββ vercel.svg
β βββ *.svg icons
βββ package.json # Dependencies
βββ next.config.ts # Next.js configuration
βββ tsconfig.json # TypeScript configuration
βββ eslint.config.mjs # ESLint configuration
- RPC URL:
https://starknet-sepolia.public.blastapi.io/rpc/v0_9 - Explorer:
https://sepolia.voyager.online - Network:
sepolia
- Private Key:
sk_dev_916327c90fe67a75d0809810639f6705533dac27573e36afa7147a6e8a352531 - Public Key:
pk_dev_d7e6505de47e23fd8633013288c34f36
- β StarkNet L2: Scalability with Ethereum security
- β Animal NFTs: Unique animal tokenization
- β Dynamic QR: Real-time traceability
- β Multiple Roles: Complete participant ecosystem
- π₯© Total Transparency: From farm to table
- π± Sustainability: Integrated environmental metrics
- π Food Safety: Immutable certifications
- π± Consumer Access: QR with complete history
- β‘ Cairo Contracts: Business logic in StarkNet
- π¨ Next.js Frontend: Modern responsive interface
- π Decentralized APIs: Direct blockchain integration
- π Real-time Dashboard: Complete system monitoring
- Producer registers animal with basic info
- Veterinarian adds health records and certifications
- IoT devices record environmental data
- Slaughterhouse processes animal and creates cuts
- Certifier validates quality standards
- Exporter prepares international shipment
- Consumer scans QR for complete history
The project includes comprehensive ABI for all contract functions including:
- Animal management and tracking
- Batch processing operations
- Certification and validation
- QR code generation and verification
- IoT data recording
- Sustainability reporting
This project is licensed under the MIT License - see the LICENSE file for details.
- StarkNet Foundation for L2 infrastructure
- Cairo language developers
- The blockchain community for inspiration
BeefChain - Revolutionizing meat traceability with cutting-edge blockchain technology. π
Transparency from Farm to Fork