Skip to content

Commit 31464fd

Browse files
committed
tutorials added
1 parent 4d5b23a commit 31464fd

File tree

10 files changed

+387
-657
lines changed

10 files changed

+387
-657
lines changed

docs/index.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
11
---
22
id: index
3-
title: Introducing Status Network
3+
title: Welcome to Status Network
44
slug: /
55
sidebar_position: 1
66
---
77

8-
# Welcome to Status Network
8+
# Status Network: The Gasless Layer 2 Network
99

10-
Welcome to **Status Network**, the crypto social playground that reimagines your blockchain experience! Built as an **EVM-equivalent Ethereum Layer 2 rollup** on [Linea's cutting-edge ZK-EVM technology](https://docs.linea.build/architecture), Status Network offers unique features that set us apart from other platforms.
1110

12-
## What Makes Us Unique?
11+
## Start Building Today
1312

14-
### 💰 Native ETH and DAI Yield
13+
Ready to join the future of decentralized applications? Here's how to get started:
1514

16-
Enjoy sustainable and attractive yields on your **ETH** and **DAI** assets! We offer native yield generation, a distinctive feature among Layer 2 solutions, allowing you to enhance your crypto holdings effortlessly while participating in the network.
15+
1. [Add Status Network to Your Wallet](/general-info/add-status-network)
16+
2. [Get Testnet ETH](/tools/testnet-faucets)
17+
3. [Bridge Assets](/general-info/bridge/bridging-testnet)
18+
4. [Deploy Your First Contract](/tutorials/deploying-contracts/using-remix)
1719

18-
### 🏆 Earn $AURA Tokens
20+
## Support & Resources
1921

20-
Get rewarded for your engagement in **real time**! Participate in network activities and **stake $SNT** to earn **$AURA tokens**. The more you interact—be it through transactions, staking, or community involvement—the more influence you gain within our vibrant community. Your $AURA amplifies your voice in shaping the future of the network.
22+
Connect with our community and access the resources you need:
23+
- Join our [Telegram Builder's Community](https://t.me/+k04A_OZbhIs1Mzc9)
24+
- View [Network Details](/general-info/network-details)
25+
- Browse [Contract Addresses](/general-info/contract-addresses/testnet-contracts)
2126

22-
### 🔒 Privacy with a Playful Twist
23-
24-
Experience privacy features that are both **secure and fun**! We believe that privacy is a fundamental right and should be accessible to everyone without the complexity. Our user-friendly privacy tools make secure interactions enjoyable, breaking away from traditional notions of complicated privacy tech.
25-
26-
---
27-
28-
Join Status Network and be part of a unique, privacy-focused, and rewarding crypto community where **your active participation truly shapes the future**! Let's build the crypto playground together!
27+
Ready to build something amazing? Start your journey with Status Network today!

docs/other/branding-guidelines.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/tokenomics/aura-token.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/tokenomics/karma-token.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# KARMA token

docs/tokenomics/snt-token.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# $SNT Token
1+
# SNT Token
Lines changed: 209 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,209 @@
1-
# Using Foundry
1+
# Using Foundry to Deploy Smart Contracts
2+
3+
This tutorial will guide you through the process of deploying a smart contract on Status Network testnet using Foundry.
4+
5+
## Prerequisites
6+
7+
Before you begin, ensure you have the following:
8+
9+
- **Foundry**: Install from the [official Foundry book](https://book.getfoundry.sh/getting-started/installation)
10+
- **Ethereum Wallet**: A private key for Status Network testnet
11+
- **Testnet ETH**: You'll need Status Network testnet ETH
12+
- Get Status Network testnet ETH from our [Faucet](/tools/testnet-faucets)
13+
- **Basic Knowledge**: Familiarity with Solidity and command line
14+
15+
## What You'll Accomplish
16+
17+
- Initialize a Foundry project
18+
- Write a basic Ethereum smart contract
19+
- Configure Foundry for Status Network testnet deployment
20+
- Deploy your smart contract
21+
22+
## Steps
23+
24+
### 1. Initialize a Foundry Project
25+
26+
First, create a new Foundry project:
27+
28+
```bash
29+
# Create a new project
30+
forge init hello_status
31+
cd hello_status
32+
33+
# Create .env file for private key
34+
touch .env
35+
echo "PRIVATE_KEY=your_private_key_here" >> .env
36+
```
37+
38+
### 2. Writing the Smart Contract
39+
40+
Replace `src/Counter.sol` with our `HelloWorld.sol`:
41+
42+
```solidity
43+
// SPDX-License-Identifier: MIT
44+
pragma solidity ^0.8.24;
45+
46+
contract HelloWorld {
47+
string public greet = "Hello, Status Network!";
48+
49+
function setGreet(string memory _greet) public {
50+
greet = _greet;
51+
}
52+
53+
function getGreet() public view returns (string memory) {
54+
return greet;
55+
}
56+
}
57+
```
58+
59+
### 3. Configure Foundry for Status Network
60+
61+
Create or update `foundry.toml`:
62+
63+
```toml
64+
[profile.default]
65+
src = "src"
66+
out = "out"
67+
libs = ["lib"]
68+
solc = "0.8.24"
69+
70+
[rpc_endpoints]
71+
status_testnet = "https://public.sepolia.rpc.status.network"
72+
```
73+
74+
### 4. Deploy the Contract
75+
76+
Create a deployment script `script/Deploy.s.sol`:
77+
78+
```solidity
79+
// SPDX-License-Identifier: MIT
80+
pragma solidity ^0.8.24;
81+
82+
import "forge-std/Script.sol";
83+
import "../src/HelloWorld.sol";
84+
85+
contract DeployScript is Script {
86+
function run() external {
87+
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
88+
89+
vm.startBroadcast(deployerPrivateKey);
90+
91+
HelloWorld hello = new HelloWorld();
92+
console.log("HelloWorld deployed to:", address(hello));
93+
94+
vm.stopBroadcast();
95+
}
96+
}
97+
```
98+
99+
Deploy using forge:
100+
101+
```bash
102+
# Load environment variables
103+
source .env
104+
105+
# Deploy to Status Network testnet
106+
forge script script/Deploy.s.sol:DeployScript \
107+
--rpc-url https://public.sepolia.rpc.status.network \
108+
--broadcast \
109+
```
110+
111+
### 5. Interact with the Contract
112+
113+
Create a script to interact with your contract `script/Interact.s.sol`:
114+
115+
```solidity
116+
// SPDX-License-Identifier: MIT
117+
pragma solidity ^0.8.24;
118+
119+
import "forge-std/Script.sol";
120+
import "../src/HelloWorld.sol";
121+
122+
contract InteractScript is Script {
123+
function run() external {
124+
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
125+
address contractAddress = address(0x...); // Replace with your contract address
126+
127+
vm.startBroadcast(deployerPrivateKey);
128+
129+
HelloWorld hello = HelloWorld(contractAddress);
130+
131+
// Read current greeting
132+
string memory currentGreeting = hello.getGreet();
133+
console.log("Current greeting:", currentGreeting);
134+
135+
// Update greeting
136+
hello.setGreet("Hello from Foundry!");
137+
138+
vm.stopBroadcast();
139+
}
140+
}
141+
```
142+
143+
Run the interaction script:
144+
145+
```bash
146+
forge script script/Interact.s.sol:InteractScript \
147+
--rpc-url https://public.sepolia.rpc.status.network \
148+
--broadcast
149+
```
150+
151+
### 6. Cast Commands for Quick Interactions
152+
153+
You can also use `cast` to interact with your contract:
154+
155+
```bash
156+
# Read the greeting
157+
cast call <CONTRACT_ADDRESS> "getGreet()" \
158+
--rpc-url https://public.sepolia.rpc.status.network
159+
160+
# Set a new greeting
161+
cast send <CONTRACT_ADDRESS> "setGreet(string)" "New greeting!" \
162+
--private-key $PRIVATE_KEY \
163+
--rpc-url https://public.sepolia.rpc.status.network
164+
```
165+
166+
### 7. Testing
167+
168+
Create a test file `test/HelloWorld.t.sol`:
169+
170+
```solidity
171+
// SPDX-License-Identifier: MIT
172+
pragma solidity ^0.8.24;
173+
174+
import "forge-std/Test.sol";
175+
import "../src/HelloWorld.sol";
176+
177+
contract HelloWorldTest is Test {
178+
HelloWorld hello;
179+
180+
function setUp() public {
181+
hello = new HelloWorld();
182+
}
183+
184+
function testGreeting() public {
185+
assertEq(hello.getGreet(), "Hello, Status Network!");
186+
187+
hello.setGreet("New greeting");
188+
assertEq(hello.getGreet(), "New greeting");
189+
}
190+
}
191+
```
192+
193+
Run the tests:
194+
195+
```bash
196+
forge test
197+
```
198+
199+
## Support
200+
201+
If you encounter any issues:
202+
- Join our [Telegram Community](https://t.me/+k04A_OZbhIs1Mzc9)
203+
- Check [Network Status](https://health.status.network)
204+
- View our [Network Details](/general-info/network-details)
205+
206+
## Additional Resources
207+
208+
- [Foundry Book](https://book.getfoundry.sh/)
209+
- [Status Network Explorer](https://sepoliascan.status.network)

0 commit comments

Comments
 (0)