fix handling of candy machine config lines#672
Merged
Conversation
ray-kast
suggested changes
Aug 12, 2022
Contributor
ray-kast
left a comment
There was a problem hiding this comment.
Blocking this on the unit test PR to avoid conflicting test bed scaffolding.
ray-kast
suggested changes
Aug 16, 2022
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
Contributor
Author
|
@ray-kast I think I got everything, I left the data the test relies on in |
6358269 to
a6cdd74
Compare
ray-kast
previously approved these changes
Aug 17, 2022
Contributor
ray-kast
left a comment
There was a problem hiding this comment.
I addressed the remaining TODO comments and cleaned up some style errors.
commit 6358269 Author: William Barksdale <wfbarksdale@gmail.com> Date: Wed Aug 17 12:42:12 2022 -0500 remove data dir commit 3b2dca0 Author: William Barksdale <wfbarksdale@gmail.com> Date: Wed Aug 17 12:29:17 2022 -0500 fix prepush commit 2624e83 Author: William Barksdale <wfbarksdale@gmail.com> Date: Wed Aug 17 12:27:44 2022 -0500 must_use commit 8249e30 Author: William Barksdale <wfbarksdale@gmail.com> Date: Wed Aug 17 12:22:06 2022 -0500 more fixes commit c37fefe Author: William Barksdale <wfbarksdale@gmail.com> Date: Wed Aug 17 12:19:03 2022 -0500 remove verbose commit 0a4cb71 Author: William Barksdale <wfbarksdale@gmail.com> Date: Wed Aug 17 12:17:57 2022 -0500 address feedback commit 9b61df6 Author: William Barksdale <wfbarksdale@gmail.com> Date: Wed Aug 17 10:43:13 2022 -0500 cleanup sql commit a802812 Merge: 25290d1 2ee12fd Author: William Barksdale <wfbarksdale@gmail.com> Date: Mon Aug 15 12:12:16 2022 -0500 finish merge commit 25290d1 Author: William Barksdale <wfbarksdale@gmail.com> Date: Fri Aug 12 15:44:30 2022 -0500 run test as part of pre-push checks commit 204cb3d Author: William Barksdale <wfbarksdale@gmail.com> Date: Fri Aug 12 15:05:45 2022 -0500 fix lint i think commit 2471a73 Author: William Barksdale <wfbarksdale@gmail.com> Date: Fri Aug 12 14:58:12 2022 -0500 make panic impossible commit facf2a3 Author: William Barksdale <wfbarksdale@gmail.com> Date: Fri Aug 12 14:47:23 2022 -0500 works in theory commit 7ce3971 Author: William Barksdale <wfbarksdale@gmail.com> Date: Fri Aug 12 14:07:04 2022 -0500 fix compile errors commit 3c4dc2c Merge: a74ad4a 265bb4d Author: William Barksdale <wfbarksdale@gmail.com> Date: Fri Aug 12 14:04:23 2022 -0500 Merge branch 'more-cm-fields' into fix-cm-config-lines commit a74ad4a Author: William Barksdale <wfbarksdale@gmail.com> Date: Fri Aug 12 14:04:10 2022 -0500 update candy machine objects commit 2d3f710 Author: William Barksdale <wfbarksdale@gmail.com> Date: Fri Aug 12 14:00:52 2022 -0500 update config lines schema commit c726b8a Author: William Barksdale <wfbarksdale@gmail.com> Date: Fri Aug 12 13:17:56 2022 -0500 delete account commit 8dd8f06 Author: William Barksdale <wfbarksdale@gmail.com> Date: Fri Aug 12 12:39:51 2022 -0500 save work commit 73b2d90 Author: William Barksdale <wfbarksdale@gmail.com> Date: Fri Aug 12 10:53:13 2022 -0500 save commit 265bb4d Author: William Barksdale <wfbarksdale@gmail.com> Date: Thu Aug 11 17:15:38 2022 -0500 format commit 568fa7c Author: William Barksdale <wfbarksdale@gmail.com> Date: Thu Aug 11 17:02:16 2022 -0500 add gate keeper config commit 543aede Author: William Barksdale <wfbarksdale@gmail.com> Date: Thu Aug 11 16:25:35 2022 -0500 hex string commit 8cbb2f1 Author: William Barksdale <wfbarksdale@gmail.com> Date: Thu Aug 11 15:52:31 2022 -0500 stuff commit d61aef6 Author: William Barksdale <wfbarksdale@gmail.com> Date: Thu Aug 11 15:44:49 2022 -0500 save work commit c95d939 Author: William Barksdale <wfbarksdale@gmail.com> Date: Thu Aug 11 14:55:30 2022 -0500 depluralize commit 422422b Author: William Barksdale <wfbarksdale@gmail.com> Date: Thu Aug 11 14:46:48 2022 -0500 add comment for API consumers commit 1fc5631 Author: William Barksdale <wfbarksdale@gmail.com> Date: Thu Aug 11 14:39:09 2022 -0500 whitelist mint settings work in theory commit b179a88 Author: William Barksdale <wfbarksdale@gmail.com> Date: Thu Aug 11 14:21:42 2022 -0500 candy machine end settings work in theory commit 3273738 Author: William Barksdale <wfbarksdale@gmail.com> Date: Thu Aug 11 13:39:52 2022 -0500 WIP: parse config lines commit f4ea6ee Author: William Barksdale <wfbarksdale@gmail.com> Date: Wed Aug 10 18:13:53 2022 -0500 candy machine config lines commit 8fcd95b Author: William Barksdale <wfbarksdale@gmail.com> Date: Wed Aug 10 17:51:06 2022 -0500 add collection pda commit 92dc860 Author: William Barksdale <wfbarksdale@gmail.com> Date: Wed Aug 10 15:59:06 2022 -0500 make getters commit d3e3063 Author: William Barksdale <wfbarksdale@gmail.com> Date: Wed Aug 10 15:30:08 2022 -0500 add creator data loader
a6cdd74 to
2f2656f
Compare
wbarksdale
commented
Aug 24, 2022
Contributor
Author
wbarksdale
left a comment
There was a problem hiding this comment.
Tested this locally and it is ingesting config lines
imabdulbasit
approved these changes
Aug 24, 2022
ray-kast
approved these changes
Aug 25, 2022
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-internalto expose the internals of the indexer to the test, this resulted in some changes topre-push.shandCargo.toml. I'm happy to delete this test if its not wanted, but thought i'd take a stab at it.