Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions content/docs/vara-eth/build/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Build and deploy your first Vara.eth program in 5 minutes.

# Quick Start

This guide takes you from zero to a deployed program on Vara.eth testnet. You'll create a simple counter program, deploy it to Ethereum Hoodi, and interact with it.
This guide takes you from zero to a deployed program on Vara.eth. You'll create a simple counter program, deploy it to Ethereum, and interact with it.

<Callout type="tip" title="Prefer to learn hands-on?">
Try the **[Interactive Tutorial](https://eth.vara.network/tutorials)** — walk through the full on-chain flow (program creation, funding, message passing, get a reply) step by step, entirely in the browser. Zero local setup required.
Expand Down Expand Up @@ -113,10 +113,12 @@ This produces two artifacts in `target/wasm32-gear/release/`:
- `counter_app.opt.wasm` — the compiled WASM binary
- `counter_app.idl` — the [Interface Definition Language](/docs/developing/build/sails/idl) file describing your program's API

## 4. Deploy to Testnet
## 4. Deploy

Set up your environment:

<Tabs groupId="network" items={['🟡 Testnet (Hoodi)', '🟢 Mainnet']} persist>
<Tab value="🟡 Testnet (Hoodi)" default>
```bash
# Insert your private key (testnet wallet only!)
ethexe key insert <YOUR_PRIVATE_KEY>
Expand All @@ -126,6 +128,18 @@ export RPC="wss://hoodi-reth-rpc.gear-tech.io/ws"
export ROUTER="0xE549b0AfEdA978271FF7E712232B9F7f39A0b060"
export SENDER="<YOUR_WALLET_ADDRESS>"
```
</Tab><Tab value="🟢 Mainnet">
```bash
# Insert your private key
ethexe key insert <YOUR_PRIVATE_KEY>

# Set variables for convenience
export RPC="wss://mainnet-reth-rpc.gear-tech.io/ws"
export ROUTER="0x9C13FE9242dfe2ba2Cd446480A9308279aA74cb6"
export SENDER="<YOUR_WALLET_ADDRESS>"
```
</Tab>
</Tabs>

<Callout type="note" title="Router Address Source">
For the latest network addresses, always check [Contract Addresses](/docs/vara-eth/reference/contract-addresses).
Expand Down
14 changes: 13 additions & 1 deletion content/docs/vara-eth/deploy/upload-validation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,25 @@ Your compiled `.opt.wasm` file is uploaded to Ethereum as an **EIP-4844 blob**

### CLI

<Tabs groupId="network" items={['🟡 Testnet (Hoodi)', '🟢 Mainnet']} persist>
<Tab value="🟡 Testnet (Hoodi)" default>
```bash
ethexe tx upload target/wasm32-gear/release/my_program.opt.wasm \
--watch \
--ethereum-rpc "wss://hoodi-reth-rpc.gear-tech.io/ws" \
--ethereum-router "0xE549b0AfEdA978271FF7E712232B9F7f39A0b060" \
--sender "$SENDER"
```
</Tab><Tab value="🟢 Mainnet">
```bash
ethexe tx upload target/wasm32-gear/release/my_program.opt.wasm \
--watch \
--ethereum-rpc "wss://mainnet-reth-rpc.gear-tech.io/ws" \
--ethereum-router "0x9C13FE9242dfe2ba2Cd446480A9308279aA74cb6" \
--sender "$SENDER"
```
</Tab>
</Tabs>

<Callout type="note" title="CLI First, SDK Optional">
Use `ethexe` CLI as the default and documented upload path.
Expand Down Expand Up @@ -97,4 +109,4 @@ The `CODE_ID` is the unique identifier for your uploaded code:

## Cost

Uploading code costs standard Ethereum gas for the transaction, plus the EIP-4844 blob fee. On testnet, this is free (use [faucet](/docs/vara-eth/setup/wallet-setup) ETH).
Uploading code costs standard Ethereum gas for the transaction, plus the EIP-4844 blob fee. On testnet, use [faucet](/docs/vara-eth/setup/wallet-setup) ETH. On mainnet, standard Ethereum gas fees apply.
2 changes: 1 addition & 1 deletion content/docs/vara-eth/deploy/verify-inspect.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ After deploying your program, verify it on Ethereum block explorers and inspect

### Etherscan

Find your Mirror contract on [Hoodi Etherscan](https://hoodi.etherscan.io). Search by the Mirror address returned during [program creation](/docs/vara-eth/deploy/create-program-instance).
Find your Mirror contract on Etherscan — [Mainnet](https://etherscan.io) or [Hoodi Testnet](https://hoodi.etherscan.io). Search by the Mirror address returned during [program creation](/docs/vara-eth/deploy/create-program-instance).

**Without ABI:**
Base Mirror methods visible — `sendMessage`, `sendReply`, `executableBalanceTopUp`, `claimValue`
Expand Down
31 changes: 0 additions & 31 deletions content/docs/vara-eth/economics/getting-wvara.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,37 +52,6 @@ Validators earn wVARA for:

See [Validators & Staking](/docs/vara-eth/economics/validators-staking) for details.

## Using wVARA

Once you have wVARA, the main uses are:

### Fund a Program

```typescript
// Approve program (Mirror address) to spend wVARA
const wvara = new ethers.Contract(wvaraAddress, erc20Abi, signer);
await wvara.approve(mirrorAddress, parseUnits("100", 18));

// Top up program's Executable Balance
const mirror = new ethers.Contract(mirrorAddress, mirrorAbi, signer);
await mirror.executableBalanceTopUp(parseUnits("100", 18));
```

### Send Message with ETH Value (Optional)

Message value on `sendMessage` is ETH (payable), not wVARA:

```typescript
const mirror = new ethers.Contract(mirrorAddress, mirrorAbi, signer);
await mirror.sendMessage(payload, false, {
value: ethers.parseEther("0.01"),
});
```

### Stake as Validator

Permissionless validator onboarding is not open in the current PoA phase. See [Validators & Staking](/docs/vara-eth/economics/validators-staking) for current status and rollout plans.

## Token Address

| Network | wVARA Address |
Expand Down
8 changes: 4 additions & 4 deletions content/docs/vara-eth/economics/validators-staking.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: How Vara.eth validators work, staking mechanics, and reward distrib
# Validators & Staking

Validators (also called executors) are the nodes that execute Vara.eth programs off-chain and commit results to Ethereum.
The current testnet phase uses a controlled validator set (PoA). Permissionless staking is planned for a later phase.
The network currently uses a controlled validator set (PoA). Permissionless staking is planned for a later phase.

## Role of Validators

Expand Down Expand Up @@ -70,7 +70,7 @@ Exact values are governance-controlled and may change. Check [Network Endpoints]

### Validator Onboarding Status

During the current PoA testnet phase, validator onboarding is not open to the public.
During the current PoA phase, validator onboarding is not open to the public.

The expected permissionless flow (register operator, register vault, run node) will be enabled in later phases once parameters and rollout milestones are announced.

Expand Down Expand Up @@ -168,8 +168,8 @@ As network activity grows (more programs, more messages), the total fee pool gro

## Current Status

<Callout type="note" title="Testnet Phase">
On testnet, the validator set is operated in a controlled PoA mode. Permissionless validation and open staking are planned for future phases.
<Callout type="note" title="PoA Phase">
The network currently operates with a controlled PoA validator set. Permissionless validation and open staking are planned for future phases.
</Callout>

To prepare for mainnet validation:
Expand Down
2 changes: 1 addition & 1 deletion content/docs/vara-eth/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ Read **[Why It Matters](/docs/vara-eth/start-here/why-it-matters)** — see what
---

<Callout type="note">
**Vara.eth is in TestNet.** Contracts, addresses, and examples: [Quick Start](/docs/vara-eth/build/quickstart)
**Vara.eth is live on Mainnet and Testnet.** Contracts, addresses, and examples: [Quick Start](/docs/vara-eth/build/quickstart)
</Callout>
49 changes: 49 additions & 0 deletions content/docs/vara-eth/integrate/backend-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ See [RPC API](/docs/vara-eth/reference/rpc-api) for the full method reference.

Monitor Mirror events via standard Ethereum JSON-RPC:

<Tabs groupId="network" items={['🟡 Testnet (Hoodi)', '🟢 Mainnet']} persist>
<Tab value="🟡 Testnet (Hoodi)" default>
```typescript
import { ethers } from "ethers";

Expand All @@ -80,11 +82,56 @@ mirror.on("Message", (id, destination, payload, value) => {
console.log(`Program sent message to ${destination}`);
});
```
</Tab><Tab value="🟢 Mainnet">
```typescript
import { ethers } from "ethers";

const provider = new ethers.WebSocketProvider(
"wss://mainnet-reth-rpc.gear-tech.io/ws"
);

const mirror = new ethers.Contract(mirrorAddress, mirrorAbi, provider);

mirror.on("StateChanged", (stateHash) => {
console.log(`New state hash: ${stateHash}`);
});

mirror.on("Message", (id, destination, payload, value) => {
console.log(`Program sent message to ${destination}`);
});
```
</Tab>
</Tabs>

### sails-js (Node.js)

Use the typed SDK for server-side operations:

<Tabs groupId="network" items={['🟡 Testnet (Hoodi)', '🟢 Mainnet']} persist>
<Tab value="🟢 Mainnet">
```typescript
import { SailsProgram } from "sails-js";
import { ethers } from "ethers";

const provider = new ethers.JsonRpcProvider(
"https://mainnet-reth-rpc.gear-tech.io"
);
const wallet = new ethers.Wallet(PRIVATE_KEY, provider);

const program = new SailsProgram({
idl: programIdl,
address: mirrorAddress,
provider,
signer: wallet,
});

// Read state (free, no tx)
const balance = await program.token.balanceOf(userAddress);

// Send message (requires ETH for gas)
await program.token.transfer(recipient, amount);
```
</Tab><Tab value="🟡 Testnet (Hoodi)" default>
```typescript
import { SailsProgram } from "sails-js";
import { ethers } from "ethers";
Expand All @@ -107,6 +154,8 @@ const balance = await program.token.balanceOf(userAddress);
// Send message (requires ETH for gas)
await program.token.transfer(recipient, amount);
```
</Tab>
</Tabs>

## Common Backend Patterns

Expand Down
19 changes: 19 additions & 0 deletions content/docs/vara-eth/integrate/frontend-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ This creates a typed client class with methods matching your program's services

### Environment Configuration

<Tabs groupId="network" items={['🟡 Testnet (Hoodi)', '🟢 Mainnet']} persist>
<Tab value="🟡 Testnet (Hoodi)" default>
```typescript title="config.ts"
export const config = {
// Ethereum RPC (Hoodi testnet)
Expand All @@ -75,6 +77,23 @@ export const config = {
programId: "0x...", // Your program's Mirror address
};
```
</Tab><Tab value="🟢 Mainnet">
```typescript title="config.ts"
export const config = {
// Ethereum RPC (Mainnet)
ethRpcHttp: "https://mainnet-reth-rpc.gear-tech.io",
ethRpcWs: "wss://mainnet-reth-rpc.gear-tech.io/ws",

// Vara.eth RPC (for pre-confirmations and state queries)
varaEthWs: "wss://validator-1-eth.vara.network",

// Contract addresses
routerAddress: "0x9C13FE9242dfe2ba2Cd446480A9308279aA74cb6",
programId: "0x...", // Your program's Mirror address
};
```
</Tab>
</Tabs>

<Callout type="note" title="Addresses Change by Network">
Keep addresses in one source of truth: [Contract Addresses](/docs/vara-eth/reference/contract-addresses).
Expand Down
2 changes: 1 addition & 1 deletion content/docs/vara-eth/interact/sending-messages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const { payload: replyPayload, replyCode, value } = await waitForReply;

### Etherscan (with ABI)

If the program was deployed with ABI, navigate to the Mirror on [Etherscan](https://hoodi.etherscan.io), go to "Write as Proxy", and call methods directly.
If the program was deployed with ABI, navigate to the Mirror on [Etherscan](https://etherscan.io) (or [Hoodi Etherscan](https://hoodi.etherscan.io) for testnet), go to "Write as Proxy", and call methods directly.

### From Solidity

Expand Down
Loading
Loading