Sending via RPC
Use theeth_sendRawTransaction RPC method to send transactions to your Virtual Environment.
The example below shows you how to send a transaction using Viem, Ethers.js and the cURL command. The code snippets are runnable without changes.
- Shell
- virtual-environments/src/viem-send-tx.ts
- send-tx.ts
Sending from the Dashboard
Transactions sent from the Dashboard will be recorded in the Virtual Environment’s state. These transactions do not need to be signed and can be sent to and from any address on the Virtual Environment. From the Explorer view, click on the Send icon from the top right to access the Send Transaction input form. Watch on Loom →In the address field, paste the address of the DAI stablecoin contract:
0x6B175474E89094C44Da98b954EedeAC495271d0F.For contracts that are verified on Tenderly (privately or publicly) or publicly on Etherscan or Blockscout,
you can use the Choose function and parameters.
approve function0x40BdB4497614bAe1A67061EE20AAdE3c2067AC9e)10000000000000000000.0xbd8daa414fda8a8a129f7035e7496759c5af8570 or any address you funded with DAI.800000 or set the desired gas (limit)0 or an arbitrary gas price0 or specify an arbitrary transaction value, that will be deducted from the sender’s (from) balance.Sender accounts need to have sufficient funds to send transactions. Use the Unlimited Faucet to top up any account with any balance before sending transactions on Virtual Environments.
Sent transactions will appear in the Virtual Environment Explorer. Click on the transaction to inspect the call trace, debug using Debugger, or re-simulate with different parameters.
Next steps
- Simulate a transaction: Run transaction simulations from the Dashboard or via RPC
- Deploy a smart contract: Start deploying and monitoring smart contracts
- Stage dapps: Learn how to connect the Virtual Environment to you dapp’s UI
- Debug transactions by using Tenderly Debugger.