create-stylus 0.1.9 → 0.1.11

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": "create-stylus",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "author": "Q3 Labs",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ss",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "private": true,
5
5
  "workspaces": {
6
6
  "packages": [
@@ -72,7 +72,6 @@ export const Faucet = () => {
72
72
  await faucetTxn({
73
73
  to: inputAddress,
74
74
  value: parseEther(sendValue as `${number}`),
75
- account: faucetAddress,
76
75
  });
77
76
  setLoading(false);
78
77
  setInputAddress(undefined);
@@ -36,7 +36,6 @@ export const FaucetButton = () => {
36
36
  try {
37
37
  setLoading(true);
38
38
  await faucetTxn({
39
- account: FAUCET_ADDRESS,
40
39
  to: address,
41
40
  value: parseEther(NUM_OF_ETH),
42
41
  });
@@ -26,6 +26,16 @@ Before you begin, you need to install the following tools:
26
26
  - [Git](https://git-scm.com/downloads)
27
27
  - [Docker](https://docs.docker.com/engine/install/)
28
28
  - [Foundry Cast](https://getfoundry.sh/)
29
+ - [Solc (Solidity compiler)](https://docs.soliditylang.org/en/latest/installing-solidity.html)
30
+
31
+ > **Note: Windows Compatibility**
32
+ >
33
+ > Scaffold-Stylus currently does not support Windows natively. If you're using Windows, we recommend:
34
+ >
35
+ > - **Use WSL (Windows Subsystem for Linux)** - Install WSL2 and run Scaffold-Stylus within the Linux environment
36
+ > - **Switch to Linux or macOS** - For the best development experience
37
+ >
38
+ > For WSL setup, follow the [Microsoft WSL installation guide](https://docs.microsoft.com/en-us/windows/wsl/install).
29
39
 
30
40
  ## Quickstart
31
41
 
@@ -161,7 +171,30 @@ yarn new-module <contract-name>
161
171
 
162
172
  The generated contract will be located in `packages/stylus/<contract-name>`.
163
173
 
164
- ### Step 2: Deploy Your Contract
174
+ ### Step 2: Validate Your Contract Before Deployment
175
+
176
+ Before deploying, it's recommended to validate your contract size using `cargo stylus check`:
177
+
178
+ ```bash
179
+ cd packages/stylus/<contract-name>
180
+ cargo stylus check
181
+ ```
182
+
183
+ This command performs several important checks:
184
+
185
+ - **Contract size validation**: Ensures your contract doesn't exceed size limitations
186
+ - **WASM compilation**: Verifies your Rust code compiles to WebAssembly
187
+ - **Deployment hash computation**: Calculates the deployment hash
188
+ - **WASM data fee estimation**: Estimates the cost of deploying your contract
189
+
190
+ **Contract Size Indicators:**
191
+
192
+ - 🔴 **Red indicator**: Contract size exceeds limitations - **DO NOT DEPLOY**
193
+ - 🟡 **Yellow/🟢 Green indicator**: Contract size within acceptable limits - **OK to deploy**
194
+
195
+ > **Important:** When using constructors, error logs from constructor execution may not be visible. Consider using `initialize()` functions instead for better error visibility.
196
+
197
+ ### Step 3: Deploy Your Contract
165
198
 
166
199
  ```bash
167
200
  yarn deploy [...options]
@@ -221,6 +254,14 @@ To deploy your contracts to other networks (other than the default local Nitro d
221
254
  targetNetworks: [chains.arbitrumSepolia],
222
255
  ```
223
256
 
257
+ ### Arbitrum Testnet Faucets (Optional)
258
+
259
+ For Arbitrum testnets, you may need testnet ETH to deploy contracts. You can obtain testnet tokens from these faucets:
260
+
261
+ - [Chainlink Faucet](https://faucets.chain.link/arbitrum-sepolia)
262
+ - [QuickNode Faucet](https://faucet.quicknode.com/arbitrum/sepolia)
263
+ - [Alchemy Faucet](https://sepoliafaucet.com/)
264
+
224
265
  ### Available Networks
225
266
 
226
267
  This template supports Arbitrum networks only. You can test which networks are available and their RPC URLs: