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

Return information about contract #1827

Open
alex-pakalniskis opened this issue Dec 12, 2024 Discussed in #1826 · 0 comments
Open

Return information about contract #1827

alex-pakalniskis opened this issue Dec 12, 2024 Discussed in #1826 · 0 comments
Labels
enhancement New feature or request

Comments

@alex-pakalniskis
Copy link
Collaborator

alex-pakalniskis commented Dec 12, 2024

User request

Add a Graph CLI command to return information about a smart contract in human-readable format. Include data such as:

  • start block
  • ABI, if available
  • source code, if available
  • all chains where this contract is deployed, if available
  • Is it a proxy?
  • list events & event signatures from smart contract
  • history of upgrades

By default, return data in terminal but enable users to save data to file.

Example commands

graph contract <0x...> <network> # returns start block, ABI, source code, & chains list
graph contract <0x...> <network> --save-abi abiFile.json # save ABI to file
graph contract <0x...> <network> --save-code Contract.sol # save source code to file
graph contract <0x...> <network> --save-chains chains.json # save list of chains where contract is deployed
graph contract <0x...> <network> --save # save ABI, source code, and chains list to file
@alex-pakalniskis alex-pakalniskis added the enhancement New feature or request label Dec 12, 2024
@alex-pakalniskis alex-pakalniskis moved this to 🔖 Next in Tooling Dec 12, 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

1 participant