kodadot / nft-gallery

Generative Art Marketplace
https://koda.art
MIT License
643 stars 362 forks source link

Enable Multi-chain capabilities in KodaDot #4257

Open yangwao opened 2 years ago

yangwao commented 2 years ago

Finally, we have an endpoint we can start to integrate multi-chain components.

At some point would be nice to have some component which would wrap and abstract the current endpoint in case we find Supabase is not sufficient for our case.

Endpoint

Follow up what can be done with new endpoint If anyone wants to play with that here is the URL

https://xtnvtbdyvpbbnonbbcif.supabase.co/graphql/v1

You need to add apiKey header into your request. You can find the key in the discord group.

Sample Query

query findCollections {
    collectionsCollection(first: 10) {
        edges {
            node {
                name
            }
        }
    }
}

Tasks

Once all the above done

Ref

vikiival commented 1 year ago

First draft of schema

Collection

-- create table collection_entities with following columns
-- id (uuid, primary key, auto increment)
-- animation_url (text)
-- block_number (bigint)
-- chain (enum, default 'rmrk')
-- collection_id (text)
-- count (integer, default 0)
-- created_at (timestamp, default now())
-- floor_price (bigint, default 0)
-- hash (text)
-- image (text)
-- issuer (text, foreign key to creators table)
-- max (integer)
-- metadata (text)
-- name (text)
-- supply (integer, default 0)
-- updated_at (timestamp, default now())
-- version (integer, default 0)

NFT:

-- create table nft_entities with following columns
-- block_number (bigint)
-- chain (enum, default 'rmrk')
-- collection_id (text, foreign key to collection_entities table)
-- issuer (text, foreign key to creators table)
-- id (uuid, primary key, auto increment)
-- metadata (text)
-- name (text)
-- image (text)
-- animation_url (text)
-- created_at (timestamp, default now())
-- updated_at (timestamp, default now())
-- hash (text)
-- serial_number (integer)
-- version (integer, default 0)
daiagi commented 1 year ago

@vikiival where would be a good place to start tackling these issues?

vikiival commented 1 year ago

@vikiival where would be a good place to start tackling these issues?

Hello, I wrote few months ago how can we use the search

https://github.com/kodadot/nft-gallery/discussions/4457#discussioncomment-4656461

here is the anon key