Skip to content

Add smart contract specs#8

Merged
joelamouche merged 5 commits intomainfrom
add-smart-contract-specs
Sep 8, 2025
Merged

Add smart contract specs#8
joelamouche merged 5 commits intomainfrom
add-smart-contract-specs

Conversation

@joelamouche
Copy link
Contributor

Smart Contracts

  • Solidity - Smart contract programming language
  • Foundry - Fast, portable and modular toolkit for Ethereum application development

The the-guild-smart-contracts/ directory contains our Solidity smart contracts built with Foundry.

TheGuildBadgeRegistry

A community-driven badge registry where anyone can create badges with unique names and descriptions.

Key Features:

  • Community-driven: Anyone can create badges
  • Unique names: No duplicate badge names allowed
  • Immutable: No owner or upgrade mechanism
  • Gas-efficient: Simple storage patterns
  • Event-driven: Emits events for badge creation

Contract Interface:

// Create a new badge
function createBadge(bytes32 name, bytes32 description) external

// Get badge information
function getBadge(bytes32 name) external view returns (bytes32, bytes32, address)

// Check if badge exists
function exists(bytes32 name) external view returns (bool)

// Get total number of badges
function totalBadges() external view returns (uint256)

// Enumerate badges
function badgeNameAt(uint256 index) external view returns (bytes32)

Events:

event BadgeCreated(bytes32 indexed name, bytes32 description, address indexed creator)

Copy link
Collaborator

@oscarwroche oscarwroche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@joelamouche joelamouche merged commit ca4f84d into main Sep 8, 2025
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments