-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix handling of candy machine config lines #672
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocking this on the unit test PR to avoid conflicting test bed scaffolding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some TODOs that need resolving before this can merge, plus the dependency on #584.
crates/core/migrations/2022-08-12-183150_add_index_and_taken_to_config_lines/down.sql
Outdated
Show resolved
Hide resolved
crates/core/migrations/2022-08-12-183150_add_index_and_taken_to_config_lines/down.sql
Outdated
Show resolved
Hide resolved
crates/core/migrations/2022-08-12-183150_add_index_and_taken_to_config_lines/up.sql
Outdated
Show resolved
Hide resolved
crates/core/migrations/2022-08-12-183150_add_index_and_taken_to_config_lines/up.sql
Outdated
Show resolved
Hide resolved
@ray-kast I think I got everything, I left the data the test relies on in |
6358269
to
a6cdd74
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I addressed the remaining TODO
comments and cleaned up some style errors.
commit 6358269 Author: William Barksdale <[email protected]> Date: Wed Aug 17 12:42:12 2022 -0500 remove data dir commit 3b2dca0 Author: William Barksdale <[email protected]> Date: Wed Aug 17 12:29:17 2022 -0500 fix prepush commit 2624e83 Author: William Barksdale <[email protected]> Date: Wed Aug 17 12:27:44 2022 -0500 must_use commit 8249e30 Author: William Barksdale <[email protected]> Date: Wed Aug 17 12:22:06 2022 -0500 more fixes commit c37fefe Author: William Barksdale <[email protected]> Date: Wed Aug 17 12:19:03 2022 -0500 remove verbose commit 0a4cb71 Author: William Barksdale <[email protected]> Date: Wed Aug 17 12:17:57 2022 -0500 address feedback commit 9b61df6 Author: William Barksdale <[email protected]> Date: Wed Aug 17 10:43:13 2022 -0500 cleanup sql commit a802812 Merge: 25290d1 2ee12fd Author: William Barksdale <[email protected]> Date: Mon Aug 15 12:12:16 2022 -0500 finish merge commit 25290d1 Author: William Barksdale <[email protected]> Date: Fri Aug 12 15:44:30 2022 -0500 run test as part of pre-push checks commit 204cb3d Author: William Barksdale <[email protected]> Date: Fri Aug 12 15:05:45 2022 -0500 fix lint i think commit 2471a73 Author: William Barksdale <[email protected]> Date: Fri Aug 12 14:58:12 2022 -0500 make panic impossible commit facf2a3 Author: William Barksdale <[email protected]> Date: Fri Aug 12 14:47:23 2022 -0500 works in theory commit 7ce3971 Author: William Barksdale <[email protected]> Date: Fri Aug 12 14:07:04 2022 -0500 fix compile errors commit 3c4dc2c Merge: a74ad4a 265bb4d Author: William Barksdale <[email protected]> Date: Fri Aug 12 14:04:23 2022 -0500 Merge branch 'more-cm-fields' into fix-cm-config-lines commit a74ad4a Author: William Barksdale <[email protected]> Date: Fri Aug 12 14:04:10 2022 -0500 update candy machine objects commit 2d3f710 Author: William Barksdale <[email protected]> Date: Fri Aug 12 14:00:52 2022 -0500 update config lines schema commit c726b8a Author: William Barksdale <[email protected]> Date: Fri Aug 12 13:17:56 2022 -0500 delete account commit 8dd8f06 Author: William Barksdale <[email protected]> Date: Fri Aug 12 12:39:51 2022 -0500 save work commit 73b2d90 Author: William Barksdale <[email protected]> Date: Fri Aug 12 10:53:13 2022 -0500 save commit 265bb4d Author: William Barksdale <[email protected]> Date: Thu Aug 11 17:15:38 2022 -0500 format commit 568fa7c Author: William Barksdale <[email protected]> Date: Thu Aug 11 17:02:16 2022 -0500 add gate keeper config commit 543aede Author: William Barksdale <[email protected]> Date: Thu Aug 11 16:25:35 2022 -0500 hex string commit 8cbb2f1 Author: William Barksdale <[email protected]> Date: Thu Aug 11 15:52:31 2022 -0500 stuff commit d61aef6 Author: William Barksdale <[email protected]> Date: Thu Aug 11 15:44:49 2022 -0500 save work commit c95d939 Author: William Barksdale <[email protected]> Date: Thu Aug 11 14:55:30 2022 -0500 depluralize commit 422422b Author: William Barksdale <[email protected]> Date: Thu Aug 11 14:46:48 2022 -0500 add comment for API consumers commit 1fc5631 Author: William Barksdale <[email protected]> Date: Thu Aug 11 14:39:09 2022 -0500 whitelist mint settings work in theory commit b179a88 Author: William Barksdale <[email protected]> Date: Thu Aug 11 14:21:42 2022 -0500 candy machine end settings work in theory commit 3273738 Author: William Barksdale <[email protected]> Date: Thu Aug 11 13:39:52 2022 -0500 WIP: parse config lines commit f4ea6ee Author: William Barksdale <[email protected]> Date: Wed Aug 10 18:13:53 2022 -0500 candy machine config lines commit 8fcd95b Author: William Barksdale <[email protected]> Date: Wed Aug 10 17:51:06 2022 -0500 add collection pda commit 92dc860 Author: William Barksdale <[email protected]> Date: Wed Aug 10 15:59:06 2022 -0500 make getters commit d3e3063 Author: William Barksdale <[email protected]> Date: Wed Aug 10 15:30:08 2022 -0500 add creator data loader
a6cdd74
to
2f2656f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this locally and it is ingesting config lines
Candy machine config line parsing previously assumed that config line's were stored in their own PDA, however these config lines are actually stored as part of the candy machine account itself, but are not deserialized by mpl's candy machine data structure.
This implements a function to parse those config lines. The config lines are indexed based on a compound key
(candy_machine_address, idx)
where idx is the the index of the config line within the candy machine account data.I also took a stab at adding a test for this, its not a super useful test, but wanted to give it a shot.
In order to make the test work, I needed to add a feature
test-internal
to expose the internals of the indexer to the test, this resulted in some changes topre-push.sh
andCargo.toml
. I'm happy to delete this test if its not wanted, but thought i'd take a stab at it.