Skip to content

Commit

Permalink
Adding the 721 and 1155 contract impl to the Upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
oveddan committed Jan 11, 2024
1 parent dd90785 commit dc2e364
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ type Upgrade @entity {

impl: Bytes
version: String!
creatorContractImpl: Bytes
type: String
}

Expand Down
3 changes: 3 additions & 0 deletions src/ERC1155Mappings/factoryMappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ export function handle1155FactoryUpgraded(event: Upgraded): void {
upgrade.timestamp = event.block.timestamp;
upgrade.impl = event.params.implementation;
upgrade.version = creator.contractVersion();
// zora1155Impl didn't exist on all versions of the contract, so this
// handles the case it doesnt exist.
upgrade.creatorContractImpl = creator.try_zora1155Impl().value;
upgrade.address = event.address;
upgrade.type = "1155Factory";

Expand Down
1 change: 1 addition & 0 deletions src/ERC721Mappings/ERC721FactoryMappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export function handleFactoryUpgraded(event: Upgraded): void {
upgrade.timestamp = event.block.timestamp;
upgrade.impl = event.params.implementation;
upgrade.version = creator.contractVersion().toString();
upgrade.creatorContractImpl = creator.implementation();
upgrade.address = event.address;
upgrade.type = "721Factory";

Expand Down

0 comments on commit dc2e364

Please sign in to comment.