abc-blockchain 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +88 -70
- package/package.json +2 -2
- package/PUBLISHING.md +0 -89
package/README.md
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
# ABC Blockchain
|
|
2
2
|
|
|
3
|
-
Enterprise-grade
|
|
4
|
-
|
|
5
|
-
Creator: Kimberley Bezuidenhout
|
|
6
|
-
Framework Signature: kimmicorn~glitch
|
|
7
|
-
|
|
8
|
-
## Usage
|
|
3
|
+
**Enterprise-grade ERC-4337 Hardhat bootstrap framework.** Scaffold production-ready account abstraction projects with a single command.
|
|
9
4
|
|
|
10
5
|
```bash
|
|
11
6
|
npx abc-blockchain init my-project
|
|
@@ -13,17 +8,34 @@ cd my-project
|
|
|
13
8
|
npm test
|
|
14
9
|
```
|
|
15
10
|
|
|
16
|
-
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
- **ERC-4337 Native** — Smart account, account factory, entry point, paymaster hooks, and token contracts pre-integrated.
|
|
16
|
+
- **Hardhat + TypeScript** — Ignition deployment modules, type-safe scripts, and task runner included.
|
|
17
|
+
- **CI/CD Ready** — GitHub Actions workflows for CI and npm publishing with provenance.
|
|
18
|
+
- **Security First** — Zod environment validation, Slither configuration, dependency auditing, and audit-friendly project layout.
|
|
19
|
+
- **Zero Telemetry** — No hidden network calls, obfuscated code, or tracking of any kind.
|
|
20
|
+
|
|
21
|
+
---
|
|
17
22
|
|
|
18
23
|
## CLI
|
|
19
24
|
|
|
20
|
-
```bash
|
|
21
|
-
abc-blockchain init <project-name> [--no-install] [--package-manager npm|pnpm|yarn]
|
|
22
25
|
```
|
|
26
|
+
abc-blockchain init <project-name> [options]
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
| Option | Description |
|
|
30
|
+
|--------|-------------|
|
|
31
|
+
| `--no-install` | Skip dependency installation after scaffolding |
|
|
32
|
+
| `--package-manager <npm\|pnpm\|yarn>` | Package manager to use (default: npm) |
|
|
33
|
+
|
|
34
|
+
---
|
|
23
35
|
|
|
24
|
-
## Generated
|
|
36
|
+
## Generated Project
|
|
25
37
|
|
|
26
|
-
```
|
|
38
|
+
```
|
|
27
39
|
my-project/
|
|
28
40
|
├── contracts/
|
|
29
41
|
│ ├── interfaces/
|
|
@@ -54,91 +66,97 @@ my-project/
|
|
|
54
66
|
├── hardhat.config.ts
|
|
55
67
|
├── tsconfig.json
|
|
56
68
|
├── .env.example
|
|
57
|
-
├── README.md
|
|
58
69
|
└── package.json
|
|
59
70
|
```
|
|
60
71
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
- CLI package copies a versioned Hardhat template and renders project metadata.
|
|
64
|
-
- Generated projects keep contracts, scripts, tasks, tests, deployments, and CI concerns separated.
|
|
65
|
-
- Environment variables are parsed through Zod so missing or malformed configuration fails early.
|
|
66
|
-
- Deployment scripts emit structured JSON logs and deployment manifests.
|
|
67
|
-
- No telemetry, hidden network calls, covert tracking, or obfuscated code is included.
|
|
72
|
+
---
|
|
68
73
|
|
|
69
|
-
##
|
|
74
|
+
## Architecture
|
|
70
75
|
|
|
71
|
-
|
|
72
|
-
2. Add selectable templates for minimal, audited, upgradeable, and paymaster-enabled project profiles.
|
|
73
|
-
3. Add real bundler and paymaster provider adapters for common ERC-4337 infrastructure vendors.
|
|
74
|
-
4. Add Foundry optional profile, Slither CI container job, and contract size reporting.
|
|
75
|
-
5. Add template snapshot tests and generated-project compile tests in CI.
|
|
76
|
-
6. Publish v1.0 after external security review and compatibility checks across Node LTS versions.
|
|
76
|
+
The CLI copies a versioned Hardhat template, renders project metadata, and installs dependencies. Generated projects follow a clean separation of concerns:
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
| Layer | Directory | Responsibility |
|
|
79
|
+
|-------|-----------|----------------|
|
|
80
|
+
| **Contracts** | `contracts/` | Solidity smart contracts (Account, Factory, EntryPoint, Token) |
|
|
81
|
+
| **Deployment** | `ignition/` | Hardhat Ignition modules for deterministic deploys |
|
|
82
|
+
| **Scripts** | `scripts/` | CLI scripts for account creation, deployment, and bundler interaction |
|
|
83
|
+
| **Tasks** | `tasks/` | Hardhat tasks (e.g., account listing) |
|
|
84
|
+
| **Tests** | `test/` | Contract tests with Hardhat test runner |
|
|
85
|
+
| **CI** | `.github/` | GitHub Actions workflows for CI and release |
|
|
79
86
|
|
|
80
|
-
|
|
81
|
-
- `0.x`: rapid template iteration, breaking changes allowed with changelog entries.
|
|
82
|
-
- `1.0`: stable CLI flags, stable generated folder contracts, documented migration guide.
|
|
83
|
-
- Patch releases: bug fixes, dependency security bumps, documentation corrections.
|
|
84
|
-
- Minor releases: new template options, new provider adapters, additional CI integrations.
|
|
85
|
-
- Major releases: Hardhat or ERC-4337 interface upgrades that require user migration.
|
|
87
|
+
Environment variables are validated through Zod at runtime — missing or malformed configuration fails early with clear error messages. Deployment scripts emit structured JSON logs and deployment manifests.
|
|
86
88
|
|
|
87
|
-
|
|
89
|
+
---
|
|
88
90
|
|
|
89
|
-
|
|
91
|
+
## Publishing
|
|
90
92
|
|
|
91
|
-
|
|
93
|
+
This package is published to npm via GitHub Actions. See [`PUBLISHING.md`](./PUBLISHING.md) for the full release checklist.
|
|
92
94
|
|
|
93
95
|
```bash
|
|
96
|
+
# Local dry-run verification
|
|
94
97
|
npm ci
|
|
95
98
|
npm run ci
|
|
96
99
|
npm pack --dry-run
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
GitHub setup:
|
|
100
|
-
|
|
101
|
-
1. Create an npm automation token.
|
|
102
|
-
2. Store it in GitHub Actions secrets as `NPM_TOKEN`.
|
|
103
|
-
3. Create a GitHub environment named `npm-production`.
|
|
104
|
-
4. Add required reviewers to the environment.
|
|
105
|
-
5. Run the `Publish to npm` workflow with `dry_run` enabled first.
|
|
106
|
-
6. Re-run the workflow with `dry_run` disabled when the package contents are correct.
|
|
107
|
-
|
|
108
|
-
Manual fallback:
|
|
109
100
|
|
|
110
|
-
|
|
111
|
-
npm
|
|
112
|
-
npm run ci
|
|
113
|
-
npm version 0.1.1
|
|
101
|
+
# Manual publish (fallback)
|
|
102
|
+
npm version <semver>
|
|
114
103
|
npm publish --provenance --access public
|
|
115
104
|
git push origin main --follow-tags
|
|
116
105
|
```
|
|
117
106
|
|
|
118
|
-
|
|
107
|
+
---
|
|
119
108
|
|
|
120
109
|
## Repository Structure
|
|
121
110
|
|
|
122
|
-
```
|
|
111
|
+
```
|
|
123
112
|
abc-blockchain/
|
|
124
|
-
├── src/
|
|
125
|
-
│ ├──
|
|
126
|
-
│ ├──
|
|
127
|
-
│ ├──
|
|
128
|
-
│ ├──
|
|
129
|
-
│ ├──
|
|
130
|
-
│ ├──
|
|
131
|
-
│ └──
|
|
113
|
+
├── src/ # CLI source
|
|
114
|
+
│ ├── cli.ts # Entry point (Commander)
|
|
115
|
+
│ ├── create-project.ts # Scaffolding logic
|
|
116
|
+
│ ├── template.ts # Template rendering
|
|
117
|
+
│ ├── config.ts # Project configuration
|
|
118
|
+
│ ├── package-manager.ts # npm/pnpm/yarn detection
|
|
119
|
+
│ ├── logger.ts # Structured logging
|
|
120
|
+
│ └── branding.ts # Framework metadata
|
|
132
121
|
├── templates/
|
|
133
|
-
│ └── hardhat-erc4337/
|
|
122
|
+
│ └── hardhat-erc4337/ # Project template
|
|
134
123
|
├── .github/workflows/
|
|
135
|
-
├──
|
|
136
|
-
|
|
137
|
-
├──
|
|
138
|
-
├──
|
|
139
|
-
└──
|
|
124
|
+
│ ├── ci.yml # CI pipeline
|
|
125
|
+
│ └── publish-npm.yml # npm publish workflow
|
|
126
|
+
├── PUBLISHING.md # Release process
|
|
127
|
+
├── SECURITY.md # Security policy
|
|
128
|
+
└── package.json
|
|
140
129
|
```
|
|
141
130
|
|
|
142
|
-
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Roadmap
|
|
134
|
+
|
|
135
|
+
- **v0.1** — EntryPoint integration, smart account factory, deterministic deployments, and tests (current)
|
|
136
|
+
- **v0.2** — Selectable templates (minimal, audited, upgradeable, paymaster-enabled)
|
|
137
|
+
- **v0.3** — Bundler and paymaster provider adapters for common ERC-4337 infrastructure
|
|
138
|
+
- **v0.4** — Foundry profile, Slither CI job, contract size reporting
|
|
139
|
+
- **v1.0** — Stable CLI, stable template contracts, external security review
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Security
|
|
144
|
+
|
|
145
|
+
ABC Blockchain contains no hardcoded secrets, backdoors, telemetry, or obfuscated code. Generated projects include:
|
|
146
|
+
|
|
147
|
+
- Environment variable validation via Zod
|
|
148
|
+
- Dependency audit scripts (`npm audit`)
|
|
149
|
+
- Slither-ready configuration for static analysis
|
|
150
|
+
- Audit-friendly directory boundaries
|
|
151
|
+
|
|
152
|
+
Report vulnerabilities via [SECURITY.md](./SECURITY.md).
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## License
|
|
157
|
+
|
|
158
|
+
MIT — see [LICENSE](./LICENSE).
|
|
159
|
+
|
|
160
|
+
---
|
|
143
161
|
|
|
144
|
-
|
|
162
|
+
*Created by Kimberley Bezuidenhout*
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "abc-blockchain",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Enterprise-grade ERC-4337 Hardhat bootstrap framework.",
|
|
5
5
|
"author": "Kimberley Bezuidenhout",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"bin": {
|
|
9
|
-
"abc-blockchain": "
|
|
9
|
+
"abc-blockchain": "dist/cli.js"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
package/PUBLISHING.md
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
# Publishing ABC Blockchain to npm
|
|
2
|
-
|
|
3
|
-
Creator: Kimberley Bezuidenhout
|
|
4
|
-
Framework Signature: kimmicorn~glitch
|
|
5
|
-
|
|
6
|
-
## Prerequisites
|
|
7
|
-
|
|
8
|
-
- Node.js 20 or 22
|
|
9
|
-
- npm account with publish rights for `abc-blockchain`
|
|
10
|
-
- GitHub repository with Actions enabled
|
|
11
|
-
- npm automation token stored as `NPM_TOKEN`
|
|
12
|
-
|
|
13
|
-
## Local Release Checks
|
|
14
|
-
|
|
15
|
-
Run these before publishing:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm ci
|
|
19
|
-
npm run ci
|
|
20
|
-
npm pack --dry-run
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Confirm the dry-run package includes:
|
|
24
|
-
|
|
25
|
-
- `dist/`
|
|
26
|
-
- `templates/`
|
|
27
|
-
- `README.md`
|
|
28
|
-
- `LICENSE`
|
|
29
|
-
- no `.env`
|
|
30
|
-
- no `node_modules`
|
|
31
|
-
- no generated sample projects
|
|
32
|
-
|
|
33
|
-
## First-Time npm Setup
|
|
34
|
-
|
|
35
|
-
1. Create or log in to an npm account.
|
|
36
|
-
2. Enable two-factor authentication on the account.
|
|
37
|
-
3. Create an automation token at npm.
|
|
38
|
-
4. In GitHub, open repository settings.
|
|
39
|
-
5. Add `NPM_TOKEN` under `Settings > Secrets and variables > Actions`.
|
|
40
|
-
6. Create an environment named `npm-production`.
|
|
41
|
-
7. Add required reviewers to the `npm-production` environment.
|
|
42
|
-
|
|
43
|
-
## Manual Publish from GitHub Actions
|
|
44
|
-
|
|
45
|
-
1. Open `Actions`.
|
|
46
|
-
2. Select `Publish to npm`.
|
|
47
|
-
3. Click `Run workflow`.
|
|
48
|
-
4. Enter the version, for example `0.1.1`.
|
|
49
|
-
5. Keep `dry_run` enabled for the first run.
|
|
50
|
-
6. Review the workflow logs and package contents.
|
|
51
|
-
7. Run the workflow again with `dry_run` disabled.
|
|
52
|
-
|
|
53
|
-
The workflow runs CI, updates the package version, verifies package contents, publishes with npm provenance, commits the version bump, and creates a `vX.Y.Z` git tag.
|
|
54
|
-
|
|
55
|
-
## Manual Publish from Local Machine
|
|
56
|
-
|
|
57
|
-
Use this only if GitHub Actions is unavailable:
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
npm ci
|
|
61
|
-
npm run ci
|
|
62
|
-
npm version 0.1.1
|
|
63
|
-
npm publish --provenance --access public --tag latest
|
|
64
|
-
git push origin main --follow-tags
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## Dist Tags
|
|
68
|
-
|
|
69
|
-
- `latest`: stable releases
|
|
70
|
-
- `next`: release candidates
|
|
71
|
-
- `beta`: beta releases
|
|
72
|
-
- `alpha`: early internal validation
|
|
73
|
-
|
|
74
|
-
Install examples:
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
npm install -g abc-blockchain@latest
|
|
78
|
-
npx abc-blockchain init my-project
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
## Production Release Checklist
|
|
82
|
-
|
|
83
|
-
- CI is green on `main`.
|
|
84
|
-
- `npm audit --audit-level=moderate` passes for the CLI package.
|
|
85
|
-
- Generated template compiles and tests with a fresh install.
|
|
86
|
-
- README, SECURITY, and PUBLISHING docs match the release.
|
|
87
|
-
- Package contents were reviewed through `npm pack --dry-run`.
|
|
88
|
-
- GitHub environment approval is enabled for `npm-production`.
|
|
89
|
-
- `NPM_TOKEN` is an npm automation token, not a personal password.
|