-
Notifications
You must be signed in to change notification settings - Fork 1
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
🔬🦺 ↝ Getting user inputs being sent between Flask/Deepnote, Unity, Supabase & the goerli testnet for EVM #27
Merged
Gizmotronn
merged 9 commits into
main
from
wb3-5-take-user-inputs-for-minting-via-flask
Jan 21, 2023
Merged
🔬🦺 ↝ Getting user inputs being sent between Flask/Deepnote, Unity, Supabase & the goerli testnet for EVM #27
Gizmotronn
merged 9 commits into
main
from
wb3-5-take-user-inputs-for-minting-via-flask
Jan 21, 2023
Conversation
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
Also working on building out the frontend for #16 -> see Signal-K/Silfur#28 & Signal-K/Silfur#26 & Signal-K/Silfur#24 & Signal-K/Silfur#25 & Signal-K/Silfur#21 & Signal-K/Silfur#22 Frontend components are being built out on the signal-k/client repo: Signal-K/client#12 Contract: https://thirdweb.com/0xCdc5929e1158F7f0B320e3B942528E6998D8b25c/PlanetHelper, https://www.notion.so/skinetics/Sample-Planets-Contract-4c3bdcbca4b9450382f9cc4e72e081f7#73801895fc5a421bbf57801a33a775c7 Claiming mints: ```sol function verifyClaim( address _claimer, uint256 _tokenId, uint256 _quantity ) public view override { require (_tokenId == 0, 'Only first NFT is claimable'); require (_quantity == 1, 'Only 1 NFT can be claimed at a time'); } ``` Multitool base documentation: https://skinetics.notion.site/Planet-Mining-multitool-8310fa1cd188440688bbcc19692b3b67 Contract README: > # Planets > > > ## Confirmed Planets Contract > > Documentation: [https://skinetics.notion.site/Sample-Planets-Contract-4c3bdcbca4b9450382f9cc4e72e081f7](https://www.notion.so/Sample-Planets-Contract-4c3bdcbca4b9450382f9cc4e72e081f7) > > - User mints an anomaly that has appeared in their UI (for now, the webapp, later it will be the game as well) > - API searches for a token that has already been lazy minted with the TIC id of the anomaly (or the identifier of the candidate) > - If there is a token id that has the TIC Id, then claim a copy of that to the `msg.sender` (player’s address) so they can manipulate it in-game > - If the TIC ID has never been minted before, lazy mint a new one with parameters fetched from the data source and send it to `msg.sender` > - Return the IPFS metadata > - Add some buttons that allow manipulations for the NFT (e.g. viewing (reading) metadata (e.g. image/video files, graphs). > - Graphs should be generated in a Jupyter notebook and returned in the Next app. > - User creates post (proposal [Proposal Board → Migration from Vite](https://www.notion.so/Proposal-Board-Migration-from-Vite-2e3ef95e384d4ac1875e0dbbe9a59337)) with the NFT ID for their anomaly and some extra metadata for their discoveries and proposal, and then users can vote > > ## Planet/Node candidates > > (Where node refers to any type/class/collection of object that is part of the classification process. E.g. the TESS planets collection, mining/seismic data collection, etc) > Simple flow: Contract for unconfirmed planet → created via Deepnote flask > Once confirmed → lazy mint on existing goerli contract > Mining multitool helper > > # PlanetContractAddress > > Address for the collection of planets/node candidates that have been confirmed and lazy-minted. > The process for this in the Star Sailors wrapper is as follows: > > 1. Player mints an anomaly, which is an ERC1155 drop that is lazy-minted. The player requests a new planet, a random TIC id is assigned, our Flask API on Deepnote searches for an NFT in the first drop with that TIC ID. If none is found, a new NFT is lazy minted on that collection with data from the Lightkurve python module. > 2. User/Player then has a candidate (unconfirmed node object) in their wallet and on the web application frontend, they're redirected to a special planet `{...id}` page where they can interact with and view the candidate. > 3. Once the user has made a decision as to the status of the node candidate, they then create a Proposal (first on the [threaded comments via Supabase](https://www.notion.so/Threaded-Comments-8374255ed9314473b044db150fb13c36) and then on [Lens](https://github.com/signal-k/client)). The contents of this proposal are [outlined here](https://www.notion.so/Threaded-Comments-8374255ed9314473b044db150fb13c36). > 4. An NFT of this proposal is minted and then a new NFT is lazy minted from [this collection](notion://www.notion.so/skinetics/0xdf35Bb26d9AAD05EeC5183c6288f13c0136A7b43) (**note -> this is a demo. Will be updated). This new lazy-minted NFT will contain a link to the candidate node the proposal was created from, the proposal, and all the traits the user has filled in for the node once they have been cross-referenced with the proposal, voters and the python module that has the dataset (in this case, Lightkurve on Deepnote). This collection is the one referenced to in this contract (`planetNftCollectionAddress`). This planet can then have actions performed on it and rewards/items generated via [the minerals contract](notion://www.notion.so/skinetics/0xE938775F4ee4913470905885c9744C7FAD482991). Threads docs: https://skinetics.notion.site/Threaded-Comments-8374255ed9314473b044db150fb13c36
…setups with blueprints in `/server`
…nnection/handling for web3 interaction Signal-K/Silfur#28 Signal-K/Silfur#26 Signal-K/Silfur#25 #18 #6 Signal-K/Silfur#24
…pyter for matplotlib manipulations https://www.notion.so/skinetics/January-Week-3-8dcc344a601842959a025940a90c1cc4#6b761b8a793041e1972ad2ecba5b93f0 NFT integration: #18 #6 #1 Signal-K/Silfur#28 -> contract calls Frontend API interaction: #16 Signal-K/Silfur#29 -> handled with Supabase in Gizmotronn/comments@9e70ab0 Signal-K/Silfur#26 Signal-K/Silfur#25 -> starting to implement proposals board in Next with Supabase, then will build in contract calls for web3/eth interaction Signal-K/Silfur#24 Signal-K/Silfur#22 -> minting will now be handled by a minimal UI & the API wrapper in Server/thirdweb_handler & moralis_handler Signal-K/Silfur#21 -> custom post types and fields are in Signal-K/client@4cff28c & Signal-K/client@5ce80a5 & Signal-K/client@c950d66, so we're starting off with building it on postgres before adding Lens interactions Signal-K/Silfur#3
…and docs around the blueprint structure Currently we're only able to export the notebooks to graph images (to then be sent to Postgres) via Deepnote, so I've started building a simple Flask wrapper on Deepnote that will communicate with the main Flask app here: https://deepnote.com/workspace/star-sailors-49d2efda-376f-4329-9618-7f871ba16007/project/Untitled-project-dca7e16c-429d-42f1-904d-43898efb2321/%2Fmain.py I've done some more work on the client, so the next step is getting Flask to read user interactions and prepare them to be saved into the database for their planets' stats. #1 #16 #18 Signal-K/Silfur#26 Signal-K/Silfur#24 Signal-K/Silfur#25
…malies-from-smart 🦺🍥 ↝ Moving Flask out into separate blueprints, and adding contract calls and refs to Deepnote book
Gizmotronn
added
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
data source
data source for content generation in [HDASH-4]
goerli
Issues relating to the ethereum components of Star Sailors, e.g. NFT, Moralis/Supabase
generator
Generating Metadata for NFTs or in-game assets
game mechanics
Metadata for game assets/objects being pushed between Unity through our API
staking interaction
code relating to the staking contracts & off-chain user/anomaly data
labels
Jan 21, 2023
Gizmotronn
commented
Jan 21, 2023
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.
As described in #25, flask builds correctly and all the routes/blueprints provide the expected output.
Screen.Recording.2023-01-21.at.9.02.16.pm.mov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
data source
data source for content generation in [HDASH-4]
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
game mechanics
Metadata for game assets/objects being pushed between Unity through our API
generator
Generating Metadata for NFTs or in-game assets
goerli
Issues relating to the ethereum components of Star Sailors, e.g. NFT, Moralis/Supabase
staking interaction
code relating to the staking contracts & off-chain user/anomaly data
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.
See #25 for full write-up
Related issues -> #1 #16 #18
Planets contract docs