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

# Proxy Contracts

> Tenderly में proxy contracts इम्पोर्ट करें, उनके implementation और ऐतिहासिक destinations देखें, और non-standard contracts को proxies में बदलें।

<Note>
  जब आप किसी proxy contract के साथ transaction का simulation करते हैं, तो Tenderly आसान [debugging and editing
  code](/debugger/overview) के लिए proxy और उस contract दोनों के सभी functions दिखाएगा जिस पर वह delegate करता है।
</Note>

<img src="https://mintcdn.com/tenderly/XsEZlaGXYskrtN68/images/Screenshot%202021-10-14%20at%2016.17.04.webp?fit=max&auto=format&n=XsEZlaGXYskrtN68&q=85&s=aeea939cb83ff93c6ab1b4cd8bdcea0d" alt="" width="2880" height="1306" data-path="images/Screenshot 2021-10-14 at 16.17.04.webp" />

Proxy contract में मूल रूप से केवल एक variable होता है, जो आपकी transaction को forward करने के लिए destination address होता है। इनका उपयोग मुख्य रूप से contract versioning या bug fixes को आसान बनाने के लिए किया जाता है, जहाँ यदि आप अपने smart contract को बदलना चाहते हैं तो आप dependencies की चिंता किए बिना एक नई deployment कर सकते हैं, और बस अपने proxy contract में delivery address को नए अपडेट किए गए contract में बदल सकते हैं।

आप standard flow के माध्यम से किसी भी contract को इम्पोर्ट कर सकते हैं:

<img src="https://mintcdn.com/tenderly/XsEZlaGXYskrtN68/images/Screenshot%202021-10-14%20at%2016.23.09.webp?fit=max&auto=format&n=XsEZlaGXYskrtN68&q=85&s=fd02bef92cebc285a2e36c341f44b965" alt="" width="2880" height="1306" data-path="images/Screenshot 2021-10-14 at 16.23.09.webp" />

Tenderly स्वचालित रूप से proxy contract का पता लगा लेगा और आपको इसका latest implementation भी जोड़ने का विकल्प देगा:

<img src="https://mintcdn.com/tenderly/XsEZlaGXYskrtN68/images/Screenshot%202021-10-14%20at%2016.24.23.webp?fit=max&auto=format&n=XsEZlaGXYskrtN68&q=85&s=0c0f6cc012c13fc439e397527d17ad0b" alt="" width="2880" height="1230" data-path="images/Screenshot 2021-10-14 at 16.24.23.webp" />

<img src="https://mintcdn.com/tenderly/XsEZlaGXYskrtN68/images/Screenshot%202021-10-14%20at%2016.25.05.webp?fit=max&auto=format&n=XsEZlaGXYskrtN68&q=85&s=c591dfc680eac559f90d84a2f5334bc6" alt="" width="2880" height="1230" data-path="images/Screenshot 2021-10-14 at 16.25.05.webp" />

<img src="https://mintcdn.com/tenderly/XsEZlaGXYskrtN68/images/Screenshot%202021-10-14%20at%2016.25.42.webp?fit=max&auto=format&n=XsEZlaGXYskrtN68&q=85&s=5e172dbf4a714e0ddc35f47b6a9b7544" alt="" width="2880" height="1230" data-path="images/Screenshot 2021-10-14 at 16.25.42.webp" />

आप अपने proxy contract के लिए सेट किए गए सभी पिछले (ऐतिहासिक) destinations भी देख सकेंगे:

<img src="https://mintcdn.com/tenderly/XsEZlaGXYskrtN68/images/Screenshot%202021-10-14%20at%2016.26.29.webp?fit=max&auto=format&n=XsEZlaGXYskrtN68&q=85&s=3c275cad2a346440fa5a6b2de81bc686" alt="" width="2880" height="1230" data-path="images/Screenshot 2021-10-14 at 16.26.29.webp" />

इसके अतिरिक्त, यदि आपका contract proxy के रूप में उपयोग किया जाना है लेकिन वर्तमान industry standards द्वारा परिभाषित नहीं है, तो आप किसी भी contract को proxy contract में बदल सकते हैं:

<img src="https://mintcdn.com/tenderly/XsEZlaGXYskrtN68/images/Screenshot%202021-10-14%20at%2016.28.13.webp?fit=max&auto=format&n=XsEZlaGXYskrtN68&q=85&s=b6bc4a32c37215bbcf6ecad6e7c576ab" alt="" width="2880" height="1230" data-path="images/Screenshot 2021-10-14 at 16.28.13.webp" />

यदि आप एक proxy contract इम्पोर्ट कर रहे हैं जो उन दो industry standards में से किसी एक के अनुरूप नहीं है जिसे Tenderly स्वचालित रूप से पहचानता है (EIP-1967 और EIP-1167), तो आप अब आसानी से उस proxy contract को Tenderly द्वारा पहचाने जाने के लिए बदल सकते हैं।

यदि आप ऊपर उल्लिखित दो के अलावा एक अलग standard का उपयोग कर रहे हैं, तो आप अपने contract पर परिभाषित एक view function प्रदान कर सकते हैं जो implementation address लौटाता है। आप इस contract को Proxy में बदलने के लिए implementation address वाले storage [slot](https://docs.soliditylang.org/en/v0.8.11/internals/layout_in_storage.html#layout-of-state-variables-in-storage) को मैन्युअल रूप से सेट भी कर सकते हैं।

<img src="https://mintcdn.com/tenderly/XsEZlaGXYskrtN68/images/Screenshot%202022-04-14%20at%2013.42.06.webp?fit=max&auto=format&n=XsEZlaGXYskrtN68&q=85&s=baf27e8d2ec58c54d5a678e9feaecdcb" alt="" width="2556" height="977" data-path="images/Screenshot 2022-04-14 at 13.42.06.webp" />

Tenderly उन सभी functions को सूचीबद्ध करेगा जो parameters के बिना हैं और जो `address` को अपने return type के रूप में लौटाते हैं, ताकि आप एक function चुन सकें जो proxied contract के लिए implementation लौटाता है। आप वह account भी चुन सकते हैं जिससे यह transaction भेजा जाएगा, जो महत्वपूर्ण है यदि आपके द्वारा चुने गए proxy contract function के कुछ विशिष्ट execution नियम हैं (उदा., वे addresses जिनसे इसे कॉल किया जा सकता है)।

<img src="https://mintcdn.com/tenderly/XsEZlaGXYskrtN68/images/Screenshot%202022-04-14%20at%2013.45.17.webp?fit=max&auto=format&n=XsEZlaGXYskrtN68&q=85&s=b6f06b95e94a9043320c93f1c102e7d5" alt="" width="2556" height="977" data-path="images/Screenshot 2022-04-14 at 13.45.17.webp" />

<img src="https://mintcdn.com/tenderly/XsEZlaGXYskrtN68/images/Screenshot%202022-04-14%20at%2013.50.05.webp?fit=max&auto=format&n=XsEZlaGXYskrtN68&q=85&s=3e8bb80f25d8ae4f87ee1fca78c85042" alt="" width="2556" height="977" data-path="images/Screenshot 2022-04-14 at 13.50.05.webp" />

यदि यह आपका पसंदीदा तरीका है तो आप अभी भी `use storage slot` switch को चालू करके अपने proxy contracts को इम्पोर्ट करने के लिए implementation slot hash का उपयोग कर सकते हैं।
