Capsule Docs
  • Introduction
  • Protocol Overview
    • Packaging and Shipping
      • Capsule Redemption Page
      • Capsule Relay
      • Example Integration
    • Use Cases
      • Compromised Address
      • Gasless Pickup
      • Gate Shipments
      • Time Locking Shipments
      • Walletless Pickup
      • Whitelisted Shipment
      • Wrong Address
    • Future
      • Capsule Invoice
      • Capsule Network
      • Lightning Bridging
    • Developer Walkthroughs
      • PostOffice.sol
      • Code Examples
        • Conditional Redemption
        • Conditional Shipment
        • Shipment POAPs
        • Whitelisted Redemption
  • Collaboration
    • Advertising
    • Partnership
  • Economics
    • Fee Structure
  • CapsuleNFT
    • Overview
      • Types of Capsule NFTs
      • Capsule Collections
        • Metamaster
        • Lockability
        • Private/Public
        • Collection Examples
        • Official Capsule Collections
    • Developer Walkthroughs
      • Developer Overview
      • Contracts
        • Capsule.sol
        • CapsuleFactory.sol
        • CapsuleMinter.sol
        • Testnets
          • Ethereum - Goerli
      • Developer - Mint a Capsule NFT
      • Developer - Redeem a Capsule NFT
      • Developer - Create a Capsule Collection
      • Developer - Managing a Capsule Collection
    • Use Cases
      • For Artists
      • For DeFi
      • For Gaming
    • Examples
      • Dollar Store Kids
    • Comparison to ERC-998
  • Additional Resources
    • FAQ
    • Official Links
    • Brand Kit
    • Legal
      • Terms of Use
      • Privacy Policy
      • Cookie Policy
      • CCPA Notice
      • Risks
    • Security
  • Send Feedback
    • Report a Bug
    • Contact Us
Powered by GitBook
On this page
  1. Protocol Overview
  2. Developer Walkthroughs

Code Examples

The Capsule Shipping contracts serve as a highly abstracted and modular solution for packaging and shipping assets within the blockchain ecosystem. Its design enables developers to create customized user interfaces, additional business logic, and complementary smart contracts that interact with the PostOffice.

With the PostOffice.sol contract as the core infrastructure, anyone can extend its functionality to suit their specific use cases. One can build wrapper contracts that add conditions for package redemption or shipment, leverage external data sources such as oracles to enforce rules and requirements, or anything more. Presented are example wrapper contracts that can be tailored to implement various constraints, pricing models, or eligibility criteria for package handling.

PreviousPostOffice.solNextConditional Redemption

Last updated 1 year ago