Skip to content

Commit

Permalink
Update Entities.md
Browse files Browse the repository at this point in the history
  • Loading branch information
chidubemokeke authored Oct 23, 2022
1 parent bf85f26 commit a0441df
Showing 1 changed file with 89 additions and 91 deletions.
180 changes: 89 additions & 91 deletions docs/docs/Entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ sidebar_position: 2

# Entities

### Entities for the CryptoPunks Subgraph are all listed below

- [Account](#account)
- [Punk](#punk)
- [Metadata](#metadata)
Expand Down Expand Up @@ -35,79 +33,79 @@ sidebar_position: 2
| Field | Type | Description |
| --------------------- | ------------ | ------------------------------------------------- |
| id | Bytes! | Etherum address |
| punksOwned | [Punk!] | All Punks owned by account |
| bought | [Sale!]! | Purchases by Account |
| nftsOwned | [NFT!]! | All Punks owned by account |
| punksOwned | [Punk!] | All punks owned by account |
| bought | [Sale!]! | Purchases by account |
| nftsOwned | [NFT!]! | All punks owned by account |
| assigned | [Assign!]! | Punks assigned to account (if any) |
| sent | [Transfer!]! | Punk transfers by Account |
| received | [Transfer!]! | Punk transfers to Account |
| bids | [Bid!]! | Query bids by Account |
| asks | [Ask!]! | Punks offered for sale by Account |
| numberOfPunksOwned | BigInt! | Total number of Punks owned by account |
| numberOfPunksAssigned | BigInt! | Total number of Punks assigned to account |
| numberOfTransfers | BigInt! | Total number of transfer by Account |
| numberOfSales | BigInt! | Total number of sales by Account |
| numberOfPurchases | BigInt! | Total number of purchases by Account |
| totalSpent | BigInt! | Total amount spent buying Punks by Account |
| totalEarned | BigInt! | Total amount earned by Account from selling Punks |
| averageAmountSpent | BigInt! | Average amount spent buying Punks by Account |
| sent | [Transfer!]! | Punk transfers by account |
| received | [Transfer!]! | Punk transfers to account |
| bids | [Bid!]! | Query bids by account |
| asks | [Ask!]! | Punks offered for sale by account |
| numberOfPunksOwned | BigInt! | Total number of punks owned by account |
| numberOfPunksAssigned | BigInt! | Total number of punks assigned to account |
| numberOfTransfers | BigInt! | Total number of transfer by account |
| numberOfSales | BigInt! | Total number of sales by account |
| numberOfPurchases | BigInt! | Total number of purchases by account |
| totalSpent | BigInt! | Total amount spent buying punks by account |
| totalEarned | BigInt! | Total amount earned by account from selling punks |
| averageAmountSpent | BigInt! | Average amount spent buying punks by account |
| accountUrl | String! | Account URL |

## Punk

| Field | Type | Description |
| ---------------------- | ---------- | ------------------------------------------------------------------------ |
| id | ID! | Punk ID |
| transferedTo | Account | Account that received Punk |
| assignedTo | Account | Account that claimed Punk |
| purchasedBy | Account | Punk Buyers |
| metadata | MetaData | Punk Metadata |
| contract | Contract | Contract Data |
| tokenId | BigInt! | Punk TokenID |
| owner | Account! | Current owner of Punk |
| wrapped | Boolean! | Wrap Status |
| events | [Event!]! | All Punk events |
| currentAsk | Ask | Current Ask for Punk |
| currentBid | Bid | Current Bid for Punk |
| transferedTo | Account | Account that received punk |
| assignedTo | Account | Account that claimed punk |
| purchasedBy | Account | Punk buyers |
| metadata | MetaData | Punk metadata |
| contract | Contract | Contract data |
| tokenId | BigInt! | Punk tokenID |
| owner | Account! | Current owner of punk |
| wrapped | Boolean! | Wrap status |
| events | [Event!]! | All punk events |
| currentAsk | Ask | Current ask for punk |
| currentBid | Bid | Current bid for punk |
| currentAskCreated | AskCreated | Current AskCreated event |
| currentBidCreated | BidCreated | Current BidCreated event |
| numberOfTransfers | BigInt! | Number of times Punk has been transferred |
| numberOfSales | BigInt! | Number of times Punk was sold |
| numberOfTransfers | BigInt! | Number of times punk has been transferred |
| numberOfSales | BigInt! | Number of times punk was sold |
| currentAskRemoved | AskRemoved | Current AskRemoved event |
| currentBidRemoved | BidRemoved | Current BidRemoved event |
| totalAmountSpentOnPunk | BigInt! | Total amount spent purchasing Punk across OpenSea & Rarible marketplaces |
| averageSalesPrice | BigInt! | Average price for Punk across OpenSea & Rarible marketplaces |
| totalAmountSpentOnPunk | BigInt! | Total amount spent purchasing punk across opensea & rarible marketplaces |
| averageSalesPrice | BigInt! | Average price for punk across opensea & rarible marketplaces |

## MetaData

| Field | Type | Description |
| ----------- | --------- | -------------- |
| id | ID! | Metadata ID |
| tokenId | BigInt! | Punk Token ID |
| tokenURI | String! | URI of Punk |
| image | String | Punk Image |
| svg | String | Punk Svg image |
| tokenId | BigInt! | Punk token ID |
| tokenURI | String! | URI of punk |
| image | String | Punk image |
| svg | String | Punk svg image |
| contractURI | String! | Contract URI |
| punk | Punk! | Punk |
| traits | [Trait!]! | Punk Traits |
| traits | [Trait!]! | Punk traits |

## Trait

| Field | Type | Description |
| ------------ | ------------ | ------------------------------- |
| id | ID! | Trait ID |
| type | TraitType! | Type of Trait |
| metaDatas | [Metadata!]! | Punk Metadata |
| numberOfNfts | BigInt! | Number of Punks with this trait |
| type | TraitType! | Type of trait |
| metaDatas | [Metadata!]! | Punk metadata |
| numberOfNfts | BigInt! | Number of punks with this trait |

## Ask

| Field | Type | Description |
| ------- | -------- | ------------------------------------------------------ |
| id | ID! | Ask ID |
| from | Account! | Account that created Ask |
| open | Boolean! | Open Status of Punk. Asks can be either Open or Closed |
| amount | BigInt! | Ask for Punk in ETH |
| from | Account! | Account that created ask |
| open | Boolean! | Open status of punk. Asks can be either open or closed |
| amount | BigInt! | Ask for punk in ETH |
| nft | NFT | Punk being offered for sale |
| created | Event | Ask created at |
| removed | Event | Ask removed at |
Expand All @@ -118,35 +116,35 @@ sidebar_position: 2
| --------- | ---------- | ------------------------------------------------------ |
| id | ID! | Bid ID |
| from | Account! | Bidder |
| open | Boolean! | Open status of Punk. Bids can be either Open or Closed |
| open | Boolean! | Open status of punk. Bids can be either open or closed |
| amount | BigInt! | Bid amount in ETH |
| nft | NFT | Punk bidded |
| created | Event | Bid created at |
| removed | Event | Bid removed at |
| offerType | offerType! | Type of Offer |
| offerType | offerType! | Type of offer |

## Contract

| Field | Type | Description |
| ----------------- | ------- | ------------------------------------------------ |
| id | ID! | Contract Address |
| symbol | String | Token Symbol |
| name | String | Token Name |
| id | ID! | Contract address |
| symbol | String | Token symbol |
| name | String | Token name |
| totalSupply | BigInt! | Total supply of tokens |
| totalSales | BigInt! | Total number of Punk sales |
| totalAmountTraded | BigInt! | Total Sales in ETH for Punks |
| imageHash | String | The hash of the composite image of all the Punks |
| totalSales | BigInt! | Total number of punk sales |
| totalAmountTraded | BigInt! | Total sales in ETH for punks |
| imageHash | String | The hash of the composite image of all the punks |

## Assign

| Field | Type | Description |
| ----------- | ---------- | --------------------------- |
| id | ID! | Assign ID |
| contract | Contract | Contract Metada |
| contract | Contract | Contract metadata |
| nft | NFT | Punk that was assigned |
| to | Account | Account that claimed Punk |
| to | Account | Account that claimed punk |
| amount | BigInt | Punk amount |
| from | Account | Account that created Assign |
| from | Account | Account that created assign |
| type | EventType! | Event type |
| logNumber | BigInt! | Transaction log number |
| blockNumber | BigInt! | Transaction block number |
Expand Down Expand Up @@ -176,8 +174,8 @@ sidebar_position: 2
| Field | Type | Description |
| ----------- | ---------- | --------------------------- |
| id | ID! | AskCreated ID |
| from | Account | Account that created Assign |
| to | Account | Account that claimed Ask |
| from | Account | Account that created assign |
| to | Account | Account that claimed ask |
| ask | Ask | Punk |
| amount | BigInt | Ask in ETH |
| contract | Contract | Contract metadata |
Expand Down Expand Up @@ -209,39 +207,39 @@ sidebar_position: 2

## BidRemoved

| Field | Type | Description |
| ----------- | ---------- | ---------------------------- |
| id | ID! | BidRemoved ID |
| from | Account | Account that removed bid |
| to | Account | Account |
| bid | bid | Punk bid removed |
| amount | BigInt | Bid that was removed, in ETH |
| contract | Contract | Contract metadata |
| nft | NFT | Punk whose bid was removed |
| logNumber | BigInt! | Transaction log number |
| type | EventType! | Event type |
| blockNumber | BigInt! | Transaction block number |
| blockHash | Bytes! | Event block hash |
| txHash | Bytes! | Event transaction hash |
| timeStamp | BigInt! | Transaction timestamp |
| Field | Type | Description |
| ----------- | ---------- | -------------------------- |
| id | ID! | BidRemoved ID |
| from | Account | Account that removed bid |
| to | Account | Account |
| bid | bid | Punk bid removed |
| amount | BigInt | Bid in ETH |
| contract | Contract | Contract metadata |
| nft | NFT | Punk whose bid was removed |
| logNumber | BigInt! | Transaction log number |
| type | EventType! | Event type |
| blockNumber | BigInt! | Transaction block number |
| blockHash | Bytes! | Event block hash |
| txHash | Bytes! | Event transaction hash |
| timeStamp | BigInt! | Transaction timestamp |

## AskRemoved

| Field | Type | Description |
| ----------- | ---------- | ---------------------------- |
| id | ID! | AskRemoved ID |
| ask | bid | Punk ask removed |
| from | Account | Account that removed Ask |
| to | Account | Account |
| amount | BigInt | Ask that was removed, in ETH |
| contract | Contract | Contract metadata |
| nft | NFT | Punk whose ask was removed |
| logNumber | BigInt! | Transaction log number |
| type | EventType! | Event type |
| blockNumber | BigInt! | Transaction block number |
| blockHash | Bytes! | Event block hash |
| txHash | Bytes! | Event transaction hash |
| timeStamp | BigInt! | Transaction timestamp |
| Field | Type | Description |
| ----------- | ---------- | -------------------------- |
| id | ID! | AskRemoved ID |
| ask | bid | Punk ask removed |
| from | Account | Account that removed ask |
| to | Account | Account |
| amount | BigInt | Ask in ETH |
| contract | Contract | Contract metadata |
| nft | NFT | Punk whose ask was removed |
| logNumber | BigInt! | Transaction log number |
| type | EventType! | Event type |
| blockNumber | BigInt! | Transaction block number |
| blockHash | Bytes! | Event block hash |
| txHash | Bytes! | Event transaction hash |
| timeStamp | BigInt! | Transaction timestamp |

## Transfer

Expand All @@ -267,7 +265,7 @@ sidebar_position: 2
| id | ID! | TxHash + logNumber |
| from | Account | Sender |
| to | Account | Receiver |
| owner | String! | New owner of Punk |
| owner | String! | New owner of punk |
| amount | BigInt | Amount of cToken transferred |
| punkId | String | Punk ID |
| referenceId | String! | Field for storing referenceIDs of other events in the same transaction |
Expand All @@ -281,7 +279,7 @@ sidebar_position: 2
| Field | Type | Description |
| ----------- | ---------- | ------------------------- |
| id | ID! | Wrap ID |
| from | Account | Account that wrapped Punk |
| from | Account | Account that wrapped punk |
| to | Account | Receiver |
| amount | BigInt | Punk amount |
| contract | Contract | Contract metadata |
Expand All @@ -298,7 +296,7 @@ sidebar_position: 2
| Field | Type | Description |
| ----------- | ---------- | --------------------------- |
| id | ID! | Wrap ID |
| from | Account | Account that unwrapped Punk |
| from | Account | Account that unwrapped punk |
| to | Account | Receiver |
| amount | BigInt | Punk amount |
| contract | Contract | Contract metadata |
Expand All @@ -314,8 +312,8 @@ sidebar_position: 2

| Field | Type | Description |
| ----------- | -------- | ----------------------------- |
| id | ID! | Contract Address of UserProxy |
| user | Account! | Account that owns the Proxy |
| id | ID! | Contract address of UserProxy |
| user | Account! | Account that owns the proxy |
| blockNumber | BigInt! | Transaction block number |
| blockHash | Bytes! | Event block hash |
| txHash | Bytes! | Event transaction hash |
Expand Down

0 comments on commit a0441df

Please sign in to comment.