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

Add upgrade paths subgraph entity #74

Draft
wants to merge 15 commits into
base: add-contract-version-to-upgrade-event
Choose a base branch
from

Conversation

oveddan
Copy link
Contributor

@oveddan oveddan commented Jan 11, 2024

Added subgraph for upgrade paths, that contains a mapping of:
upgrade from address & version <=> upgrade to address & version

this hasn't been tested yet

@oveddan
Copy link
Contributor Author

oveddan commented Jan 11, 2024

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@iainnash
Copy link
Collaborator

What if we added contractName to this entity as well?

function getContractVersion(address: Bytes): ContractVersion {
const contractVersion = new ContractVersion(address);

const versionString = ZoraCreator1155Impl.bind(address).contractVersion();
Copy link
Collaborator

@iainnash iainnash Jan 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try_contractVersion()

also make it optional OR required and just skip the entity when it doesn't exist.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes sense, but it seems like it is not failing when looking for this in the factory handler here so do you think we'd be ok without try since it doesn't fail there?

@oveddan oveddan changed the base branch from add-721-1155-impl-version-to-event to add-contract-version-to-upgrade-event January 12, 2024 17:51
@oveddan oveddan force-pushed the add-upgrade-paths-to-query branch from 66d5e19 to b1a11a1 Compare January 18, 2024 19:50
@iainnash
Copy link
Collaborator

Anything this needs to be able to be merged? Would be a great addition to the subgraph.

@oveddan
Copy link
Contributor Author

oveddan commented Jan 29, 2024

got stuck on an issue:
"Could not find ABI for contract “ZoraCreator1155Impl”, try adding it to the ‘abis’ section of the subgraph manifest"

on the upgradeGate handler, which doesn't make much sense. tabling for now as was able to write a script that got what i needed with subgraph joins and rpc read calls

@oveddan oveddan marked this pull request as draft January 29, 2024 22:04
@iainnash
Copy link
Collaborator

Cool, I'll try to fix that then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants