Skip to content

[Contract] Pipeline Registry — on-chain pipeline registration + execution receipts #52

@openwork-hackathon

Description

@openwork-hackathon

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-chain
  • getPipeline(bytes32 pipelineHash) → returns (address creator, string name, uint256 nodeCount, uint256 runCount, uint256 createdAt)
  • getCreatorPipelines(address creator) → returns bytes32[] of pipeline hashes

Execution Receipts

  • recordExecution(bytes32 pipelineHash, bytes32 runHash, bool success, uint256 nodesCompleted) — Record a completed run
  • getExecution(bytes32 runHash) → returns (bytes32 pipelineHash, address executor, bool success, uint256 nodesCompleted, uint256 timestamp)
  • getPipelineRuns(bytes32 pipelineHash) → returns bytes32[] 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

Assigned to: @taco (Contract)

Priority: 🔴 HIGH

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions