XUL Chain 是一条 EVM 兼容 的公链,以「简单」为设计哲学。测试网 12310 已经上线,公共 RPC、区块浏览器、水龙头、账户抽象(AA)与创作确权全部开放——下面的一切你现在就能接入测试。
点开下面任意一项,都是已经在跑的实服务,不是占位。
复制下面的参数,或直接用「一键添加网络」的 JSON。
| 项 | 值 |
|---|---|
| 链名称 Network Name | XUL Testnet |
| 链 ID Chain ID | 12310(十六进制 0x3016) |
| RPC 端点 RPC URL | https://scan.xulchain.com/rpc(只读 JSON-RPC,已开放) |
| 区块浏览器 Explorer | https://scan.xulchain.com |
| 水龙头 Faucet | https://xulchain.com/faucet |
| 原生币 Native Token | XUL |
| 共识 Consensus | PoS + BFT(即时终局) |
| 兼容性 EVM | 全兼容 · Solidity / Hardhat / Foundry / ethers 直接可用 |
{
"chainId": "0x3016",
"chainName": "XUL Testnet",
"rpcUrls": ["https://scan.xulchain.com/rpc"],
"nativeCurrency": { "name": "XUL", "symbol": "XUL", "decimals": 18 },
"blockExplorerUrls": ["https://scan.xulchain.com"]
}
# 链 ID(应返回 0x3016)
curl -s -X POST https://scan.xulchain.com/rpc \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'
# 最新区块号
curl -s -X POST https://scan.xulchain.com/rpc \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
把上面两条贴进终端,看到 0x3016 和一个不断增长的区块号,说明你已连上 XUL 测试网。
ERC-4337 范式合约已部署在测试网 12310,可在浏览器直接查看。
| 合约 | 地址 | 用途 |
|---|---|---|
| EntryPoint | 0x844A2be26610b34D19D447Eb642177DaCf66654A 在浏览器查看 → |
账户抽象入口,处理 UserOperation 校验与执行 |
| Account Factory | 0xf11Da939f50b50153e10dA797861B1D483D84114 在浏览器查看 → |
为用户的 EOA 派生对应的智能账户 |
| Paymaster(Gas 赞助) | 0xc30a0B041Ff67A6a469eF09dc77e922e084D4C89 在浏览器查看 → |
为创作确权等场景代付 Gas,实现用户零 Gas 确权 |
| CreationRegistry(确权) | 0xa803b90Ee73703802A56ec82018dA200DD06E4F8 在浏览器查看 → |
登记创作(IPFS CID + 权属),链上确权凭证 |
| Faucet(AA 原生水龙头合约) | 0xC4aE83f5E99d765444D65Cf2F61a08e72fCC2e41 在浏览器查看 → |
AA 原生水龙头合约:① drip() 由用户 SC 钱包经 Paymaster 代付 Gas 0 gas 自领;② dripTo() 受信 relayer 代任意地址领取,线上服务端水龙头走此路径、按地址冷却期限流。drip 100 XUL/次,冷却 1 天。 |
| Faucet(注资 EOA) | 0xcb019017E3Cc5146182cA385713BF52e732b8CA1 在浏览器查看 → |
创世注资账户,向 AA 原生水龙头合约注资;非 AA 合约,仅作资金源 |
把一段文字 / 图片 / 视频确权为链上资产:AI 生成 → IPFS 主权存储 → 链上登记 → Paymaster 赞助实现零 Gas 确权。
内容经 AI 生成后存入 IPFS(主权存储,CID 即内容指纹)。
调用 CreationRegistry 写入 CID + 权属地址,生成确权凭证。
UserOperation 经 Paymaster 代付 Gas,用户无需持币即可确权。
任何人都可在区块浏览器凭地址 / CID 查验权属与时间戳。
import { JsonRpcProvider, Wallet } from "ethers";
// 1) 连接 XUL 测试网
const provider = new JsonRpcProvider("https://scan.xulchain.com/rpc");
const net = await provider.getNetwork();
console.log("chainId =", net.chainId); // 12310n
// 2) 用私钥构造钱包(仅本地签名,勿在前端暴露私钥)
const wallet = new Wallet("0xYOUR_PRIVATE_KEY", provider);
// 3) 查询余额(领完水龙头后应有测试 XUL)
const bal = await provider.getBalance(wallet.address);
console.log("balance =", ethers.formatEther(bal), "XUL");
// 4) 发一笔测试转账
const tx = await wallet.sendTransaction({
to: "0xRecipientAddress",
value: ethers.parseEther("0.01"),
});
console.log("tx sent:", tx.hash);
console.log("explorer:", "https://scan.xulchain.com/tx/" + tx.hash);
XUL 自带 AI 网关,已为官网 AI 对话、生图、SaaS 控制台供能。
curl -s https://xulchain.com/xul-ai-api/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $XUL_API_KEY" \
-d '{
"model": "gpt-4",
"messages": [{"role":"user","content":"用一句话介绍 XUL Chain"}],
"stream": false
}'
API Key 向注册开发者发放;未授权调用会被网关拒绝。鉴权支持 X-API-Key 或 Authorization: Bearer 两种头。模型以标准对话协议兼容的模型别名调用,可用模型清单见开发者控制台。生图 / 视频 endpoint 同构(前缀 /xul-ai-api/),详见控制台文档。