You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bundles the contracts from src/** into dist/contracts/.
58
67
59
-
### Spin Up Starship
68
+
## Infrastructure Setup
69
+
70
+
### Option 1: Using Starship
71
+
[Starship](https://github.com/cosmology-tech/starship) is a Kubernetes-based blockchain orchestrator. It sets up a local blockchain environment with full cross-chain compatibility.
72
+
60
73
#### Enable Kubernetes in Docker Desktop
61
74
Docker Desktop includes a standalone Kubernetes server and client, as well as Docker CLI integration that runs on your machine.
62
75
To enable Kubernetes in Docker Desktop:
@@ -80,18 +93,40 @@ Wait for Starship to initialize.
80
93
81
94
For more details, refer to the [Starship Docs](https://docs.cosmology.zone/starship/).
82
95
83
-
#### Interact with Chain
84
-
Once the starship nodes are running, then you can interact with the chain using following endpoints:
85
-
- REST: http://localhost:1317
86
-
- RPC: http://localhost:26657
87
-
- Faucet: http://localhost:8000
96
+
### Option 2: Using Docker
97
+
Alternatively, Hyperweb can be run using Docker, which simplifies setup and enables you to interact with the blockchain without requiring Kubernetes.
98
+
99
+
#### Run Hyperweb with Docker
100
+
To spin up the chain using Docker, the following scripts are available in the package.json:
101
+
102
+
* Run Docker container:
103
+
```bash
104
+
yarn docker
105
+
```
106
+
107
+
* Stop and remove the container:
108
+
```bash
109
+
yarn docker:stop
110
+
```
111
+
112
+
### Interact with chain
113
+
114
+
This will set up the same chain environment that Starship provides, allowing you to interact with the chain using the same endpoints:
115
+
* REST: http://localhost:1317
116
+
* RPC: http://localhost:26657
117
+
* Faucet: http://localhost:8000
118
+
* Exposer: http://localhost:8081
119
+
* Registry: http://localhost:8001
120
+
121
+
Once the chain is running, you can follow the same steps to interact with the chain and run tests as detailed below.
88
122
89
-
### Run Tests
123
+
## Run Tests
124
+
Once the setup it complete, you can run tests to validate the contract functionality.
90
125
Run tests:
91
126
```bash
92
127
yarn test
93
128
```
94
-
The test suite deploys the contracts, interacts with them, and validates state transitions. The tests are located in tests/.
129
+
The test suite deploys the contracts, interacts with them, and validates state transitions. The tests are located in `__tests__/`.
For local development, you can run the tests provided in the `tests/` folder to validate contract functionality using `starshipjs` to simulate chain interactions.
250
+
For local development, you can run the tests provided in the `__tests__/` folder to validate contract functionality using `starshipjs` to simulate chain interactions.
0 commit comments