@caatinga/cli 0.2.2 → 0.2.3

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.
Files changed (39) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +2 -2
  3. package/templates/marketplace-with-token/README.md +0 -21
  4. package/templates/marketplace-with-token/caatinga.artifacts.json +0 -10
  5. package/templates/marketplace-with-token/caatinga.config.ts +0 -30
  6. package/templates/marketplace-with-token/caatinga.template.json +0 -21
  7. package/templates/marketplace-with-token/contracts/marketplace/Cargo.lock +0 -1731
  8. package/templates/marketplace-with-token/contracts/marketplace/Cargo.toml +0 -24
  9. package/templates/marketplace-with-token/contracts/marketplace/src/lib.rs +0 -43
  10. package/templates/marketplace-with-token/contracts/token/Cargo.lock +0 -1731
  11. package/templates/marketplace-with-token/contracts/token/Cargo.toml +0 -24
  12. package/templates/marketplace-with-token/contracts/token/src/lib.rs +0 -13
  13. package/templates/marketplace-with-token/index.html +0 -12
  14. package/templates/marketplace-with-token/package.json +0 -28
  15. package/templates/marketplace-with-token/src/App.tsx +0 -57
  16. package/templates/marketplace-with-token/src/main.ts +0 -12
  17. package/templates/marketplace-with-token/src/main.tsx +0 -10
  18. package/templates/marketplace-with-token/src/styles.css +0 -157
  19. package/templates/marketplace-with-token/tsconfig.json +0 -21
  20. package/templates/marketplace-with-token/vite.config.ts +0 -6
  21. package/templates/react-vite-counter/README.md +0 -58
  22. package/templates/react-vite-counter/caatinga.artifacts.json +0 -10
  23. package/templates/react-vite-counter/caatinga.config.ts +0 -26
  24. package/templates/react-vite-counter/caatinga.template.json +0 -21
  25. package/templates/react-vite-counter/contracts/counter/Cargo.lock +0 -1731
  26. package/templates/react-vite-counter/contracts/counter/Cargo.toml +0 -24
  27. package/templates/react-vite-counter/contracts/counter/src/lib.rs +0 -36
  28. package/templates/react-vite-counter/index.html +0 -12
  29. package/templates/react-vite-counter/package.json +0 -29
  30. package/templates/react-vite-counter/public/.gitkeep +0 -1
  31. package/templates/react-vite-counter/src/App.tsx +0 -18
  32. package/templates/react-vite-counter/src/caatinga.ts +0 -20
  33. package/templates/react-vite-counter/src/components/CounterCard.tsx +0 -66
  34. package/templates/react-vite-counter/src/components/WalletButton.tsx +0 -65
  35. package/templates/react-vite-counter/src/contracts/generated/counter.ts +0 -49
  36. package/templates/react-vite-counter/src/main.tsx +0 -10
  37. package/templates/react-vite-counter/src/styles.css +0 -176
  38. package/templates/react-vite-counter/tsconfig.json +0 -21
  39. package/templates/react-vite-counter/vite.config.ts +0 -6
@@ -1,24 +0,0 @@
1
- [package]
2
- name = "marketplace"
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
@@ -1,43 +0,0 @@
1
- #![no_std]
2
-
3
- use soroban_sdk::{contract, contractimpl, symbol_short, Address, Env, Symbol};
4
-
5
- const TOKEN_CONTRACT_ID: Symbol = symbol_short!("TOKEN");
6
-
7
- #[contract]
8
- pub struct MarketplaceContract;
9
-
10
- #[contractimpl]
11
- impl MarketplaceContract {
12
- pub fn __constructor(env: Env, token_contract_id: Address) {
13
- env.storage().instance().set(&TOKEN_CONTRACT_ID, &token_contract_id);
14
- }
15
-
16
- pub fn token_contract_id(env: Env) -> Address {
17
- env.storage().instance().get(&TOKEN_CONTRACT_ID).unwrap()
18
- }
19
-
20
- pub fn version(_env: Env) -> u32 {
21
- 1
22
- }
23
- }
24
-
25
- #[cfg(test)]
26
- mod test {
27
- use super::*;
28
- use soroban_sdk::testutils::Address as _;
29
-
30
- #[test]
31
- fn stores_token_contract_id_in_constructor() {
32
- let env = Env::default();
33
- let token_contract_id = Address::generate(&env);
34
- let contract_id = env.register(
35
- MarketplaceContract,
36
- MarketplaceContractArgs::__constructor(&token_contract_id),
37
- );
38
- let client = MarketplaceContractClient::new(&env, &contract_id);
39
-
40
- assert_eq!(client.token_contract_id(), token_contract_id);
41
- assert_eq!(client.version(), 1);
42
- }
43
- }