> ## 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.

# Virtual Environments पर Transactions भेजना

> JSON-RPC के माध्यम से Virtual Environment पर signed और unsigned transactions भेजें, और Admin RPC cheatcodes के साथ accounts को fund करें।

Virtual Environments आपको virtual network पर transactions भेजने की अनुमति देते हैं। Transactions भेजने की प्रक्रिया real network पर transactions भेजने के समान है।

Transactions Dashboard UI के माध्यम से या RPC के माध्यम से भेजे जा सकते हैं। यह पेज आपको दोनों तरीकों का उपयोग करके ऐसा करने का तरीका दिखाता है।

## RPC के माध्यम से भेजना

अपने Virtual Environment पर transactions भेजने के लिए `eth_sendRawTransaction` RPC मेथड का उपयोग करें।

नीचे दिया गया उदाहरण आपको Viem, Ethers.js और cURL command का उपयोग करके transaction भेजने का तरीका दिखाता है। code snippets को बिना बदलाव के चलाया जा सकता है।

<Tabs>
  <Tab title="Shell">
    ```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
    curl $TENDERLY_VIRTUAL_TESTNET_RPC \
        -X POST \
        -H "Content-Type: application/json" \
        -d '{
              "jsonrpc": "2.0",
              "id": 0,
              "method": "eth_sendRawTransaction",
              "params": [
                "0x095ea7b300000000000000000000000040bdb4497614bae1a67061ee20aade3c2067ac9e00000000000000000000000000000000000000000000000000000000000186a0"
              ]
        }'
    ```
  </Tab>

  <Tab title="virtual-environments/src/viem-send-tx.ts">
    Viem integration पर अधिक विवरण [इस गाइड](/virtual-environments/libraries/viem) को पढ़कर प्राप्त करें।

    ```typescript showLineNumbers title="virtual-environments/src/viem-send-tx.ts" lines={2,4, 17, 23} theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}

    const EXPLORER_BASE_URL = vMainnet.blockExplorers.default;

    const account = privateKeyToAccount(generatePrivateKey());

    (async () => {
      const client = createWalletClient({
        account,
        chain: vMainnet,
        transport: http(vMainnet.rpcUrls.default.http[0]),
      });

      await tenderlySetBalance(client, [
        [account.address],
        "0xDE0B6B3A7640000",
      ]);


      const tx = await client.sendTransaction({
        to: "0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC",
        value: parseEther("0.01"),
      });

      console.log(`${EXPLORER_BASE_URL}/tx/${tx}`);
    })();
    ```
  </Tab>

  <Tab title="send-tx.ts">
    Ethers integration पर अधिक विवरण [इस गाइड](/virtual-environments/libraries/ethers) को पढ़कर प्राप्त करें।

    ```ts title="send-tx.ts" showLineNumbers theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}

    await (async () => {
      const provider = new ethers.JsonRpcProvider(process.env.TENDERLY_VIRTUAL_TESTNET_RPC!);

      const signer = Wallet.fromPhrase(Mnemonic.fromEntropy(ethers.randomBytes(24)).phrase, provider);

      await provider.send("tenderly_setBalance", [
        signer.address,
        "0xDE0B6B3A7640000",
      ]);

      const tx = await signer.sendTransaction({
        to: "0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC",
        value: ethers.parseEther("0.01"),
      });

      console.log(`${process.env.VIRTUAL_MAINNET_EXPLORER!}/tx/${tx.hash}`);
    })();
    ```
  </Tab>
</Tabs>

## Dashboard से भेजना

Dashboard से भेजे गए Transactions Virtual Environment के state में रिकॉर्ड होंगे। इन transactions को **signed होने की आवश्यकता नहीं है** और इन्हें Virtual Environment पर किसी भी address से या किसी भी address पर भेजा जा सकता है।

Explorer view से, **Send Transaction** input form तक पहुँचने के लिए ऊपर दाईं ओर **Send icon** पर क्लिक करें।

[Loom पर देखें →](https://www.loom.com/embed/e376ad4184ab4294b9e0ca57033af568?sid=0cdaf910-aad4-41fc-86a6-6bc678032341)

<Steps>
  ### एक contract चुनें

  **address** field में, DAI stablecoin contract का address पेस्ट करें: `0x6B175474E89094C44Da98b954EedeAC495271d0F`।

  प्राप्त करने वाला contract निम्नलिखित में से कोई भी हो सकता है:

  * Virtual Contract जो [Virtual Environment पर deploy किया गया](/virtual-environments/develop/deploy-contracts) है
  * आपके [Tenderly project](/platform/account/projects/overview) में जोड़ा गया contract
  * network पर कोई भी पहले से मौजूद contract

  ### call data निर्दिष्ट करें

  उन contracts के लिए जो [Tenderly पर verified](/contract-verification/overview) हैं (निजी या सार्वजनिक रूप से) या Etherscan या Blockscout पर सार्वजनिक रूप से verify हैं,
  आप **Choose function and parameters** का उपयोग कर सकते हैं।

  1. **`approve`** function चुनें
  2. वह address पेस्ट करें जिसे आप DAI approve करना चाहते हैं (`0x40BdB4497614bAe1A67061EE20AAdE3c2067AC9e`)
  3. DAI की wei राशि सेट करें जिसे आप approve करना चाहते हैं। उदाहरण के लिए, `10000000000000000000`।

  <Note>Unverified contracts के लिए, आपको **raw input data/calldata** को hex रूप में **दर्ज करना** होगा।</Note>

  ### transaction parameters भरें

  आप निम्न विकल्प भर सकते हैं:

  * **From**: कोई भी account address क्योंकि Virtual Environments पर transactions को signed होने की आवश्यकता नहीं है। `0xbd8daa414fda8a8a129f7035e7496759c5af8570` या कोई भी address जिसे आपने DAI से fund किया है, उपयोग करें।
  * **Gas**: डिफ़ॉल्ट `800000` या इच्छित gas (सीमा) सेट करें
  * **Gas Price**: डिफ़ॉल्ट `0` या एक arbitrary gas price
  * **Value**: डिफ़ॉल्ट `0` या एक arbitrary transaction value निर्दिष्ट करें, जो sender's (**from**) balance से काटा जाएगा।

  <Note>
    Sender accounts को transactions भेजने के लिए पर्याप्त funds की आवश्यकता होती है। Virtual Environments पर transactions भेजने से पहले किसी भी account को किसी भी balance से टॉप-अप करने के लिए [Unlimited Faucet](/virtual-environments/unlimited-faucet) का उपयोग करें।
  </Note>

  ### transaction भेजें

  **Send Transaction** पर क्लिक करें।

  भेजे गए Transactions [Virtual Environment Explorer](/virtual-environments/explorer) में दिखाई देंगे। call trace का निरीक्षण करने, Debugger का उपयोग करके debug करने, या अलग parameters के साथ फिर से simulate करने के लिए transaction पर क्लिक करें।

  <img src="https://mintcdn.com/tenderly/XsEZlaGXYskrtN68/images/testnets/dai-send-tx.png?fit=max&auto=format&n=XsEZlaGXYskrtN68&q=85&s=e87158c2e275276447fb71683b0f03e2" alt="" width="3456" height="2160" data-path="images/testnets/dai-send-tx.png" />
</Steps>

## अगले कदम

* [Simulate a transaction](/virtual-environments/interact/simulate-transactions): Dashboard से या RPC के माध्यम से transaction simulations चलाएं
* [Deploy a smart contract](/virtual-environments/develop/deploy-contracts): smart contracts को deploy और monitor करना शुरू करें
* [Stage dapps](/virtual-environments/ci-cd/stage-dapps): जानें कि अपने dapp के UI से Virtual Environment को कैसे कनेक्ट करें
* Tenderly Debugger का उपयोग करके [transactions debug करें](/virtual-environments/develop/debug-transactions)।
