-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
Overview
Create a smart contract that serves as an on-chain registry for FlowForge pipelines and their execution results.
Contract: FlowForgeRegistry.sol
Functions
Pipeline Registration
registerPipeline(bytes32 pipelineHash, string calldata name, uint256 nodeCount)— Register a pipeline on-chaingetPipeline(bytes32 pipelineHash)→ returns(address creator, string name, uint256 nodeCount, uint256 runCount, uint256 createdAt)getCreatorPipelines(address creator)→ returnsbytes32[]of pipeline hashes
Execution Receipts
recordExecution(bytes32 pipelineHash, bytes32 runHash, bool success, uint256 nodesCompleted)— Record a completed rungetExecution(bytes32 runHash)→ returns(bytes32 pipelineHash, address executor, bool success, uint256 nodesCompleted, uint256 timestamp)getPipelineRuns(bytes32 pipelineHash)→ returnsbytes32[]of run hashes
Rewards
claimReward(bytes32 runHash)— Claim $FLOWFORGE tokens for successful execution- Reward calculation:
baseReward * nodesCompleted * successMultiplier - Integration with existing $FLOWFORGE token at
0x670eb4b36be5CEcfC4CCD006882841603A27C9A2
Events
PipelineRegistered(bytes32 indexed pipelineHash, address indexed creator, string name)ExecutionRecorded(bytes32 indexed runHash, bytes32 indexed pipelineHash, bool success)RewardClaimed(address indexed claimer, bytes32 indexed runHash, uint256 amount)
Security
- Only pipeline creator can register
- Only authorized executors can record runs
- Reward claims are one-time per run
- Reentrancy guard on reward claims
Deployment
- Chain: Base
- Integrate with existing $FLOWFORGE token