GithubHelp home page GithubHelp logo

packages's People

Contributors

brano-hozza avatar daiagi avatar jarsen136 avatar kngzhi avatar matehoo avatar preschian avatar roileo avatar thea-exe avatar vikiival avatar yangwao avatar zhengow avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

packages's Issues

Bot to help manage and make offers on Basilisk

image

As we've launched the Basilisk marketplace recently, we are looking for ways to programmatically raise the number of offers and bring more liquidity to NFT offers.

What should the bot include, and how should it behave?

At the start, it could be managed by tech-savvy users who can put in their private key, and bot will make offers on their behalf
User can set their strategy what amount they are willing to pay for particular artists, collections, and NFT set &c, this is about your creativity.
Then it would be nice to have setting for % of floor offers should be made, in some cases, underbid listing price per NFT, amount of % from others offers. For example, scan existing orders, and you want to overbid them higher at some certainty (because you believe in high reputation artists or value accrual particular NFT for reason)

This grant has an open end, so the more advanced, the higher reward could be for it.
Good option is to split reward in milestones.
Highly recommend is to use our upcoming uniquery API
In the long run, would be nice to have a telegram/discord bot which can users sent some watch alerts for particular artists offers etc

Ref

https://beta.kodadot.xyz/bsx/stats/

KodaDot common utilities

Introducing @kodadot1/hypercasual

It should be a set of utitilities we already use in KodaDot nft-gallery but we want to reuse them in sub-scaffold & so.

Example:

  • trim address
  • address to identity?
  • link to explorer

ht/ @Roman-24 (maybe add something more)

NUXT 3 ESM

WARN @kodadot1/sub-api doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.

WARN @kodadot1/vuex-options doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.

Create dummy metadata

It should be an IPFS CID: that will contain:

{
 "image": "ipfs://ipfs/<CID>",
 "name": "Placeholder",
 "description": "Something that tells this is an error"
}

Fix: chain properties per each api.

@Component
export default class ChainMixin extends Vue {
  get chainProperties() {
    return this.$store.getters['chain/getChainProperties']
  }

  get decimals(): number {
    return this.chainProperties.tokenDecimals
  }

  get unit(): string {
    return this.chainProperties.tokenSymbol
  }
}

Make Find One with autojoin

https://orkhan.gitbook.io/typeorm/docs/find-options

export async function getOneAndJoin<T extends EntityWithId>(
  store: Store,
  entityConstructor: EntityConstructor<T>,
  id: string,
  relations: FindOptionsRelations<Entity>
): Promise<T | null> {
  const where: FindOptionsWhere<T> = { id } as FindOptionsWhere<T>
  return store.findOne<T>(entityConstructor, { relations, where })
}

Handler for non-ipfs data

Token uri call for this contract returns an output something like this:

data:application/json;base64,<encoded metadata + image data>

Encoded part has three things:
Name: xxx
Attributes:xxx
Image: data:image/svg+xml;base64,<encoded svg>


Image value when opened in a browser renders to an svg by default.

Obtain should take custom providers

The problem is that $obtain currently takes: IPFSProvider in provider parameter.

The task:

  • extend that IPFSProvider is also HTTP_URI
  • in mapper check if it's HTTP_URI than return that

ReMarkable NFTs V2

This issue is a brain dump what needs to be done to successfully finish RMRK v2 in minimark package.

PLEASE BE AWARE THERE IS PR #43 FOR THAT

Critital

  • Test Resources logic against the rmrk-tools package (inspo is written for create)
  • Comply resource spec with rmrk-tools (we have different types than the package)
  • Comply EQUIP - (Equip a child NFT into a parent's slot, or unequip)
  • Comply EQUIPPABLE
  • Comply SETPROPERTY
  • Comply SETPRIORITY
  • Comply THEMEADD

⚠️ For all critical stuff, unit test against rmrk-tool need to be written ⚠️

Minor

  • createBase should take multiple parameters instead of object

Miscelanous

  • fix the issue that is creating multiple minimarks in build

RMRK V2 support

https://github.com/rmrk-team/rmrk-spec/tree/master/standards/rmrk2.0.0

Implement interactions:

  • ACCEPT
  • BASE
  • EQUIP
  • EQUIPPABLE
  • LOCK
  • RESADD
  • SETPROPERTY
  • SETPRIORITY
  • THEMEADD

Check if there are changes for existing interactions:

  • BUY
  • CHANGEISSUER
  • SEND
  • LIST
  • EMOTE

Some interactions were renamed (we will support both for the sake of consistency)

  • CREATE (v1: MINT)
  • MINT (v1: MINTNFT)
  • BURN (v1: CONSUME)

The minimark should do:

  • Ability to create this v2 interactions
  • should unwrap v2 interactions

having tests for this would be golden.

There is a telegram group for RMRK implementers

Export Minimark as subpackages

What is the current solution

currently when someone wants to use minimark she or he will need to export functions like

import { createCollection } from '@kodadot1/minimark'

It is good but we will have V2 #43 soon and I would cause chaos

What I am trying to achieve

that we will have Subpackages

For RMRK v1

import { createCollection } from '@kodadot1/minimark/v1'

For RMRK v2

import { createCollection } from '@kodadot1/minimark/2'

For Common

import { asSystemRemark } from '@kodadot1/minimark/common'

I already hacked something

but it is not ideal and I am missing CommonJS

main...unmark

Better logs for squids

It would be nice to tune up some good utility to have more verbose logs

✖  error     [COLLECTION] [PROBLEM] Entity needs notto be real, {"name":"Future#2","max":3,"symbol":"FUT","version":"RMRK1.0.0","issuer":"DUyAjx5KwFrv7JbdUtvTzvHJFsTaEzzgyeVTUp9TjatS8Lx","metadata":"ipfs://ipfs/QmNMgKU9GnSam44k8xzif21f91S2GSWR5ATZbPQFsji8aD","id":"282781680602E07B32-FUT"} 

It should work with consolidator outside of the box

Create types repo

Extend of @polkadot/types
+ KodaDot specific:

  • identity
  • extrinsics

+ Common generic

type GenericMap<T> = Record<string, T>

Support for any type of url prefix

Soon #17 would be merged.
and would be good to support more routes

namely:

  • classic https (https://example.com/metadata.json)
  • IPNS (ipfs://ipns/<uri>)
  • IPFS dirs (ipfs://ipfs/<hash>/1.json)
  • Arweave? (ar://<hash>)

Add docs to metasquid

Explain every submodule namely:

[
  ".",
  "./consolidator",
  "./entity",
  "./types"
]

Looks like consolidator makes a lot of confusion

Wrappers for common functions

It would be nice to have a wrapper for common functions of ->

class Query {
  static async getNonce(api: ApiPromise, address: string): Promise<BN> {
    const { nonce } = await api.query.system.account(address)
    return nonce.toBn()
  }

  static async getTokenBalance(
    api: ApiPromise,
    accountId: string
  ): Promise<string> {
    const { availableBalance } = await api.derive.balances.all(accountId)
    return availableBalance.toString()
  }

  static getChainProperties(api: ApiPromise): ChainProperties {
    const { chainSS58, chainDecimals, chainTokens } = api.registry
    return {
      ss58Format: correctFormat(chainSS58),
      tokenDecimals: chainDecimals[0] || 12,
      tokenSymbol: chainTokens[0] || 'Unit',
    }
  }
}

NFT Utils

Migrate logic from kodadot into separated package

Make kodadot/nanoid

Ideation

  • for uid generation in Minimark
  • for uid generation in Squids
  • Vue specific ids?

Q: do we want azbuka chars for fun ?

a = 'https://example.com/Дякую'
console.log(encodeURIComponent(a)) 
//'https%3A%2F%2Fexample.com%2F%D0%94%D1%8F%D0%BA%D1%83%D1%8E'

Create lib SubSquid Utils

I am gonna copy mappings/utils/entity into the snek

it would by nice to have a common lib which can be used by devs in the dotsama ecosystem

As far as I noticed getOrCreate is pretty much bog standard in most implementations.

Often times "getEvent"/"getExtrinsic" functions are built to handle multiple versions.
The interface expose the isV***/asV*** but additional logic is required to handle these conditional extractions.

Rename basilisk to bsx

We will use Vuex options-based prefixes.
I think that prefix is bsx
but indexers/ endpoints have basilisk

Unite it under the bsx

implement round robin for ipfs resolving

The idea is to run promise race over JSON metadata or something which is needed fast

EDIT:

The task

The goal is to have a function called ipfsGet which would be able to fetch the data from the ipfs using the Promise.race function

export function ipfsGet<T = any>(url: string, providers: Provider[] = DEFAULT_PROVIDER_LIST): Promise<T> {
 // ... to be implemented
}

then in code we should be able to call

const metadata = await ipfsGet<Metadata>(url)

Inputs for the function

url

- ipfs://ipfs/bafkreiazeqysfmeuzqcnjp6rijxfu5h7sj3t4h2rxehi7rlyegzfy7lxeq
- ipfs://bafkreiazeqysfmeuzqcnjp6rijxfu5h7sj3t4h2rxehi7rlyegzfy7lxeq

optional: Provider list (this is already done)

to check what is inside ipfs url prefix the hash with (https://ipfs.io/ipfs/)

https://ipfs.io/ipfs/bafkreiazeqysfmeuzqcnjp6rijxfu5h7sj3t4h2rxehi7rlyegzfy7lxeq

You need to do:

  1. if the url starts with prefix ipfs://
  2. extract the hash (called CID) from the function
  3. get providers
  4. using Promise.race fetch the array.
  5. promise.race will return the fastest resolved value :)

P.S you won't need await in the function

Where to start?

There is branch hacky-ipfs with the setup :)

main...hacky-ipfs

If you need to ask something feel free to ping me here or Discord

Change naming in chain selector package for MOVR & GLMR

Rather having right now read-only at MoonRiver & MoonBeam, let's change it to have there (Beta) to signal people things are in active development and not ready to use.

It would fits much better for upcoming design too.

sub-api teleport ready

I'm afraid that it could not use sub-api. Because If I want to teleport tokens from Kusama, I need to use ApiPromise of kusama. On the other hand, I would use ApiPromise of basilisk.

And sub-api would only return the API endpoint according to the current prefix. 👀

kodadot/nft-gallery#4297 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.