@caatinga/core 2.3.0 → 2.4.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caatinga/core",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "Core config, artifacts, command orchestration, and error primitives for Caatinga/Soroban toolkit",
5
5
  "keywords": [
6
6
  "stellar",
@@ -45,6 +45,7 @@
45
45
  },
46
46
  "files": [
47
47
  "dist",
48
+ "scaffolds",
48
49
  "README.md",
49
50
  "LICENSE"
50
51
  ],
@@ -0,0 +1,24 @@
1
+ [package]
2
+ name = "app"
3
+ version = "0.1.0"
4
+ rust-version = "1.84.0"
5
+ edition = "2021"
6
+
7
+ [lib]
8
+ crate-type = ["cdylib"]
9
+
10
+ [dependencies]
11
+ soroban-sdk = "22.0.1"
12
+
13
+ [dev-dependencies]
14
+ soroban-sdk = { version = "22.0.1", features = ["testutils"] }
15
+
16
+ [profile.release]
17
+ opt-level = "z"
18
+ overflow-checks = true
19
+ debug = 0
20
+ strip = "symbols"
21
+ debug-assertions = false
22
+ panic = "abort"
23
+ codegen-units = 1
24
+ lto = true
@@ -0,0 +1,42 @@
1
+ #![no_std]
2
+
3
+ use soroban_sdk::{contract, contractimpl, Env, Symbol};
4
+
5
+ #[contract]
6
+ pub struct AppContract;
7
+
8
+ #[contractimpl]
9
+ impl AppContract {
10
+ pub fn hello(env: Env) -> Symbol {
11
+ Symbol::new(&env, "hello")
12
+ }
13
+
14
+ pub fn version(env: Env) -> u32 {
15
+ let _ = env;
16
+ 1
17
+ }
18
+ }
19
+
20
+ #[cfg(test)]
21
+ mod test {
22
+ use super::*;
23
+ use soroban_sdk::Env;
24
+
25
+ #[test]
26
+ fn returns_hello_symbol() {
27
+ let env = Env::default();
28
+ let contract_id = env.register(AppContract, ());
29
+ let client = AppContractClient::new(&env, &contract_id);
30
+
31
+ assert_eq!(client.hello(), Symbol::new(&env, "hello"));
32
+ }
33
+
34
+ #[test]
35
+ fn returns_version() {
36
+ let env = Env::default();
37
+ let contract_id = env.register(AppContract, ());
38
+ let client = AppContractClient::new(&env, &contract_id);
39
+
40
+ assert_eq!(client.version(), 1);
41
+ }
42
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "a": "1"
3
+ }
@@ -0,0 +1,9 @@
1
+ pragma circom 2.1.6;
2
+
3
+ template Main() {
4
+ signal input a;
5
+ signal output b;
6
+ b <== a;
7
+ }
8
+
9
+ component main = Main();