Skip to main content
यह ट्यूटोरियल Foundry में एक modular cheatcode playground बनाता है। आप एक ही contract को Virtual Environment पर deploy करते हैं, फिर transactions के अंदर से हर Solidity precompile cheatcode का अभ्यास करने के लिए इसके functions को cast send के साथ कॉल करते हैं।

आप क्या बनाएंगे

तीन files:
  • src/IVnetPrecompile.sol: precompile interface।
  • src/MyTestSetup.sol: एक playground contract। प्रत्येक function एक precompile call को wrap करता है, इसलिए आप एक बार deploy करते हैं और एक बार में state के एक टुकड़े को manipulate करने के लिए individual functions को कॉल करते हैं।
  • script/Deploy.s.sol: एक forge script deploy।

Function map

पूर्वापेक्षाएँ

  • एक project के साथ Tenderly account।
  • Foundry स्थापित (curl -L https://foundry.paradigm.xyz | bash && foundryup)।

यह भी देखें

  • Solidity Cheatcodes reference, पूर्ण interface परिभाषा और function table।
  • Admin RPC, JSON-RPC के माध्यम से transaction के बाहर से state manipulation।