Skip to content
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

👾🔬 ↣ Generator (Ansible) + Evolution mechanism for NFTs in [SCD-8] #6

Open
Gizmotronn opened this issue Oct 24, 2022 · 6 comments
Assignees
Labels
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

Comments

@Gizmotronn
Copy link
Member

To test out a crafting/evolution system, I've begun work on a Pokemon-type evolution smart contract. Burning two of the same ERC-1155 IDs (e.g. a base-class spaceship) creates a new NFT (e.g. a second-tier spaceship) using the following data flow:

  • msg.sender holds contract.tokenId = 0 * 2
  • Contract _burns contract.tokenID = 0 * 2
  • Contract _mints contract.tokenId = 1 & sends it to msg.sender

This can be used for crafting items, transferring items, etc

Let's try and get user NFT metadata working inside the frontend, add a crafting feature (triggering _burn & _mint functions of deployed contract using Moralis Unity/C# SDK) and have all actions be recorded & retrievable from our backend infrastructure in #1 #5

@Gizmotronn Gizmotronn added 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 labels Oct 24, 2022
@Gizmotronn Gizmotronn self-assigned this Oct 24, 2022
@Gizmotronn
Copy link
Member Author

Gizmotronn commented Oct 24, 2022

It would be a good idea to keep track of this: https://github.com/app-generator/flask-soft-ui-dashboard/

After finishing the basic UI, let's get to work on deploying the same queries that were in Signal-K/marketplace#32 and then sending the data from the queries to Supabase (along with authentication data), and then to Flask (inside ./server on planti branch in THIS repository.

Then we can use the Moralis Unity SDK inside Signal-K/starsailors-boilerplate#1, Signal-K/starsailors-boilerplate#3, unity-demo, Signal-K/Unity-Demo#28 to pull (GET) data from the Flask API, interacting with the EVM using Moralis, and then pushing (POST) data back to Flask.

After this, we can get to work on running this from deployed Jupyter notebooks (Anvil as widget/jupyter widget inside planti) and getting data from LightKurve running, including the graph generation (both web-side and client(unity)-side)

Gizmotronn added a commit that referenced this issue Oct 25, 2022
…apping for moralis loops in [#6] + [HDASH-5 HDASH-4]
@Gizmotronn
Copy link
Member Author

Current status of development:
image

Nice-looking frontend so far, just need to update the styling, add some more features as per Signal-K/marketplace#32 and improve the responsive nature, and then we can add the Ansible functionality!

@Gizmotronn
Copy link
Member Author

To keep things simple, I'm going to use the Supabase JS SDK right now so I don't have to constantly keep Flask running while developing the frontend in its current state, however as soon as we've got some basic integrations we'll do as much as possible of the data retrieval & manipulation through Flask (still need to look at how Moralis fits in there).

@Gizmotronn
Copy link
Member Author

Current view of the frontend (note all components are composed of static, prefilled/predefined data):

image

I feel like we might be able to take some things from @Harambe-Protocol/dashboard like @syncfusion queries...

@Gizmotronn Gizmotronn moved this to Iced in ERC20 Token Oct 28, 2022
@Gizmotronn Gizmotronn moved this to Todo in Planet Generation Oct 28, 2022
@Gizmotronn Gizmotronn moved this to In Progress in Wallet integration Oct 28, 2022
Gizmotronn added a commit that referenced this issue Oct 30, 2022
📨💼 ↣ Auth working for [HDASH-5 HDASH-4 #6 STA-13]
Gizmotronn added a commit that referenced this issue Nov 1, 2022
…cation-with

🔬🍭 ↣ Sta-2 combine magic authentication with Supabase instance (#6 #1)
@Gizmotronn
Copy link
Member Author

Gizmotronn commented Nov 10, 2022

@Nathan5563 you'll find the code here: #6 (reference)

Resources: game 1, game 2. Build them when you can, and then add the contract address here so I can use Moralis to query them.

Use this private key to deploy: https://linear.app/star-sailors/issue/STA-15/test-jupyter-notebooks-with-anvil#comment-aa396f17

@Gizmotronn
Copy link
Member Author

Turns out this issue is highly relevant for the inventory management planning: Notion doc

@Nathan5563 keep this in mind...

Gizmotronn added a commit that referenced this issue Nov 21, 2022
…tend component for connecting to APIs (including with Py) for #1

Two new directories:
`./Ansible` ↣ Contract & build files here. Will be moved into a new folder in the root React/Next.js project, but for now I'm leaving this in a separate node project to keep things separated for easier debugging

`./client` ↣ Frontend client for interacting with the smart contracts in `Ansible` directory. Similar story to the directory positioning in `Ansible`. We'll migrate it over to the Node project in the root directory before merging this branch, however we will also transition as much as possible out of typescript.
Gizmotronn referenced this issue Jan 4, 2023
…w flask route #16 to fetch proposal data

Some minor styling changes...

Idea for metadata: Create an nft with all the contents of the candidate, then edit them to include some actions the player did on the candidate, then send that lazy-minted NFT as the metadata/publication contents for the Lens post.

This way we can have a frontend like on the `client` dir example & automate the process of creating & updating the metadata & candidate content on the nft using Flask & Jupyter (see next commit for some more info)

Done some minor fetching examples, this seems to be causing some console issues on next in `Server/frontend` so will attempt to fix those later as well
Gizmotronn added a commit to Gizmotronn/cityzens that referenced this issue Jan 7, 2023
Gizmotronn added a commit that referenced this issue Jan 14, 2023
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
Gizmotronn added a commit to Signal-K/client that referenced this issue Jan 16, 2023
The frontend view currently only allows staking to be done if the player has an NFT from the planets collection. This should be improved where the staking (aka helper/planetHelper) contract also has this require function.

As per the [Star Sailors Web Flow Demo](https://www.notion.so/Star-Sailors-Web-Flow-Demo-d2b9180a577144f9a523e045d429076a) roadmap, we need to determine what is actually being staked (multiple nft collections at a time?) → the planet, the multitool, or something else?

For Signal-K/sytizen#18 & Signal-K/sytizen#6

Notion: https://skinetics.notion.site/Planet-Mining-multitool-8310fa1cd188440688bbcc19692b3b67
Gizmotronn added a commit that referenced this issue Jan 20, 2023
…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
Gizmotronn added a commit to Signal-K/client that referenced this issue Feb 20, 2023
Users can now navigate to `/planets/{$planetID}` to see information relating to their planet, including datasets, articles, a sandbox, basic stats/info, a gallery, and a generator.

Generator:
Signal-K/sytizen#18
Right now it's just the same generator script, but eventually it will take in the fields like radius from the table the page itself is generated from. We'll update the frontend fields to use a UI based on the <Card /> component we've designed for the Profile pages. users will be able to edit these fields and create a fork of the anomaly in its dataset sandbox for use in their own projects, and this can be part of the "XP" demo for "citizen science points" to mimic the behaviour of the reputation erc20 token:

Now that staking has been re-added, time to close #18

Signal-K/sytizen#16 Profile pages
Signal-K/sytizen#13
Signal-K/sytizen#6 -> Generator & staking
Signal-K/sytizen#1 -> sandbox & generator
Signal-K/Unity-Demo#28
Signal-K/Unity-Demo#5
Signal-K/starsailors#4 -> user input on anomalies
Signal-K/Silfur#26
Signal-K/Silfur#25 -> Some small changes with the Thirdweb module behaviour, still yet to commence full re-integration now though
Signal-K/Silfur#24
Signal-K/Silfur#22 -> Replacing "mint" FOR NOW with just a "claim" button that sends the planet to your supabase table inventory (array/foreign key in 'profiles' table

Signal-K/Silfur#21
Signal-K/Silfur#12 -> Keep an eye on this, but for now this is deprecated
Signal-K/Silfur#3 -> Again keep an eye on the original card game contract, but until we commence the full re-integration of the smart contracts, this is not needed

Signal-K/Silfur#30 -> This is working a treat
Signal-K/Silfur#29 -> Now need to add true threaded comments & integrate it with sandbox items

Full notes available here: https://www.notion.so/skinetics/February-Flow-Planets-8c864b66147c447f82136772336e9bc6?pvs=4#09b8260b2360412683ef5935309fd011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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
Projects
Status: Iced
Status: Todo
Status: In Progress
Status: In Progress
Development

No branches or pull requests

2 participants