# SATU Developer SDKs

SATUCHAIN is EVM-compatible. Most standard EVM SDKs and developer tools work on SATUCHAIN by using the correct RPC endpoint and chain ID.<br>

***

### SATUCHAIN Testnet

Network Name: SATUCHAIN Testnet\
RPC URL: <https://rpc-testnet.satuchain.com>\
Chain ID: 17081945\
Currency Symbol: tSTU\
Block Explorer: <https://testnet.satuchain.com>

***

### JavaScript / TypeScript

#### ethers.js

Install:

```bash
npm i ethers
```

Read latest block:

```js
import { ethers } from "ethers";

const provider = new ethers.JsonRpcProvider("https://rpc-testnet.satuchain.com");
const blockNumber = await provider.getBlockNumber();

console.log("Latest block:", blockNumber);
```

#### viem

Install:

```bash
npm i viem
```

Read latest block:

```js
import { createPublicClient, http } from "viem";

const client = createPublicClient({
  transport: http("https://rpc-testnet.satuchain.com"),
});

const blockNumber = await client.getBlockNumber();
console.log("Latest block:", blockNumber);
```

#### web3.js

Install:

```bash
npm i web3
```

Read latest block:

```js
import Web3 from "web3";

const web3 = new Web3("https://rpc-testnet.satuchain.com");
const blockNumber = await web3.eth.getBlockNumber();

console.log("Latest block:", blockNumber);
```

***

### React Wallet Tooling

#### wagmi + viem (recommended)

Install:

```bash
npm i wagmi viem
```

Optional (WalletConnect):

```bash
npm i @walletconnect/ethereum-provider
```

#### RainbowKit (Wallet UI)

Install:

```bash
npm i @rainbow-me/rainbowkit wagmi viem
```

***

### Smart Contract Tooling

#### Hardhat

Create project:

```bash
mkdir satuchain-hardhat && cd satuchain-hardhat
npm init -y
npm i -D hardhat
npx hardhat init
```

Add common plugins:

```bash
npm i -D @nomicfoundation/hardhat-toolbox dotenv
```

#### Foundry

Install:

```bash
curl -L https://foundry.paradigm.xyz | bash
foundryup
```

Verify:

```bash
forge --version
cast --version
```

#### Remix

Web IDE:\
<https://remix.ethereum.org/>

***

### Standard Contract Libraries

#### OpenZeppelin Contracts

Install:

```bash
npm i @openzeppelin/contracts
```

Usage:

```solidity
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
```

***

### Other Languages (Optional)

#### Python (web3.py)

Install:

```bash
pip install web3
```

Read latest block:

```python
from web3 import Web3

w3 = Web3(Web3.HTTPProvider("https://rpc-testnet.satuchain.com"))
print("Latest block:", w3.eth.block_number)
```

#### .NET (Nethereum)

Install:

```bash
dotnet add package Nethereum.Web3
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://satuchain.gitbook.io/satuchain-docs/developer/satu-developer-sdks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
