Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
联系支持
了解如何通过 WebSocket 连接到 Tenderly Virtual Environment,使用 eth_subscribe 和 eth_unsubscribe 方法订阅实时区块与事件更新,为 DEX 等 dapp 降低延迟并消除轮询,适合需要即时数据的应用。
eth_subscribe
eth_unsubscribe
wscat
wscat -c wss://virtual.mainnet.rpc.tenderly.co/$VIRTUAL_TESTNET_ID
{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}
{"id":1,"jsonrpc":"2.0","result":"0x5ab4555c1620e384bfb27d9f3a01c71e"}