This repository contains the smart contracts for the Lumino Network, a decentralized computing platform.
The Lumino Network contracts manage the following aspects of the platform:
- Node registration and management
- Job submission and execution
- Staking and escrow mechanisms
- Epoch management
- Leader election
- Incentive distribution
- Access control
- Foundry (forge, anvil, cast)
- Solidity ^0.8.19
/src: Main contract implementations/abstracts: Abstract contract implementations/interfaces: Contract interfaces/libraries: Shared libraries
/test: Contract tests- Unit tests for individual contracts
- End-to-end tests for system flows
/script: Deployment scripts
- Clone the repository
- Install dependencies:
forge install - Build the contracts:
forge build
Run all tests:
forge test
Run specific tests:
forge test --match-path test/EpochManager.t.sol -vvv
- Start a local Ethereum node:
anvil
- Create environment file:
cp example.env .env
-
Update
.envwith appropriate values for local development -
Export the environment variables:
export $(grep -v '^#' .env | xargs)
- Run the deployment script:
./deploy.sh
-
Configure
.envwith network-specific values:- RPC URL
- Deployer private key
-
Export the environment variables:
export $(grep -v '^#' .env | xargs)
- Run the deployment script:
./deploy.sh
The deployment will create an addresses.json file containing all deployed contract addresses.
Use the lumino-contracts-client python library to interact with the deployed contracts.