开发者
RPC、API 与 P2P。
公共节点支持以太坊 JSON-RPC、若干 PSYROB 方法、只读 JSON 接口以及基于 WebSocket 的 P2P。RPC 中的区块号是选定链的链高度。
网络
| 网络名称 | PSYROB v11 testnet |
|---|---|
| 链 ID | 87870 (0x1573e) |
| 代币符号与小数位 | PSY, 18 |
| RPC | https://rpc.psyrob.com(POST JSON-RPC;浏览器上也可用 /rpc) |
| 浏览器 | https://explorer.psyrob.com |
| P2P | wss://rpc.psyrob.com/p2p(WebSocket;节点通过 --seeds wss://rpc.psyrob.com/p2p 使用它) |
| 创世 | 0x2047c2121a04522ad149832eb5fcd9a43c9f7cbe9bfe2c552f2c0601a133461d(用 npm run genesis:check 检查) |
添加到钱包
| chainId | 0x1573e |
|---|---|
| chainName | PSYROB v11 testnet |
| nativeCurrency | 名称 PSY,符号 PSY,小数位 18 |
| rpcUrls | https://rpc.psyrob.com |
| blockExplorerUrls | https://explorer.psyrob.com |
合约
EVM 采用 Shanghai 规则:使用 evmVersion: "shanghai" 编译合约(不支持瞬态存储和 blob 操作码)。系统合约及其 ABI 见合约和 /api/abi。
示例
curl -s https://rpc.psyrob.com -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'
curl -s https://rpc.psyrob.com -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_getBalance","params":["0x0000000000000000000000000000000000000000","latest"]}'
curl -s https://rpc.psyrob.com -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"psy_dagInfo","params":[]}'
curl -s https://rpc.psyrob.com -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"psy_metrics","params":[8640]}'以太坊方法
eth_accounts eth_blockNumber eth_call eth_chainId eth_estimateGas eth_feeHistory eth_gasPrice eth_getBalance eth_getBlockByHash eth_getBlockByNumber eth_getBlockTransactionCountByNumber eth_getCode eth_getLogs eth_getStorageAt eth_getTransactionByHash eth_getTransactionCount eth_getTransactionReceipt eth_hashrate eth_maxPriorityFeePerGas eth_mining eth_sendRawTransaction eth_syncing net_listening net_peerCount net_version web3_clientVersion
PSYROB 方法
psy_addrman psy_dagInfo psy_finality psy_fundSignatures psy_getBlockTemplate psy_getDagBlock psy_getDagRange psy_metrics psy_mode psy_peers psy_submitBlock psy_supply psy_tips
只读 JSON
| 路径 | 内容 |
|---|---|
/health | 节点状态:链 ID、创世、高度、链尖、对等节点 |
/api/summary | 链尖和最新的链区块 |
/api/dag?n=60 | 最新的 DAG 区块(最多 500 个) |
/api/map | 首页地图数据 |
/api/metrics | 集中度与参与情况 |
/api/mining | 难度、每秒尝试次数、间隔、红色区块比例 |
/api/abi | 系统合约 ABI 与选择器 |
限制
| JSON-RPC | 突发 200 次调用,每个客户端每秒 50 次;eth_call、eth_estimateGas、eth_getLogs 和 psy_getBlockTemplate 突发 20 次,每秒 5 次 |
|---|---|
| 批量 | 最多 100 次调用;请求体最大 1 MiB |
| eth_getLogs | 每次调用最多 10,000 个区块和 10,000 条日志 |
| 页面和 /api | 突发 60 次请求,每个客户端每秒 10 次 |
| 状态 | 仅最新链区块(无历史状态) |