मुख्य सामग्री पर जाएं
Tenderly Simulator landing page showing the Simulate transaction button and three feature cards: Unlock the blockchain, Inspect and debug errors, Integrate in your dapp
Tenderly Simulator आपको कुछ भी broadcast किए बिना live mainnet या testnet state के विरुद्ध transactions चलाने देता है। आप किसी भी sender के रूप में simulate कर सकते हैं, contract storage को override कर सकते हैं, addresses को fund कर सकते हैं, और block context में हेरफेर कर सकते हैं, यह सब dashboard से। builder वही है चाहे आप एक transaction चलाएँ या पाँच। एक single simulation एक-step bundle है। एक simulation bundle पाँच तक steps है जो state साझा करते हैं: प्रत्येक step उससे पहले वाले step द्वारा किए गए state परिवर्तनों को देखता है।

Layout

builder में तीन क्षेत्र हैं: Session strip शीर्ष पर चलती है। इसमें defaults होते हैं जो हर step पर लागू होते हैं: Network, Block (डिफ़ॉल्ट Pending), और एक default From address। default gas, gas price, और value सेट करने के लिए Configure पर क्लिक करें। Bundle rail बायाँ column है। प्रत्येक step card एक step number, एक label (contract चुनने तक New call, फिर ContractName · functionName), और run के बाद एक status badge दिखाता है। एक step पर focus करने के लिए क्लिक करें। पुनर्क्रमित करने के लिए ड्रैग करें। एक step जोड़ने के लिए C, steps के बीच जाने के लिए J/K, और focus mode टॉगल करने के लिए F का उपयोग करें। Focused step view दायाँ column है। चलाने से पहले, यह step editor दिखाता है। चलाने के बाद, यह उस step का परिणाम दिखाता है: decoded output, gas used, events, state परिवर्तन, और token transfers।

Single simulations

एक single simulation चलाने के लिए, डिफ़ॉल्ट रूप से खुलने वाले एक step के साथ काम करें। Decoded mode आपको नाम से contract और function चुनने देता है:
FieldNotes
Fromsession From पर डिफ़ॉल्ट। प्रति step override करें।
ContractProject contracts पहले सामने आते हैं। नाम, symbol, या address द्वारा public contracts और top tokens से भी मेल खाता है।
Functionnon-event, non-constructor methods पर फ़िल्टर किया गया।
Parametersप्रति ABI argument एक typed input।
Raw mode एक target address और सीधे 0x-prefixed hex payload लेता है। यह उपयोगी है जब आपके पास किसी मौजूदा transaction से calldata हो या मैन्युअल encode हो। चलाने के लिए Simulate पर क्लिक करें (या ⌘↵ दबाएँ)। दायाँ पैनल परिणाम से भर जाता है: function call सारांश, gas used, decoded output, और Events, State Changes, Fund Flow, और Gas Profiler के लिए tabs। आप एक मौजूदा transaction से भी शुरू कर सकते हैं: इसके inputs को builder में load करने के लिए किसी भी transaction detail पेज पर Re-Simulate पर क्लिक करें। simulation डिफ़ॉल्ट रूप से मूल के block और timestamp पर चलता है। पूर्व-भरे form को साझा करने के लिए (उदाहरण के लिए CI या test report से), पेज header में Copy draft link पर क्लिक करें, या link स्वयं बनाएँ। Prefill the Simulator with a draft link देखें।

Simulation bundles

एक bundle पाँच steps तक क्रम में चलता है, state साझा करता है। एक bundle का उपयोग तब करें जब एक transaction का परिणाम पिछले पर निर्भर करता है, उदाहरण के लिए, एक approval जो बाद के transfer को सक्षम करता है। Steps rail में जोड़े और पुनर्क्रमित किए जाते हैं, प्रत्येक के अपने From override और cheatcodes के साथ, और पूरा bundle Simulate के एक क्लिक से execute होता है। बनाने, पुनर्क्रमित करने, result badges, और simulation इतिहास में bundles कैसे दिखाई देते हैं, इसके लिए Simulation Bundles देखें।
New Simulation builder showing session strip with network and block selectors, transaction parameters (From, Contract, Function), and collapsed cheatcode sections for Override gas, Fund address, Increase block, Override timestamp, State overrides, and Optional Access Lists

Cheatcodes

प्रत्येक step में cheatcodes का एक सेट होता है (add-ons जो step execute होने से ठीक पहले चलते हैं)। वे single simulations (step-स्तर controls के रूप में) और bundle में प्रत्येक step दोनों पर लागू होते हैं।
Cheatcodeयह क्या करता है
Override gas & valueइस step के लिए एक custom gas limit और ETH value सेट करें।
Fund addressइस step के चलने से पहले किसी भी address को token balances के साथ credit करें। प्रति step कई entries जोड़ें।
Increase blockइस step से पहले block number को एक निश्चित मात्रा से आगे बढ़ाएँ।
Override timestampइस step के लिए एक custom block timestamp सेट करें।
State overridesइस step से पहले contract storage slots, balance, या bytecode को override करें। कई contracts के लिए overrides जोड़ें।
Optional Access Listsmulti-contract calls पर gas दक्षता के लिए एक EIP-2930 access list संलग्न करें।
Step editor showing Fund address, Override timestamp, and State overrides cheatcodes expanded
storage slot गणना सहित state overrides के विस्तृत walkthrough के लिए, Simulation with State Overrides देखें।

यह भी देखें

  • Simulation Bundles: shared state के साथ multi-step simulations, 3-step DAI mint, approve, और transferFrom गाइड सहित।
  • Simulation Mode: persistent wallet impersonation जो आपके साथ dashboard में चलता है और runs में state जमा करता है।
  • Simulation with State Overrides: storage, balance, और bytecode को override कैसे करें।
  • Simulation Parameters: session defaults, block और transaction index selection, From addresses, और cheatcode fields के लिए पूर्ण reference।
  • Prefill the Simulator with a draft link: CI या tooling से साझा करने के लिए, पूर्व-भरे form के साथ Simulator खोलने वाला एक base64url URL बनाएँ।
  • Editing Contract Source: संशोधित source code के विरुद्ध simulation चलाकर एक bug fix का परीक्षण करें।
  • Bundled Simulations (API): simulate-bundle endpoint के माध्यम से bundles को programmatically चलाएँ।
  • Virtual Environments: जब आपको एक stateless bundle के बजाय एक पूर्ण persistent RPC environment की आवश्यकता हो।