Skip to content

Commit

Permalink
feat: display supply obj for more interfaces (metaplex-foundation#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
n00m4d authored Jan 29, 2025
1 parent 06297e1 commit 82ef80f
Show file tree
Hide file tree
Showing 24 changed files with 148 additions and 101 deletions.
6 changes: 5 additions & 1 deletion digital_asset_types/src/dapi/common/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,11 @@ pub fn asset_to_rpc(asset: FullAsset, options: &Options) -> Result<RpcAsset, DbE
.unwrap_or("".to_string()),
}),
supply: match interface {
Interface::V1NFT => Some(Supply {
Interface::V1NFT
| Interface::LEGACY_NFT
| Interface::Nft
| Interface::ProgrammableNFT
| Interface::Custom => Some(Supply {
edition_nonce,
print_current_supply: 0,
print_max_supply: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ snapshot_kind: text
"ownership_model": "single",
"owner": "BzbdvwEkQKeghTY53aZxTYjUienhdbkNVkgrLV6cErke"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 253
},
"mutable": false,
"burnt": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ snapshot_kind: text
"ownership_model": "single",
"owner": "1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 253
},
"mutable": true,
"burnt": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ snapshot_kind: text
"ownership_model": "single",
"owner": "1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 253
},
"mutable": false,
"burnt": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ snapshot_kind: text
"ownership_model": "single",
"owner": "BzbdvwEkQKeghTY53aZxTYjUienhdbkNVkgrLV6cErke"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 253
},
"mutable": true,
"burnt": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ snapshot_kind: text
"ownership_model": "single",
"owner": "BzbdvwEkQKeghTY53aZxTYjUienhdbkNVkgrLV6cErke"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 253
},
"mutable": true,
"burnt": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ snapshot_kind: text
"ownership_model": "single",
"owner": "AZgXpkRSetUJHy6C3NBvG6jNe49MpgrkZ2RkdMkjCjkW"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 254
},
"mutable": true,
"burnt": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ snapshot_kind: text
"ownership_model": "single",
"owner": "A59E2tNJEqNN9TDnzgGnmLmnTsdRDoPocGx3n1w2dqZw"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 255
},
"mutable": true,
"burnt": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ snapshot_kind: text
"ownership_model": "single",
"owner": "9PacVenjPyQYiWBha89UYRM1nn6mf9bGY7vi32zY6DLn"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 255
},
"mutable": true,
"burnt": false
},
Expand Down Expand Up @@ -138,6 +143,11 @@ snapshot_kind: text
"ownership_model": "single",
"owner": "3H3d3hfpZVVdVwuFAxDtDSFN2AdR7kwiDA3ynbnbkhc9"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 255
},
"mutable": true,
"burnt": false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ snapshot_kind: text
"ownership_model": "single",
"owner": "9PacVenjPyQYiWBha89UYRM1nn6mf9bGY7vi32zY6DLn"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 255
},
"mutable": true,
"burnt": false
},
Expand Down Expand Up @@ -137,6 +142,11 @@ snapshot_kind: text
"ownership_model": "single",
"owner": "3H3d3hfpZVVdVwuFAxDtDSFN2AdR7kwiDA3ynbnbkhc9"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 255
},
"mutable": true,
"burnt": false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ snapshot_kind: text
"ownership_model": "single",
"owner": "BaBQKh34KrqZzd4ifSHQYMf86HiBGASN6TWUi1ZwfyKv"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 252
},
"mutable": true,
"burnt": false
},
Expand Down Expand Up @@ -137,6 +142,11 @@ snapshot_kind: text
"ownership_model": "single",
"owner": "9PacVenjPyQYiWBha89UYRM1nn6mf9bGY7vi32zY6DLn"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 255
},
"mutable": true,
"burnt": false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ snapshot_kind: text
"ownership_model": "single",
"owner": "9qUcfdADyrrTSetFjNjF9Ro7LKAqzJkzZV6WKLHfv5MU"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 254
},
"mutable": true,
"burnt": false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ expression: response
"ownership_model": "single",
"owner": "6Cr66AabRYymhZgYQSfTCo6FVpH18wXrMZswAbcErpyX"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 255
},
"mutable": true,
"burnt": false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ expression: response
"ownership_model": "single",
"owner": "GqPnSDXwp4JFtKS7YZ2HERgBbYLKpKVYy9TpVunzLRa9"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 255
},
"mutable": true,
"burnt": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ expression: response
"ownership_model": "single",
"owner": "GqPnSDXwp4JFtKS7YZ2HERgBbYLKpKVYy9TpVunzLRa9"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 255
},
"mutable": true,
"burnt": false,
"token_info": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ expression: response
"ownership_model": "single",
"owner": "GqPnSDXwp4JFtKS7YZ2HERgBbYLKpKVYy9TpVunzLRa9"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 255
},
"mutable": true,
"burnt": false,
"token_info": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ expression: response
"ownership_model": "single",
"owner": "GqPnSDXwp4JFtKS7YZ2HERgBbYLKpKVYy9TpVunzLRa9"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 255
},
"mutable": true,
"burnt": false,
"token_info": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ expression: response
"ownership_model": "single",
"owner": "J1ep1LizHMU3Bf1GKkWePGHU3Qwwzw6FvwW5ySFWdCkn"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 255
},
"mutable": true,
"burnt": false,
"token_info": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ expression: response
"ownership_model": "single",
"owner": "GqPnSDXwp4JFtKS7YZ2HERgBbYLKpKVYy9TpVunzLRa9"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 255
},
"mutable": true,
"burnt": false,
"token_info": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: integration_tests/tests/integration_tests/show_fungible_flag_tests.rs
assertion_line: 117
expression: response
---
{
Expand Down Expand Up @@ -89,107 +90,9 @@ expression: response
},
"confidential_transfer_fee_config": {
"authority": "2apBGMsS6ti9RyF5TwQTDswXBWskiJP2LD4cUEDqYJjk",
"withheld_amount": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"withheld_amount": "1111111111111111111111111111111111111111111111111111111111111111",
"harvest_to_mint_enabled": true,
"withdraw_withheld_authority_elgamal_pubkey": [
28,
55,
230,
67,
59,
115,
4,
221,
130,
115,
122,
228,
13,
155,
139,
243,
196,
159,
91,
14,
108,
73,
168,
213,
51,
40,
179,
229,
6,
144,
28,
87
]
"withdraw_withheld_authority_elgamal_pubkey": "2u9rVXG8n3sN1ChKwrkQZaWoPapzC49iBXd2Y9Kpg5cJ"
}
},
"token_info": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ snapshot_kind: text
"ownership_model": "single",
"owner": ""
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 254
},
"mutable": true,
"burnt": false
},
Expand Down
Loading

0 comments on commit 82ef80f

Please sign in to comment.