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.
联系支持
了解如何通过 HTTPS 或 WebSocket 将 ethers.js v6 或 v5 连接到 Tenderly Node RPC:使用 JsonRpcProvider 与 WebSocketProvider 在多个 EVM 网络上查询链上数据、发送交易,并调用 tenderly_ 方法跟踪与模拟交易。
// Installation Instructions: https://docs.ethers.org/v6/getting-started/ import { ethers } from "ethers"; const RPC_URL = `https://mainnet.gateway.tenderly.co/${process.env.TENDERLY_NODE_ACCESS_KEY}` async function executeMethod() { // Initialize an ethers provider instance const provider = new ethers.JsonRpcProvider(RPC_URL); const blockNumber = await provider.getBlockNumber(); console.log(blockNumber); } await executeMethod();
// Installation Instructions: https://docs.ethers.org/v5/getting-started/ import { ethers } from "ethers"; const RPC_URL = `https://mainnet.gateway.tenderly.co/${process.env.TENDERLY_NODE_ACCESS_KEY}` async function executeMethod() { // Initialize an ethers provider instance const provider = new ethers.providers.JsonRpcProvider(RPC_URL); const blockNumber = await provider.getBlockNumber(); console.log(blockNumber); } await executeMethod();
eth_*
tenderly_simulateTransaction
// Installation Instructions: https://docs.ethers.org/v6/getting-started/ import { ethers } from "ethers"; const RPC_URL_WSS = `wss://mainnet.gateway.tenderly.co/${process.env.TENDERLY_NODE_ACCESS_KEY}` async function executeMethod() { // Initialize an ethers provider instance const provider = new ethers.WebSocketProvider(RPC_URL_WSS); const blockNumber = await provider.getBlockNumber(); console.log(blockNumber); } await executeMethod();
// Installation Instructions: https://docs.ethers.org/v5/getting-started/ import { ethers } from "ethers"; const RPC_URL_WSS = `wss://mainnet.gateway.tenderly.co/${process.env.TENDERLY_NODE_ACCESS_KEY}` async function executeMethod() { // Initialize an ethers provider instance const provider = new ethers.providers.WebSocketProvider(RPC_URL_WSS); const blockNumber = await provider.getBlockNumber(); console.log(blockNumber); } await executeMethod();