notional-labs / craft

20 stars 59 forks source link

Call Apr 19 #101

Closed faddat closed 2 years ago

faddat commented 2 years ago

Notes by @chalabi2

Reecepbcups commented 2 years ago

In regards to NFT, only command I am seeing is craftd tx nft send <class-id> <nft-id> <receiver> but no way to mint an NFT to actually test this. So can't send anything to mess with

Possible this is incomplete like issue #5 stated

vuong177 commented 2 years ago

@Reecepbcups, @faddat seems nft module in cosmos-sdk haven't fishished yet. What do you think about using cw-plus ?

Reecepbcups commented 2 years ago

@Reecepbcups, @faddat seems nft module in cosmos-sdk haven't fishished yet. What do you think about using cw-plus ?

I am good with any NFT platform however like issue #5 states, I need to understand how its used so I can hook integration into it.

We have real estate in game which when its NFT is traded, the asset in game also has to change owners (I'm handling this, will do with a query to chain for "if owns NFT 1 for example").

So we need a way for the person with keplr to send their NFT on chain -> a contract/wallet as an exchange of holding. Then a way for someone to bid / buy that NFT. And we need this NFT held in their keplr wallet so we can confirm they own it

Is this possible natively with cw-plus or another platform?

vuong177 commented 2 years ago

Yes, i think a a nft contract can provide all feature that you mention. All things about NFT (owner, metadata, ....) can be easy query.

vuong177 commented 2 years ago

@Reecepbcups Could you please explain to me in more detail ? I want to know what will you do with NFT in game.

Reecepbcups commented 2 years ago

@vuong177 sure let me explain

So NFTs owned on chain will be backed by an asset in game. (passage3d is doing something like this as well i believe).

So in the minecraft game, there is going to be a plot of land which a user can own (real estate). This asset is sold/transfered by transferring the NFT token itself. So by owning the NFT, you get real perks in game for a select area

The way I plan on executing this is: ---------------------

This solution requires the server / some contract to be kind of like an exchange / holding wallet for said NFT until someone buys it. If they wanted to sell, we would have a function in game to remove their perks to the land & let them send the NFT back to the Wallet/Contract to be listed on the market

Does that better explain the idea? Its pretty cool. Also the idea of hooking into dig chain maybe as a metaverse play if that is easier.

Really what ever is easiest / fastest to implement while still being secure and efficient on chain

Reecepbcups commented 2 years ago

There are also other NFT use cases, like someone can build something & we save the metadata (block types) -> an image based on block color to persist on chain in a 3d state (x y z values + block color)

Then the user could view this in some webapp we make down the line to show off their build

vuong177 commented 2 years ago

So we have two kinds of NFT :

And another question : Will NFT be minted only by DAO ? Or normal user can mint it ?

Reecepbcups commented 2 years ago

@vuong177 for Real estate, only the DAO would do the initial mint & users can buy from them (since we have a limited amount of real estate slots) The DAO could also mint the image based on blocks in minecraft and just send it to them. (We need to ensure they only create NFTs for the areas in game, which requires minecraft checks before mint. If we let the user mint, they could mint anything, which is bad)

In the future they may also want NFT skins, which I am not sure how would actually be implemented in game technical speaking.

Not as familiar with NFT's, so I assume its just a token asset w/ extra metadata in JSON format? Like:

NFT 0001
    Owner: "craft11111111"
    imageLink: "ipfs://imagehere"

If so, are we able to add our own meta data keys? if so real estate really just needs basic information

NFT RealEstate 0001
    Owner: ""
    inGameBuildingID: "bb582d7a-5f3a-4390-8496-79fae03135f9" // This is done in game, automated mint system

Then image based NFTs could be as the following schema

NFT Image 0001
    Owner: ""
    blocks: {
       64: // keys of Y coordinates (up and down)
       {
           [100, 100, GRASS_BLOCK]    // X, Z, and Block Type
           [100, 101, DIAMOND_BLOCK] 
       },
      65: // keys of Y coordinates (up and down)
       {
           [100, 100, WOODEN_PLANK]    // X, Z, and Block Type
           [100, 101, GOLD_BLOCK] 
       }
    },
    }

This JSON could easily be generated in game by looping through every block. Then we can normalize it to a 0,0 point, and just save in the NFT metadata

vuong177 commented 2 years ago

@Reecepbcups should we save data (real estate, blocks) in ipfs, and nft in game have this ipfs URI ?It work like: you query on-chain to get uri, and use uri to get data you need.

Reecepbcups commented 2 years ago

@vuong177 This could be possible yes so long as we can save JSON/BSON data to IPFS. Then we can query the contract like you said for that link

I would still need to look further into how it would work with our in game assets, but I figure this should work.

vuong177 commented 2 years ago

@Reecepbcups if you ok with it, I think we can build a module (x/nftc, base on cosmos-sdk mainline nft ) instead of use contract.

Reecepbcups commented 2 years ago

I've handled all of the above with my marketplace & CW 721 minting