> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tenderly.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Ethers.js

> जानें कि Node RPC के माध्यम से blockchain network से कनेक्ट करने के लिए Ethers.js का उपयोग कैसे करें।

[Ethers.js](https://docs.ethers.org/v5/) Virtual Environments के साथ इंटरैक्ट करने के लिए एक standalone Typescript/Javascript है।

आप **Public RPC** के माध्यम से कनेक्ट होने पर मानक RPC methods का उपयोग कर सकते हैं, या **Admin RPC** का उपयोग करके कनेक्ट होने पर [Admin RPC](/virtual-environments/admin-rpc) का उपयोग कर सकते हैं।

<Card title="Code samples: Using Ethers with Virtual Environments" href="" />

```typescript title="virtual-environments/src/ethers-6-https.ts" showLineNumbers lines={4-5, 9, 15, 21, 28, 35, 41} theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}

const RPC_URL = process.env.VIRTUAL_MAINNET_RPC_URL || '';
const EXPLORER_BASE_URL = `https://dashboard.tenderly.co/explorer/vnet/${path.basename(RPC_URL)}`;

const provider = new JsonRpcProvider(RPC_URL);
(async () => {
    const ret = await Promise.all([
      provider.send('tenderly_setBalance', [
        ['0x0d2026b3EE6eC71FC6746ADb6311F6d3Ba1C000B', '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'],
        '0xDE0B6B3A7640000',
      ]),

      // USDT
      provider.send('tenderly_setErc20Balance', [
        '0xdAC17F958D2ee523a2206206994597C13D831ec7',
        '0x40BdB4497614bAe1A67061EE20AAdE3c2067AC9e',
        '0xDE0B6B3A7640000',
      ]),

      // DAI
      provider.send('tenderly_setErc20Balance', [
        '0x6B175474E89094C44Da98b954EedeAC495271d0F',
        '0x40BdB4497614bAe1A67061EE20AAdE3c2067AC9e',
        '0xDE0B6B3A7640000',
      ]),
      // Shiba Inu
      provider.send('tenderly_setErc20Balance', [
        '0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE',
        '0x40BdB4497614bAe1A67061EE20AAdE3c2067AC9e',
        '0xDE0B6B3A7640000',
      ]),
    ]);
    console.log('ETH balance, DAI and ShibaInu topups', ret.map(txHash => `${EXPLORER_BASE_URL}/tx/${txHash}`));
  }
)().catch(e => {
  console.error(e);
  process.exitCode = 1;
});
```
