

Caleb Mokua
607 posts

@mokuakaleb
john3:16-21 | Dare to Imagine & Disrupt!











Rare24 Miniapp Public build Day 13: Project Completion & Full Demo After 13 days of building in public (not continuous), Rare24 miniapp is complete and ready to launch on @baseapp & @farcaster_xyz and will be live after publishing. @buildonbase @_openeconomy Watch the demo to see how it works 👇


Excited to speak at the AAVE Africa Community meetup tonight! 👻 I'll be sharing insights on: How to Build on AAVE: Architecture, Tools & Real World Use Cases Join us as we explore AAVE development and real-world applications! @aave



Rare24 Miniapp Public build Day 6 : Tests Complete, Architecture update & UI Design 🎨 Three milestones today: ✅ All contract unit tests passing (69/69) ✅ Updated system architecture with Neynar API ✅ First UI sketches done From smart contracts to user experience 🧵👇 @buildonbase

Rare24 Miniapp Public build Day 5: Full System Architecture + Main.sol Tests ✅ Two major milestones today: 1. Mapped the complete MiniApp architecture 2. 25/25 tests passing on Main.sol (98%+ coverage) Breaking it down 🧵👇

Rare24 Miniapp Public build Day 4: Core Functions Implementation Across the 3 Modules ✅ All 3 contract modules are now live with full functionality. Breaking down what each module does 🧵👇

Rare24 Miniapp Public build Day 3: Contract Architecture Rare24 isn't just a minting contract anymore. We have decided to add full marketplace functionality for: 🔄 P2P trading between collectors 💰 Buy offers on secondary market 🤝 Counter offers & negotiations 💸 Refund mechanisms We will build 3 modular contracts + shared libraries for clean, auditable code. Here's the system design: Entry Point: Rare24.sol - Imports ERC1155 & ReentrancyGuard - Executes core logic across modules Module 1: Main.sol - createPhoto(), mintPhoto(), batchMintPhotos() - The minting engine creators & followers use Module 2: TradeNft.sol - P2P trading between collectors - proposeTrade() → accept/reject/cancel → counterOffer() Module 3: ResellNft.sol - Secondary market mechanics - createBuyOffer() → accept/reject/cancel → refund logic Shared Libraries: StructLibrary - Type definitions ErrorsLibrary - Gas-efficient errors EventsLibrary - Event standards As stated earlier, modularity allows for easier audits, cleaner upgrades and better testing. Tomorrow we will execute the logics and write test functions. @buildonbase

Rare24 Miniapp Public build Day 2: Core Function Continued Implementation and Contract Modularity Tech decision: Modularity Instead of one long contract, the contract was broken down into modules for easy debugging, readability and for scalability. All Structs, Events and Custom Errors are independent libraries each. Challenges: Deciding on whether to use loops or not and if so how to optimize on gas. In our case, since we have multiple creators for a moment and revenue will have to be distributed equally to each, a loop was a must have. Gas Optimization: - Both the MAX numbers of batch mints and collaborators have been capped at 5 to save on gas. - The use of Custom Errors. - The use IF statements instead of REQUIRE to check for REVERTS. @buildonbase

Day 1: Setting Up the NFT Engine Smart Contract Archticture ✅ Tech decision: ERC-1155 vs ERC-721 Went with ERC-1155. Why? Each token ID is a configurable NFT with its own metadata, supply, and pricing. One contract managing all creator moments. Built the NFT engine using OpenZeppelin's audited libraries (ERC-1155). Core functions Implemented: createPhoto() - Creator entry point - Upload metadata URI - Set price & max supply - Tag collaborators mintPhoto() - Follower entry point - Instant creator payment on mint - Followers own the moment batchMintPhotos() - Mint multiple moments in one tx - Gas optimization for collectors ERC-1155 Standard Information source: eips.ethereum.org/EIPS/eip-1155