Skip to content

Commit

Permalink
Update schema.graphql (#10525)
Browse files Browse the repository at this point in the history
* Update schema.graphql

Added descriptions to Schema

* Update CLA.txt

CLA agreement

* Update schema.graphql

Made suggested edits

* Update CLA.txt

* Update .clabot

Added user name.

* Update schema.graphql

Made requested changed by @wonderwoman

* Update subgraph/schema.graphql

Co-authored-by: Julien Genestoux <[email protected]>
  • Loading branch information
PaulieB14 and julien51 authored Dec 8, 2022
1 parent 6aff750 commit 334f1c7
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CLA.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,5 @@ and interest in and to Your Contributions.
8. You agree to notify Unlock of any facts or circumstances of
which you become aware that would make these representations
inaccurate in any respect.


32 changes: 32 additions & 0 deletions subgraph/schema.graphql
Original file line number Diff line number Diff line change
@@ -1,43 +1,75 @@
type Lock @entity {
"Unique ID for the Lock object (uses the lock address)"
id: ID!
"Address of the lock"
address: Bytes!
"A descriptive name for a collection of NFTs in this contract"
name: String
"Token symbol"
symbol: String
"Duration is set the on the lock when you deploy and the expiration which is set on each key when they are minted"
expirationDuration: BigInt
"Address of the 'currency' ERC20 contract if the keys are priced using an ERC20"
tokenAddress: Bytes!
"Price of the keys sold by the lock"
price: BigInt!
"An assigned role set on a Lock contract which gives the highest level of permissions to the wallet address set to that role"
lockManagers: [Bytes!]!
"Unlock Protocol version of a minting contract"
version: BigInt!
"Number of keys minted (expired or not)"
totalKeys: BigInt!
"Maximum number of keys for sale"
maxNumberOfKeys: BigInt
"The maximum number of keys allowed for a single address"
maxKeysPerAddress: BigInt
"Refer to key entity"
keys: [Key!] @derivedFrom(field: "lock")
"Which block the lock was created"
createdAtBlock: BigInt
"The timestamp of the block in which the last key was minted"
lastKeyMintedAt: BigInt
}

type Key @entity {
"Unique identifier for a key (combination of lock address and token id)"
id: ID!
"In the Unlock ecosystem, a “Lock” is a smart contract that creates (or “mints”) NFTs"
lock: Lock!
"TokenId for a given key"
tokenId: BigInt!
"The address of the key owner"
owner: Bytes!
"An assigned title set on an Unlock key which gives a specific wallet address authorization to transfer, share or cancel"
manager: Bytes
"Time the key expires"
expiration: BigInt!
"The tokenURI on an NFT is a unique identifier"
tokenURI: String
"Block key was created"
createdAtBlock: BigInt!
"Invoked by a Lock manager to expire the user's key and perform a refund and cancellation of the key"
cancelled: Boolean
}

type UnlockDailyData @entity {
"Day identifier"
id: ID!
"Number of locks deployed on that day"
lockDeployed: BigInt!
"Daily number of keys sold"
keysSold: BigInt!
"Daily number of active locks"
activeLocks: [Bytes!]
"Total value exchanged on the network"
grossNetworkProduct: BigInt!
}

type LockStats @entity {
"Transaction Hash"
id: ID!
"Total locks deployed"
totalLocksDeployed: BigInt!
"Total keys sold"
totalKeysSold: BigInt!
}

0 comments on commit 334f1c7

Please sign in to comment.