---
name: warren-deploy-7ac92a00ed06
description: Deploy websites and files permanently on MegaETH mainnet using SSTORE2. Agents use their own wallet and pay gas.
metadata: {"openclaw":{"emoji":"⛓️","homepage":"https://thewarren.app","requires":{"anyBins":["node"]}}}
user-invocable: true
---

# Warren - On-Chain Website Deployment

Deploy websites and files permanently on MegaETH mainnet.

**Network**: MegaETH Mainnet (Chain ID: 4326)
**RPC**: `https://mainnet.megaeth.com/rpc`
**Explorer**: https://megaeth.blockscout.com

## Setup (One Time)

```bash
cd {baseDir}
bash setup.sh
```

## Contract Addresses (Mainnet)

| Contract | Address |
|----------|---------|
| Genesis Key NFT (0xRabbitNeo) | `0x0d7BB250fc06f0073F0882E3Bf56728A948C5a88` |
| 0xRabbit.agent Key NFT | `0x3f0CAbd6AB0a318f67aAA7af5F774750ec2461f2` |
| MasterNFT Registry | `0xb7f14622ea97b26524BE743Ab6D9FA519Afbe756` |

## Prerequisites

### 1. Create a Wallet

```bash
node -e "const w = require('ethers').Wallet.createRandom(); console.log('Address:', w.address); console.log('Private Key:', w.privateKey)"
```

Set the private key:

```bash
export PRIVATE_KEY=0xYourPrivateKey
```

### 2. Get MegaETH ETH

You need real ETH on MegaETH mainnet for gas fees.

- Bridge ETH from Ethereum via the official MegaETH bridge.
- Approximate cost: ~0.001 ETH per site deploy.

Check balance:

```bash
node -e "const{ethers}=require('ethers');new ethers.JsonRpcProvider('https://mainnet.megaeth.com/rpc',4326).getBalance('$YOUR_ADDRESS').then(b=>console.log(ethers.formatEther(b),'ETH'))"
```

### 3. Genesis Access Requirement

The deploy script checks access in this order:

1. Human Genesis Key (0xRabbitNeo) ownership
2. 0xRabbit.agent Key ownership
3. If missing, auto-mint 0xRabbit.agent Key (free)

Default `RABBIT_AGENT_ADDRESS`: `0x3f0CAbd6AB0a318f67aAA7af5F774750ec2461f2` (override via env).
If you override or unset it, mint a human key manually at:

- https://thewarren.app/mint

## Deploy

### Deploy HTML string

```bash
cd {baseDir}
PRIVATE_KEY=0x... node deploy.js \
  --html "<html><body><h1>Hello Warren!</h1></body></html>" \
  --name "My First Site"
```

### Deploy HTML file

```bash
PRIVATE_KEY=0x... node deploy.js \
  --file ./my-site.html \
  --name "My Website"
```

### Deploy via stdin

```bash
echo "<h1>Hello</h1>" | PRIVATE_KEY=0x... node deploy.js --name "Piped"
```

### CLI Options

```
--private-key <key>   Wallet private key (or PRIVATE_KEY env)
--html <string>       HTML content to deploy
--file <path>         Path to file to deploy
--name <name>         Site name (default: "Untitled")
--type <type>         file|image|video|audio|script (default: "file")
```

### Output

```json
{
  "tokenId": 102,
  "rootChunk": "0x019E5E...",
  "depth": 0,
  "url": "https://thewarren.app/v/site=102"
}
```

## Example Workflows

### Quick deploy loop

```bash
cd {baseDir}
for i in $(seq 1 5); do
  HTML="<html><body><h1>Site #$i</h1><p>$(date)</p></body></html>"
  PRIVATE_KEY=0x... node deploy.js --html "$HTML" --name "Site $i"
  sleep 2
done
```

### Deploy a larger site (~50KB)

```bash
python3 -c "
html = '<html><body>'
for i in range(1000):
    html += f'<p>Paragraph {i}: Lorem ipsum dolor sit amet</p>'
html += '</body></html>'
print(html)
" > large-site.html

PRIVATE_KEY=0x... node deploy.js --file large-site.html --name "Large Site"
```

## View Sites

```
https://thewarren.app/v/site={TOKEN_ID}
```

## Troubleshooting

**"No ETH balance"**
- Bridge ETH to MegaETH mainnet and retry.

**"No Genesis Key found and RABBIT_AGENT_ADDRESS is not configured"**
- Set `RABBIT_AGENT_ADDRESS=0x3f0CAbd6AB0a318f67aAA7af5F774750ec2461f2`, or mint human Genesis Key at `https://thewarren.app/mint`.

**"RPC rate limit"**
- The script retries automatically. Add `sleep 5` between repeated deployments.

**Site does not load immediately**
- Wait 10-30 seconds and retry the viewer URL.

## Notes

- Mainnet content is permanent and immutable.
- Max 500KB per deployment.
- Default chunk size is 100KB (`CHUNK_SIZE=100000`).
- You pay gas from your own wallet.


---
Source attribution: kbarbel640-del
Original project: https://github.com/kbarbel640-del/skills/blob/e7e336ac628c3e3bd771aff1aaa469c93778f94a/skills/planetai87/warren-deploy-mainnet/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 clawdbot

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: kbarbel640-del
Original project: https://github.com/kbarbel640-del/skills/blob/e7e336ac628c3e3bd771aff1aaa469c93778f94a/skills/planetai87/warren-deploy-mainnet/SKILL.md
Attribution basis: Source repository record

Fields of work: Development & Engineering, Product Management
Roles: Backend Developer, DevOps / SRE, Frontend Developer, Growth Product Manager, Product Manager
Specialties: API, Backend
Tools: Ethers, Megaeth
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 9af6ed33a1644fc95d9f0067de3c0151ca7087d1130e50e0033129695a32641a
