Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Support for Proxy Contracts #1739

Open
schmidsi opened this issue Oct 7, 2024 · 1 comment
Open

[Feature] Support for Proxy Contracts #1739

schmidsi opened this issue Oct 7, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@schmidsi
Copy link
Member

schmidsi commented Oct 7, 2024

Currently, when running graph init and trying to scaffold a subgraph indexing a proxy contract, the CLI is not aware of the implementation contract. This is a big caveat for new devs since often, the first contract they want to index is indeed a proxy.

I think this is solvable at the CLI level: Detect if a contract is a proxy contract and if so, present an option to look at the current implementation contract and get the ABI from it to scaffold out the subgraph entities.

Read more about the Proxy Upgrade Pattern

@schmidsi
Copy link
Member Author

schmidsi commented Oct 7, 2024

graph init
✔ Protocol · ethereum
✔ Product for which to initialize · subgraph-studio
✔ Subgraph slug · test-graph-arb
✔ Directory to create the subgraph in · test-graph-arb
✔ Ethereum network · arbitrum-one
✔ Contract address · 0xec9A7fb6CbC2E41926127929c2dcE6e9c5D33Bec
✔ Fetching ABI from Etherscan
✔ Fetching Start Block
✔ Proxy contract detected. Do you want to load information from implementation at: 
	  0x9B81c7C5A21E65b849FD487540B0A82d3b97b2c7?  · true
✔ Start Block · 173715445

--- 

@alex-pakalniskis alex-pakalniskis added the enhancement New feature or request label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🔖 Next
Development

No branches or pull requests

2 participants