Skip to content

🧡 La Bobinerie - Haberdashery of Bobine modules: from useful, serious pieces to educational gems and esoteric oddities. Grab, deploy, fork at will.

License

Notifications You must be signed in to change notification settings

ccamel/bobinerie

Repository files navigation

La Bobinerie

Bobinerie Banner

🧡 La Bobinerie - Haberdashery of Bobine modules: serious primitives, educational gems, and esoteric oddities. Grab, deploy, fork at will.

Open since 2025 Awesome Version

AssemblyScript Commit Convention: DAFT License: MIT

⸟

Build Lint Deploy E2E Tests Codecov

Le Comptoir

Available now:

  • counter pedagogical

    Per-account counter with Ed25519 session authentication.

  • pool-xyk defi

    XYK (constant-product) AMM pool for two fungible tokens: add/remove liquidity, swap, fee in bps.

  • say-my-name pedagogical

    A simple name storage contract that remembers who you are.

  • sigil creative

    Account-bound on-chain sigil (SVG PFP): mint one per derived address, optional on-chain tag.

  • token_fungible defi

    A minimal fungible token module for Bobine, designed to be a boring, reliable building block for DeFi modules (pools, routers, etc.).

Le Manuel de l’Artisan

Project Structure

bobinerie/
β”œβ”€β”€ contracts/               # All the smart contracts
β”‚   └── say-my-name/         # A single contract
β”‚       β”œβ”€β”€ contract.feature # BDD tests (specifications)
β”‚       β”œβ”€β”€ out/             # Compiled outputs (WASM + types)
β”‚       β”œβ”€β”€ README.md        # Contract documentation
β”‚       β”œβ”€β”€ src
β”‚       β”‚   β”œβ”€β”€ mod.ts
β”‚       β”‚   └── mods
β”‚       β”‚       └── mod.ts
β”‚       └── tsconfig.json
β”œβ”€β”€ run/                     # Deployment & execution scripts
└── package.json             # Build scripts

Setup

npm install

Configure your Bobine server in .env.local (optional):

SERVER=http://localhost:8080

Quick Start

Compile all contracts:

npm run prepack

Deploy a contract:

CONTRACT=say-my-name npm run contract:produce
# Returns: { address: "3ca2c27f..." }

Other common tasks:

  • Build a single contract: CONTRACT=say-my-name npm run contract:build
  • Produce all contracts: npm run produce
  • Generate docs: npm run docs
  • Run tests: npm run test
  • Run tests with coverage: npm run test:coverage (measures test infrastructure, not WASM contract code)

Execute a contract method:

npm run execute 3ca2c27f... sayMyName text:"Alice"

Avis aux artisans

Got a useful contract? An intriguing experiment? Put it on the shelves.

  1. Create your contract in contracts/your-contract-name/
  2. Write comprehensive cucumber BDD tests in contracts/your-contract-name/contract.feature
  3. Add JSDoc documentation to all public API functions
  4. Run npm run docs to generate the READMEs
  5. Submit a PR

All contributions welcome, from serious primitives to silly meme contracts.

About

🧡 La Bobinerie - Haberdashery of Bobine modules: from useful, serious pieces to educational gems and esoteric oddities. Grab, deploy, fork at will.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •