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 7a4531e commit e8c87ea
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ type Upgrade @entity {
# End – default data block

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

type EditionMetadata @entity {
Expand Down
4 changes: 2 additions & 2 deletions src/ERC1155Mappings/factoryMappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ export function handle1155FactoryUpgraded(event: Upgraded): void {
upgrade.block = event.block.number;
upgrade.timestamp = event.block.timestamp;
upgrade.impl = event.params.implementation;
upgrade.version = creator.contractVersion()
upgrade.version = creator.contractVersion();
upgrade.creatorContractImpl = creator.try_zora1155Impl().value;
upgrade.address = event.address;
upgrade.type = "1155Factory";

// Save required factories.
factory.txn = txn;
Expand Down
2 changes: 2 additions & 0 deletions src/ERC721Mappings/ERC721FactoryMappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ export function handleFactoryUpgraded(event: Upgraded): void {
upgrade.block = event.block.number;
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 e8c87ea

Please sign in to comment.