# Aha Labs Milestones
# Start of Project: $10,000 of NEAR
# Milestone 1: OpenZeppelin-like catalog of composable contract components (Riffs) - $30,000 of NEAR
Solve two problems: 1. create an open source repository of plug-and-play components, analogous to Ethereum's OpenZepellin, but better because NEAR is more powerful. 2. Solve gas-inefficient and hard-to-upgrade design paradigm currently wasting resources in the NEAR ecosystem, replacing it with superior component model (Riffs).
- Release [NEAR Riffs](https://github.com/AhaLabs/contract-riffs) v1 with usable documentation
- Standardize set of contract methods for deploying and updating contracts
- Give instructions for how community members can contribute own Riffs
- Measure success: Index all deployed contracts; check if built with Riffs
<!-- - Create GUI to allow anyone to launch a contract -->
<!-- - DAO to manage submissions of new contracts to Store -->
# Milestone 2: DAO-governed Contract Template Registry - $30,000 of NEAR
Riffs give us the underlying tools we need to build composable contracts. In this milestone, we build with Riffs to offer fully-featured contract templates, each composed of multiple Riffs. Builders will be able to launch no-code versions of these template contracts, solving a key problem seen throughout the ecosystem, especially during our work on TENK (many people just need their own NFT contract, with no code-level modifications). And for more specific needs, we will offer a CLI tool that allows engineers to quickly generate starting source code.
- Create registry of contract templates built using Riffs, with linked source code
- DAO-governed submissions of new templates
- DAO-governed "tagging" of contract templates with short names, such as
- `ft`
- `nft`
- `dao`
- `amm`
- UI to expose these tagged templates and either launch own version or copy source
- CLI to bootstrap own version of template source code (ex: `raen generate contract ft`)
- Measure success: Index all deployed contracts; check if launched from Registry
# Milestone 3: CLI development - $30,000 of NEAR
With Riffs and the Contract Template Registry in place, we can begin building toward our larger vision for the RAEN framework. Riffs and the Registry allow quickly launching smart contracts, and now we can give builders the other tooling they need to interact with those contracts: TypeScript files to integrate RAEN-built contracts with the frontend; rich, interactive CLIs for any smart contract; and other features that will open worlds of possibility for dapp developers.
<!-- NEAR Tooling: Add Linkdrop indexing -->
<!-- - Autogenerate Subgraphs and incorporate into contract factories -->
<!-- - Collaborate with popular NEAR projects to release RAEN-built versions (wrap.near, USN, Ref Finance, Burrow, Paras, Mintbase, NFT Secret Skellies, NFT TAYC, ...) --> I'm 50/50 to keep this one -->
<!-- - RAEN Admin-like contract explorer in nearblocks.io -->
<!-- - Cross-Contract Call logic for contract developers
- Rust contract boilerplate
- TypeScript contract boilerplate
-->
<!-- - Create a dev-deploy subcommand to contract and print link to admin panel -->
- Become capatible with Pagoda's ABI
- Autogenerate interactive contract CLIs
- Generate TypeScript for app devs
- Measure Success:
- number of downloads of CLI tool
- number of calls to Registry DAO for finding specific contract templates
<!--
# Milestone 3: GUI development - $20,000 nUSDC
- RAEN Admin: Allow for complex data input (e.g. date inputs for dates, not numbers)
- RAEN Admin: Allow signing into multiple contracts at once (work around near-api-js limitation)
- Incorporate [web4](https://github.com/vgrichina/web4) to brand links shared on social for contracts and not general admin panel
# Milestone 4: 3 Smart Contract Development Projects - $20,000 nUSDC
- endless.fm
- ...
-->
# Future Work
- TypeScript-to-Wit generator
- Cross-Contract Call logic for contract developers
- Rust contract boilerplate
- TypeScript contract boilerplate
- Add support for OpenRPC
<!-- Branding (outsourced) -->
<!-- Embed Wit in contracts instead of JSON Schema -->
# Future: Education & tutorials
- Expand The Guide
- Use launcher to allow users to deploy contracts from guide
- Embed admin contract interface to call contracts from guide
- Launch Raenville full dapp tutorial for web2 audience
- Work with Web3 Builders Alliance to help train instructors.
--------------------------