-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Query NFT Editions (metaplex-foundation#216)
Associate editions to the nft mint of the master edition. Add new method to API get_nft_editions to find editions for the mint.
- Loading branch information
1 parent
e8aaded
commit 9654780
Showing
25 changed files
with
401 additions
and
40 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+824 Bytes
...n_tests/tests/data/accounts/get_nft_editions/4V9QuYLpiMu4ZQmhdEHmgATdgiHkDeJfvZi84BfkYcez
Binary file not shown.
Binary file added
BIN
+424 Bytes
...n_tests/tests/data/accounts/get_nft_editions/8SHfqzJYABeGfiG1apwiEYt6TvfGQiL1pdwEjvTKsyiZ
Binary file not shown.
Binary file added
BIN
+824 Bytes
...n_tests/tests/data/accounts/get_nft_editions/9ZmY7qCaq7WbrR7RZdHWCNS9FrFRPwRqU84wzWfmqLDz
Binary file not shown.
Binary file added
BIN
+224 Bytes
...n_tests/tests/data/accounts/get_nft_editions/9yQecKKYSHxez7fFjJkUvkz42TLmkoXzhyZxEf2pw8pz
Binary file not shown.
Binary file added
BIN
+384 Bytes
...n_tests/tests/data/accounts/get_nft_editions/AoxgzXKEsJmUyF5pBb3djn9cJFA26zh2SQHvd9EYijZV
Binary file not shown.
Binary file added
BIN
+224 Bytes
...n_tests/tests/data/accounts/get_nft_editions/Ey2Qb8kLctbchQsMnhZs5DjY32To2QtPuXNwWvk4NosL
Binary file not shown.
Binary file added
BIN
+224 Bytes
...n_tests/tests/data/accounts/get_nft_editions/GJvFDcBWf6aDncd1TBzx2ou1rgLFYaMBdbYLBa9oTAEw
Binary file not shown.
Binary file added
BIN
+384 Bytes
...on_tests/tests/data/accounts/get_nft_editions/giWoA4jqHFkodPJgtbRYRcYtiXbsVytnxnEao3QT2gg
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
integration_tests/tests/integration_tests/nft_editions_tests.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
use function_name::named; | ||
|
||
use das_api::api::{self, ApiContract}; | ||
|
||
use itertools::Itertools; | ||
|
||
use serial_test::serial; | ||
|
||
use super::common::*; | ||
|
||
#[tokio::test] | ||
#[serial] | ||
#[named] | ||
async fn test_get_nft_editions() { | ||
let name = trim_test_name(function_name!()); | ||
let setup = TestSetup::new_with_options( | ||
name.clone(), | ||
TestSetupOptions { | ||
network: Some(Network::Mainnet), | ||
}, | ||
) | ||
.await; | ||
|
||
let seeds: Vec<SeedEvent> = seed_accounts([ | ||
"Ey2Qb8kLctbchQsMnhZs5DjY32To2QtPuXNwWvk4NosL", | ||
"9ZmY7qCaq7WbrR7RZdHWCNS9FrFRPwRqU84wzWfmqLDz", | ||
"8SHfqzJYABeGfiG1apwiEYt6TvfGQiL1pdwEjvTKsyiZ", | ||
"GJvFDcBWf6aDncd1TBzx2ou1rgLFYaMBdbYLBa9oTAEw", | ||
"9ZmY7qCaq7WbrR7RZdHWCNS9FrFRPwRqU84wzWfmqLDz", | ||
"AoxgzXKEsJmUyF5pBb3djn9cJFA26zh2SQHvd9EYijZV", | ||
"9yQecKKYSHxez7fFjJkUvkz42TLmkoXzhyZxEf2pw8pz", | ||
"4V9QuYLpiMu4ZQmhdEHmgATdgiHkDeJfvZi84BfkYcez", | ||
"giWoA4jqHFkodPJgtbRYRcYtiXbsVytnxnEao3QT2gg", | ||
]); | ||
|
||
apply_migrations_and_delete_data(setup.db.clone()).await; | ||
index_seed_events(&setup, seeds.iter().collect_vec()).await; | ||
|
||
let request = r#" | ||
{ | ||
"mintAddress": "Ey2Qb8kLctbchQsMnhZs5DjY32To2QtPuXNwWvk4NosL", | ||
"limit":10 | ||
} | ||
"#; | ||
|
||
let request: api::GetNftEditions = serde_json::from_str(request).unwrap(); | ||
let response = setup.das_api.get_nft_editions(request).await.unwrap(); | ||
|
||
insta::assert_json_snapshot!(name, response); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.