Skip to content

Commit 23b53d8

Browse files
Merge pull request #102 from DSCmatter/script-check-branch
Added standard npm scripts for Hardhat development
2 parents 01b376c + c4e023b commit 23b53d8

File tree

2 files changed

+122
-52
lines changed

2 files changed

+122
-52
lines changed

README.md

Lines changed: 116 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,136 @@
11
# Clowder
22

3-
> Fun fact: "Clowder" is the collective noun for cats.
3+
A minimalistic platform for creating and managing Contribution Accounting Tokens (CATs).
44

5-
Clowder is a minimalistic platform allowing anyone to create [CATs (Contribution Accounting Tokens)](https://docs.stability.nexus/about-us/the-stable-order/cats).
5+
## Overview
66

7-
CATs are fungible tokens (e.g. ERC20 tokens) that are used to track the value of contributions to a project by members of a decentralized organization. CATs have the following characteristics:
7+
Clowder enables anyone to create CATs, which are fungible tokens designed to track the value of contributions to projects within decentralized organizations. The name "Clowder" is derived from the collective noun for cats.
88

9-
1. The initial supply of tokens is zero.
10-
2. The user who deploys the token contract is its initial owner.
11-
3. The contract may have multiple owners and owners may grant ownership to others.
12-
4. All owners have permission to mint tokens.
13-
5. There is an optional maximum supply of tokens, above which minting is forbidden.
14-
6. There is a threshold supply of tokens, below which minting is unrestricted.
15-
7. There is a maximum supply expansion rate that is enforced when the supply exceeds the threshold.
16-
8. Owners have permission to permanently reduce the maximum supply of tokens and the threshold supply of tokens.
17-
9. Owners have permission to permanently reduce the maximum supply expansion rate.
18-
10. Transfers of tokens may be restricted to accounts that already have tokens, in order to keep the tokens circulating only among members of a project.
19-
11. Owners may permanently disable the transfer restriction.
9+
For more information about CATs, visit the [official documentation](https://docs.stability.nexus/about-us/the-stable-order/cats).
2010

21-
The platform's frontend has the following pages:
11+
## CAT Token Characteristics
2212

23-
- **Landing Page**: This page has a "Create CAT" button (which redirects to the *CAT Creation Page*), a text field for the user to input a CAT contract address, and a "Use CAT" button (which redirects to the *CAT Page* for the CAT contract input in the text field).
24-
- **CAT Page**: This page reads from the URL the address of the token contract and allows users to interact with the respective token contract. It shows parameters and variables of the token contract such as current supply, maximum supply, threshold supply, maximum expansion rate, and transfer restriction. For owners who have connected their wallets, it also shows fields and buttons to mint tokens and to modify the parameters of the token contract.
25-
- **Create CAT Page**: This page shows a form where the user can input the constructor parameters for the desired CAT and a "Deploy CAT" button that calls the factory contract to deploy the CAT with the desired parameters.
26-
- **My CATs Page**: This page lists all token contracts owned by the user who connected their wallet.
13+
CATs are ERC20-compatible tokens with the following key features:
2714

28-
The platform's frontend is built with Next.js, TailwindCSS, and ShadCN UI.
15+
1. **Zero Initial Supply**: Tokens begin with no initial supply.
16+
2. **Owner-Based Management**: The deployer becomes the initial owner with multi-owner support.
17+
3. **Minting Permissions**: All owners have permission to mint new tokens.
18+
4. **Supply Controls**:
19+
- Optional maximum supply cap
20+
- Threshold supply below which minting is unrestricted
21+
- Maximum supply expansion rate enforced above the threshold
22+
5. **Governance Flexibility**: Owners can permanently reduce maximum supply, threshold supply, and expansion rates.
23+
6. **Transfer Restrictions**: Optional restriction of transfers to existing token holders to maintain member-only circulation.
24+
7. **Permanent Restriction Removal**: Owners can permanently disable transfer restrictions.
2925

30-
The platform has no backend. The list of token contracts owned by each address is stored in the factory contract.
26+
## Platform Features
3127

32-
---
28+
### Frontend Pages
3329

34-
## Local Setup Instructions
30+
**Landing Page**
31+
- Create new CAT tokens
32+
- Access existing CAT contracts by address
33+
- Quick navigation to CAT management interface
3534

36-
To set up Clowder locally, follow these steps:
35+
**CAT Page**
36+
- View token contract parameters and variables
37+
- Display current supply, maximum supply, threshold supply, and expansion rate
38+
- Show transfer restriction status
39+
- Owner-specific interface for minting and parameter modification
3740

38-
1. **Clone the Repository**
39-
Clone this repository to your local machine:
40-
```bash
41-
git clone https://github.com/your-username/clowder.git
42-
cd clowder
43-
2. Install Dependencies
44-
Install the required packages using your preferred package manager:
41+
**Create CAT Page**
42+
- Interactive form for constructor parameters
43+
- Direct deployment through factory contract
4544

46-
bash
47-
Copy
48-
npm install
49-
# or
50-
yarn install
45+
**My CATs Page**
46+
- Comprehensive list of all owned token contracts
47+
- Wallet-connected user view
5148

52-
3. Set Up Environment Variables
53-
Create a .env file in the root directory of the project and add the following environment variable:
54-
NEXT_PUBLIC_PROJECT_ID=your-project-id
49+
### Technical Stack
5550

56-
4. Obtain Your Project ID
57-
To get the your-project-id value for NEXT_PUBLIC_PROJECT_ID, follow these steps:
58-
Go to https://cloud.reown.com/.
59-
Create an account or log in if you already have one.
60-
Create a new project within the dashboard.
61-
Once the project is created, locate your project key (this might be labeled as "Project ID" or "API Key").
62-
Copy this key and paste it into your .env file as the value for NEXT_PUBLIC_PROJECT_ID.
51+
- **Frontend Framework**: Next.js
52+
- **Styling**: TailwindCSS
53+
- **UI Components**: ShadCN UI
54+
- **Architecture**: Serverless (no backend required)
55+
- **Storage**: On-chain storage via factory contract
6356

64-
5. Run the Development Server
65-
Start the local development server:
57+
## Local Development Setup
6658

67-
npm run dev
68-
# or
69-
yarn dev
59+
### Prerequisites
7060

61+
- Node.js and npm (or yarn)
62+
- Git
7163

72-
Your application should now be running on http://localhost:3000.
64+
### Installation
65+
66+
1. Clone the repository:
67+
```bash
68+
git clone https://github.com/StabilityNexus/Clowder.git
69+
cd Clowder
70+
```
71+
72+
2. Install dependencies:
73+
```bash
74+
npm install
75+
# or
76+
yarn install
77+
```
78+
79+
3. Configure environment variables:
80+
81+
Create a `.env` file in the root directory:
82+
```
83+
NEXT_PUBLIC_PROJECT_ID=your-project-id
84+
```
85+
86+
4. Obtain your Project ID:
87+
- Navigate to [https://cloud.reown.com/](https://cloud.reown.com/)
88+
- Create an account or sign in
89+
- Create a new project
90+
- Copy the Project ID from your project dashboard
91+
- Add it to your `.env` file
92+
93+
5. Start the development server:
94+
```bash
95+
npm run dev
96+
# or
97+
yarn dev
98+
```
99+
100+
The application will be available at [http://localhost:3000](http://localhost:3000).
101+
102+
## Project Structure
103+
104+
```
105+
Clowder/
106+
├── contracts/ # Smart contract source files
107+
├── test/ # Contract test suites
108+
├── web/ # Next.js frontend application
109+
├── .github/ # GitHub Actions workflows
110+
└── hardhat.config.js
111+
```
112+
113+
## Smart Contract Development
114+
115+
The project uses Hardhat for smart contract development and testing. Key configuration files:
116+
117+
- `hardhat.config.js`: Hardhat configuration
118+
- `contracts/`: Solidity smart contracts
119+
- `test/`: Contract test files
120+
121+
## Contributing
122+
123+
Contributions are welcome. Please ensure all tests pass before submitting pull requests.
124+
125+
## License
126+
127+
Please refer to the repository for license information.
128+
129+
## Links
130+
131+
- [CAT Documentation](https://docs.stability.nexus/about-us/the-stable-order/cats)
132+
- [Reown Cloud](https://cloud.reown.com/)
133+
134+
## Support
135+
136+
For issues and questions, please use the GitHub Issues section of this repository.

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
{
22
"name": "hardhat-project",
3+
"scripts": {
4+
"dev": "npx hardhat node",
5+
"compile": "npx hardhat compile",
6+
"test": "npx hardhat test",
7+
"clean": "npx hardhat clean"
8+
},
39
"devDependencies": {
410
"@nomicfoundation/hardhat-toolbox": "^5.0.0",
511
"hardhat": "^2.22.17"

0 commit comments

Comments
 (0)