Skip to content

Commit

Permalink
api: add nft num_transfers
Browse files Browse the repository at this point in the history
  • Loading branch information
pro-wh committed Jan 10, 2024
1 parent 584067e commit 2d6dca4
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/spec/v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2725,6 +2725,11 @@ components:
type: string
description: The Ethereum address of this NFT instance's owner.
example: "0xDEF1009df2d6872C214cd9148c6883893B7c4D91"
num_transfers:
type: integer
format: int64
description: |
The total number of transfers of this NFT instance.
metadata_uri:
type: string
metadata_accessed:
Expand Down
1 change: 1 addition & 0 deletions storage/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1651,6 +1651,7 @@ func (c *StorageClient) RuntimeEVMNFTs(ctx context.Context, limit *uint64, offse
&ownerAddrContextIdentifier,
&ownerAddrContextVersion,
&ownerAddrData,
&nft.NumTransfers,
&nft.MetadataUri,
&metadataAccessedN,
&nft.Metadata,
Expand Down
1 change: 1 addition & 0 deletions storage/client/queries/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ const (
owner_preimage.context_identifier,
owner_preimage.context_version,
owner_preimage.address_data,
chain.evm_nfts.num_transfers,
chain.evm_nfts.metadata_uri,
chain.evm_nfts.metadata_accessed,
chain.evm_nfts.metadata,
Expand Down
2 changes: 2 additions & 0 deletions tests/e2e_regression/expected/emerald_account_nfts.body
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"id": "1",
"metadata_accessed": "UNINTERESTING",
"metadata_uri": "ipfs://bafybeidp3o4z5bqgtofrws4tbqpeycsqs55225hci3vkivr6ytpiwml3um/",
"num_transfers": 1,
"owner": "oasis1qzlqgyqp2fjla8r6rf5k3dd0k0qada9n5vyu4h3l",
"owner_eth": "0xA3BD5b36659781AF4729c95c19003924ca3EF966",
"token": {
Expand All @@ -23,6 +24,7 @@
"id": "2",
"metadata_accessed": "UNINTERESTING",
"metadata_uri": "https://neurosciencenews.com/files/2023/10/ai-walking-robot-neurosicnes.jpg",
"num_transfers": 1,
"owner": "oasis1qzlqgyqp2fjla8r6rf5k3dd0k0qada9n5vyu4h3l",
"owner_eth": "0xA3BD5b36659781AF4729c95c19003924ca3EF966",
"token": {
Expand Down
2 changes: 2 additions & 0 deletions tests/e2e_regression/expected/emerald_account_nfts_token.body
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"id": "1",
"metadata_accessed": "UNINTERESTING",
"metadata_uri": "ipfs://bafybeidp3o4z5bqgtofrws4tbqpeycsqs55225hci3vkivr6ytpiwml3um/",
"num_transfers": 1,
"owner": "oasis1qzlqgyqp2fjla8r6rf5k3dd0k0qada9n5vyu4h3l",
"owner_eth": "0xA3BD5b36659781AF4729c95c19003924ca3EF966",
"token": {
Expand All @@ -23,6 +24,7 @@
"id": "2",
"metadata_accessed": "UNINTERESTING",
"metadata_uri": "https://neurosciencenews.com/files/2023/10/ai-walking-robot-neurosicnes.jpg",
"num_transfers": 1,
"owner": "oasis1qzlqgyqp2fjla8r6rf5k3dd0k0qada9n5vyu4h3l",
"owner_eth": "0xA3BD5b36659781AF4729c95c19003924ca3EF966",
"token": {
Expand Down
1 change: 1 addition & 0 deletions tests/e2e_regression/expected/emerald_token_nft.body
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"id": "2",
"metadata_accessed": "UNINTERESTING",
"metadata_uri": "https://neurosciencenews.com/files/2023/10/ai-walking-robot-neurosicnes.jpg",
"num_transfers": 1,
"owner": "oasis1qzlqgyqp2fjla8r6rf5k3dd0k0qada9n5vyu4h3l",
"owner_eth": "0xA3BD5b36659781AF4729c95c19003924ca3EF966",
"token": {
Expand Down
2 changes: 2 additions & 0 deletions tests/e2e_regression/expected/emerald_token_nfts.body
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"id": "1",
"metadata_accessed": "UNINTERESTING",
"metadata_uri": "ipfs://bafybeidp3o4z5bqgtofrws4tbqpeycsqs55225hci3vkivr6ytpiwml3um/",
"num_transfers": 1,
"owner": "oasis1qzlqgyqp2fjla8r6rf5k3dd0k0qada9n5vyu4h3l",
"owner_eth": "0xA3BD5b36659781AF4729c95c19003924ca3EF966",
"token": {
Expand All @@ -23,6 +24,7 @@
"id": "2",
"metadata_accessed": "UNINTERESTING",
"metadata_uri": "https://neurosciencenews.com/files/2023/10/ai-walking-robot-neurosicnes.jpg",
"num_transfers": 1,
"owner": "oasis1qzlqgyqp2fjla8r6rf5k3dd0k0qada9n5vyu4h3l",
"owner_eth": "0xA3BD5b36659781AF4729c95c19003924ca3EF966",
"token": {
Expand Down

0 comments on commit 2d6dca4

Please sign in to comment.