Skip to content

Commit fc73cdf

Browse files
committed
added Aiken and MeshJS templates
1 parent ea6cc79 commit fc73cdf

27 files changed

Lines changed: 2845 additions & 122 deletions

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ By design, `cardano-init` is **not** a package or version manager: it does not p
7474
Early prototype. Currently in the registry:
7575

7676
**On-chain:**
77-
- [ ] Aiken
77+
- [x] Aiken
7878
- [ ] Scalus
7979
- [ ] Plinth
8080
- [ ] Pebble
8181
- [ ] Plutarch
8282
- [ ] Opshin
8383

8484
**Off-chain:**
85-
- [ ] MeshJS
85+
- [x] MeshJS
8686
- [ ] Tx3
8787
- [ ] Scalus
8888
- [ ] Lucid Evolution
@@ -92,7 +92,9 @@ Early prototype. Currently in the registry:
9292
- [ ] PyCardano
9393

9494
**Testing:**
95+
- [ ] Yaci DevKit
9596
- [ ] Scalus
97+
- [ ] Evolution SDK
9698

9799
**Infrastructure:**
98100
- [ ] Cardano Node
@@ -104,7 +106,6 @@ Early prototype. Currently in the registry:
104106
- [ ] Mithril Client
105107
- [ ] Kupo
106108
- [ ] Ogmios
107-
- [ ] Yaci DevKit
108109

109110
**Formal Methods:**
110111
- [ ] Blaster

src/scaffold/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ mod tests {
124124
// On-chain files
125125
assert!(dir.path().join("on-chain/aiken.toml").is_file());
126126
assert!(dir.path().join("on-chain/Justfile").is_file());
127-
assert!(dir.path().join("on-chain/validators/example.ak").is_file());
127+
assert!(dir.path().join("on-chain/validators/giftcard.ak").is_file());
128128

129129
// Content checks
130130
let justfile = std::fs::read_to_string(dir.path().join("Justfile")).unwrap();

src/scaffold/planner.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,8 @@ mod tests {
340340
.collect();
341341
assert!(dests.contains(&"on-chain/aiken.toml"));
342342
assert!(dests.contains(&"on-chain/Justfile"));
343-
assert!(dests.contains(&"on-chain/validators/example.ak"));
343+
assert!(dests.contains(&"on-chain/lib/helpers.ak"));
344+
assert!(dests.contains(&"on-chain/validators/giftcard.ak"));
344345
}
345346

346347
#[test]
@@ -420,10 +421,12 @@ mod tests {
420421

421422
// base: 4 (Justfile, README, .gitignore, .env)
422423
// blueprint/.gitkeep: 1
423-
// aiken on-chain: 3 (aiken.toml, Justfile, validators/example.ak)
424-
// meshjs off-chain: 3 (package.json, Justfile, src/index.ts)
425-
// total: 11
426-
assert_eq!(plan.entries.len(), 11);
424+
// aiken on-chain: 4 (aiken.toml, Justfile, lib/helpers.ak, validators/giftcard.ak)
425+
// meshjs off-chain: 10 (package.json, tsconfig.json, Justfile, .env.example,
426+
// scripts/bundle-blueprint.mjs,
427+
// src/{contract,node,index,cli,contract.test}.ts)
428+
// total: 19
429+
assert_eq!(plan.entries.len(), 19);
427430
}
428431

429432
#[test]

src/scaffold/renderer.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,13 @@ mod tests {
154154
let ctx = build_context(&sel, &reg).unwrap();
155155
let files = render(&plan, &ctx).unwrap();
156156

157-
let example = files
157+
let validator = files
158158
.iter()
159-
.find(|f| f.dest.to_str().unwrap().contains("validators/example.ak"))
160-
.expect("example.ak should be in rendered files");
159+
.find(|f| f.dest.to_str().unwrap().contains("validators/giftcard.ak"))
160+
.expect("giftcard.ak should be in rendered files");
161161

162-
let content = std::str::from_utf8(&example.content).unwrap();
163-
assert!(content.contains("validator example"));
162+
let content = std::str::from_utf8(&validator.content).unwrap();
163+
assert!(content.contains("validator gift_card"));
164164
assert!(!content.contains("{{"));
165165
}
166166

0 commit comments

Comments
 (0)