Added support for new GNS contract
This release adds support for the new transfer ownership feature for Subgraphs (GNS upgrade), while still remaining backwards compatible via entity duplication.
The GNS upgrade changes the ID of the subgraphs, so we reflect this on the Subgraph
entity, but we keep a duplicate entity for Subgraph
, SubgraphVersion
and NameSignal
entities that were created before the upgrade, so that anyone using the old IDs will still keep working.
Entity changes:
Subgraph
,SubgraphVersion
andNameSignal
:- Added
entityVersion
field. Denotes the entity version, currently only1
and2
are the possible values. A value of1
denotes that the entity is represented with the OLD ID format for subgraphs, a value of2
denotes that the entity is represented with the NEW ID format for subgraphs. - Added
linkedEntity
field. Denotes the duplicate entity (if one exists). All entities that were created before the upgrade will have both aentityVersion: 1
andentityVersion: 2
representation of the same entity, and both will be linked through this field.
- Added
Sugraph
- Added
migrated
field that denotes whether the subgraph has been migrated to the new GNS representation. Once it's migrated it will be represented in the contracts as an NFT that can be transferred, otherwise it won't be possible to transfer ownership yet. - Added
nftID
field. Denotes theBigInt
(decimal base) representation of theSubgraph
ID (ERC721 compatible), since theid
field uses the same bytes but in a base58 representation. - Added
oldID
field. Denotes theid
of the entity represented using the old format. - Added
creatorAddress
field. Denotes the address of theGraphAccount
that created the subgraph. It's used as the first part for the ID for theSubgraph
- Added
subgraphNumber
field. Denotes the sequential number (autoincremental id) used as the second part for the ID of theSubgraph
. - Added
nftImage
field. Denotes the IPFS file used as the image for the NFT for theSubgraph
- Added
ipfsMetadataHash
field. Denotes the metadataHash as an valid IPFS hash (base58 IPFS multihash)
- Added