@caatinga/cli 0.2.0 → 0.2.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.
Files changed (34) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +101 -34
  3. package/dist/index.js +326 -39
  4. package/package.json +2 -2
  5. package/templates/marketplace-with-token/README.md +4 -2
  6. package/templates/marketplace-with-token/caatinga.config.ts +2 -2
  7. package/templates/marketplace-with-token/caatinga.template.json +1 -1
  8. package/templates/marketplace-with-token/contracts/marketplace/Cargo.lock +1731 -0
  9. package/templates/marketplace-with-token/contracts/marketplace/Cargo.toml +1 -0
  10. package/templates/marketplace-with-token/contracts/marketplace/src/lib.rs +31 -1
  11. package/templates/marketplace-with-token/contracts/token/Cargo.lock +1731 -0
  12. package/templates/marketplace-with-token/contracts/token/Cargo.toml +1 -0
  13. package/templates/marketplace-with-token/index.html +12 -0
  14. package/templates/marketplace-with-token/package.json +14 -3
  15. package/templates/marketplace-with-token/src/App.tsx +57 -0
  16. package/templates/marketplace-with-token/src/main.ts +3 -1
  17. package/templates/marketplace-with-token/src/main.tsx +10 -0
  18. package/templates/marketplace-with-token/src/styles.css +157 -0
  19. package/templates/marketplace-with-token/tsconfig.json +14 -4
  20. package/templates/marketplace-with-token/vite.config.ts +6 -0
  21. package/templates/react-vite-counter/README.md +1 -1
  22. package/templates/react-vite-counter/caatinga.artifacts.json +10 -0
  23. package/templates/react-vite-counter/caatinga.config.ts +1 -1
  24. package/templates/react-vite-counter/caatinga.template.json +1 -1
  25. package/templates/react-vite-counter/contracts/counter/Cargo.lock +1731 -0
  26. package/templates/react-vite-counter/contracts/counter/Cargo.toml +1 -0
  27. package/templates/react-vite-counter/package.json +3 -3
  28. package/templates/react-vite-counter/src/caatinga.ts +20 -0
  29. package/templates/react-vite-counter/src/components/CounterCard.tsx +40 -3
  30. package/templates/react-vite-counter/src/components/WalletButton.tsx +58 -5
  31. package/templates/react-vite-counter/src/contracts/generated/counter.ts +49 -0
  32. package/templates/react-vite-counter/src/styles.css +21 -0
  33. package/templates/react-vite-counter/tsconfig.json +1 -1
  34. package/templates/react-vite-counter/src/contracts/generated/.gitkeep +0 -1
@@ -1,6 +1,6 @@
1
1
  # __PROJECT_NAME__
2
2
 
3
- Experimental Caatinga multi-contract template.
3
+ Experimental Caatinga multi-contract template with a real constructor dependency.
4
4
 
5
5
  ## Deploy
6
6
 
@@ -9,6 +9,8 @@ npm install
9
9
  npx caatinga build token
10
10
  npx caatinga build marketplace
11
11
  npx caatinga deploy --network testnet --source alice
12
+ npx caatinga generate token
13
+ npx caatinga generate marketplace
12
14
  ```
13
15
 
14
16
  Deploy order:
@@ -16,4 +18,4 @@ Deploy order:
16
18
  1. `token`
17
19
  2. `marketplace`
18
20
 
19
- `marketplace.deployArgs.tokenContractId` resolves from `${contracts.token.contractId}` after the token deploy writes `caatinga.artifacts.json`.
21
+ `marketplace.deployArgs.tokenContractId` resolves from `${contracts.token.contractId}` after the token deploy writes `caatinga.artifacts.json`. Caatinga passes that value to the contract `__constructor` as `--token_contract_id`.
@@ -6,11 +6,11 @@ export default defineConfig({
6
6
  contracts: {
7
7
  token: {
8
8
  path: "./contracts/token",
9
- wasm: "./contracts/token/target/wasm32-unknown-unknown/release/token.wasm"
9
+ wasm: "./contracts/token/target/wasm32v1-none/release/token.wasm"
10
10
  },
11
11
  marketplace: {
12
12
  path: "./contracts/marketplace",
13
- wasm: "./contracts/marketplace/target/wasm32-unknown-unknown/release/marketplace.wasm",
13
+ wasm: "./contracts/marketplace/target/wasm32v1-none/release/marketplace.wasm",
14
14
  dependsOn: ["token"],
15
15
  deployArgs: {
16
16
  tokenContractId: "${contracts.token.contractId}"
@@ -3,7 +3,7 @@
3
3
  "version": "0.1.0",
4
4
  "description": "Experimental multi-contract Soroban template with token dependency injection.",
5
5
  "caatinga": {
6
- "compatibleCore": "^0.1.0",
6
+ "compatibleCore": "^0.2.2",
7
7
  "templateVersion": 1
8
8
  },
9
9
  "frontend": {