Skip to content

v1.0.0 — .btw DSL + Full E2E Pipeline

Latest

Choose a tag to compare

@stackdump stackdump released this 04 Apr 05:55
· 10 commits to main since this release
dee260f

bitwrap 1.0

Write Petri net models in .btw, get validated Solidity smart contracts.

.btw DSL

./bitwrap -validate examples/erc20.btw
  parse    examples/erc20.btw
  schema   ERC20 (3 states, 5 actions, 10 arcs)
  solidity ERC20.sol (5023 bytes), tests (2125 bytes), genesis (1083 bytes)
  compile  ok
  test     10 passed
  deploy   0x5FbDB2315678afecb367f032d93F642f64180aa3
PASS
  • Full syntax: registers, functions, guards, events, arcs, nested maps
  • map[address,address]uint256 shorthand for nested mappings
  • # and // comments
  • --output dir saves generated Foundry project
  • Human-readable errors: type mismatches, unknown identifiers, reserved names, duplicate declarations

Validated Pipeline

Every generated contract is proven to compile, deploy, and pass tests:

Template Forge Tests On-Chain
ERC20 10/10 ✅ 5/5 ✅
ERC721 10/10 ✅ 5/5 ✅
ERC1155 12/12 ✅ 7/7 ✅
ERC4626 10/10 ✅ 1/5
ERC5725 10/10 ✅ 4/6
Vote 6/6 ✅ 2/3

Three-Way Execution Parity

Go runtime, JavaScript runtime, and generated Solidity produce identical state for the same inputs. Tested in CI.

Dev Wallet

Test the full poll flow without MetaMask:

./bitwrap -port 8088 -dev
# open http://localhost:8088/poll?dev-wallet

10 anvil accounts available via /api/dev/sign for multi-signer testing.

CI Pipeline

5 parallel jobs: lint, build, test, js-parity, playwright (19 browser tests).

What's New Since v0.9.0

  • .btw DSL with nested map support (map[k1,k2]v)
  • DSL guardrails: type checking, reserved names, guard validation, arc validation
  • bitwrap -validate command with --output flag
  • # comment support
  • GenerateProduction() strips test backdoors
  • Go/JS/Solidity execution parity (arc weights, read-arc detection)
  • Fix secp256k1 signature recovery for Go 1.25
  • Built-in dev wallet with 10 anvil accounts
  • 19 Playwright e2e tests in CI
  • 4 example .btw files with syntax reference