mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-12-02 05:57:29 +01:00
nft update
This commit is contained in:
parent
b469174136
commit
1868a6219c
@ -58,7 +58,7 @@ type Nft @entity{
|
||||
symbol: String!
|
||||
name: String!
|
||||
tokenUri: String!
|
||||
|
||||
|
||||
"address of the owner of the nft"
|
||||
owner: String!
|
||||
|
||||
@ -410,14 +410,17 @@ type GlobalStats @entity {
|
||||
}
|
||||
|
||||
|
||||
type MetadataUpdate @entity {
|
||||
id: ID! # update tx + datatokenAddress
|
||||
datatoken: Token!
|
||||
type NftUpdate @entity {
|
||||
id: ID! # update tx + nft address
|
||||
datatoken: Nft!
|
||||
|
||||
datatokenAddress: String!
|
||||
"user that made the update"
|
||||
userAddress: String!
|
||||
|
||||
"state of the asset in this update"
|
||||
assetState: Int!
|
||||
|
||||
block: Int!
|
||||
createdTimestamp: Int!
|
||||
timestamp: Int!
|
||||
tx: Bytes!
|
||||
}
|
||||
|
14
src/mappings/nftUpdate.ts
Normal file
14
src/mappings/nftUpdate.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import {
|
||||
MetadataCreated,
|
||||
MetadataState,
|
||||
MetadataUpdated,
|
||||
TokenURIUpdate
|
||||
} from '../@types/templates/ERC721Template/ERC721Template'
|
||||
|
||||
export function handleCreated(event: MetadataCreated): void {}
|
||||
|
||||
export function handleUpdated(event: MetadataUpdated): void {}
|
||||
|
||||
export function handleState(event: MetadataState): void {}
|
||||
|
||||
export function handleUriUpdate(event: TokenURIUpdate): void {}
|
@ -171,6 +171,29 @@ templates:
|
||||
handler: handlerBptTransfer
|
||||
# - event: SWAP_FEES(uint,uint,uint,address)
|
||||
# handler: handlerSwapFees
|
||||
|
||||
- name: ERC721Template
|
||||
kind: ethereum/contract
|
||||
network: barge
|
||||
source:
|
||||
abi: ERC721Template
|
||||
mapping:
|
||||
kind: ethereum/events
|
||||
apiVersion: 0.0.5
|
||||
language: wasm/assemblyscript
|
||||
file: ./src/mappings/nftUpdate.ts
|
||||
entities:
|
||||
- ERC721Template
|
||||
abis:
|
||||
- name: ERC721Template
|
||||
file: ./abis/ERC721Template.json
|
||||
eventHandlers:
|
||||
- event: MetadataCreated(indexed address,uint8,string,bytes,bytes,bytes,uint256,uint256)
|
||||
handler: handleCreated
|
||||
- event: MetadataUpdated(indexed address,uint8,string,bytes,bytes,bytes,uint256,uint256)
|
||||
handler: handleUpdated
|
||||
- event: MetadataState(indexed address,uint8,uint256,uint256)
|
||||
handler: handleState
|
||||
- event: TokenURIUpdate(indexed address,string,uint256,uint256,uint256)
|
||||
handler: handleUriUpdate
|
||||
features:
|
||||
- nonFatalErrors
|
||||
|
Loading…
Reference in New Issue
Block a user