Git Product home page Git Product logo

xcm-global-registry's People

Contributors

devdanco avatar ebma avatar kichjang avatar mkchungs avatar shaunxw avatar sourabhniyogi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

xcm-global-registry's Issues

Add Reserve/Teleport information to assets

Suggesting more (meta)information to add to assets in this registry:

  • trusted reserve locations - local ecosystem reserve chains; right now, for most assets it will be just the originChain, but hopefully in the near future, most assets will also have reserve on local AssetHub. Bridged assets also need a local reserve, either AssetHub or the parachain that bridged them in.
  • teleport locations - local chains that support teleporting asset between them; this list will be identical to the "trusted reserve locations" list above, so we might skip it, but we could also explicitly add it.

Having this would be very useful to the ecosystem, and significantly reduce complexity in figuring out how to transfer these assets between chains. Right now, information on asset reserve locations or teleport locations is very hard to come by.

We can then create tooling for automated building of asset transfer XCMs, based on the information in this registry.

[Kusama-2004] Khala-BSX

Two BSX are registered on Khala. The one with "generalKey": "0x00000000" should probably be removed?

See Kusama-2004 XcAsset Registry

    {
        "paraID": 2090,
        "relayChain": "kusama",
        "symbol": "BSX",
        "decimals": 12,
        "interiorType": "x2",
        "xcmV1Standardized": [
            {
                "network": "kusama"
            },
            {
                "parachain": 2090
            },
            {
                "generalIndex": 0
            }
        ],
        "xcmV1MultiLocationByte": "0x010200a9200500",
        "xcmV1MultiLocation": {
            "v1": {
                "parents": 1,
                "interior": {
                    "x2": [
                        {
                            "parachain": 2090
                        },
                        {
                            "generalIndex": 0
                        }
                    ]
                }
            }
        },
        "asset": "9",
        "source": [
            "2004"
        ]
    },
    {
        "paraID": 2090,
        "relayChain": "kusama",
        "symbol": "BSX",
        "decimals": 12,
        "interiorType": "x2",
        "xcmV1Standardized": [
            {
                "network": "kusama"
            },
            {
                "parachain": 2090
            },
            {
                "generalKey": "0x00000000"
            }
        ],
        "xcmV1MultiLocationByte": "0x010200a920061000000000",
        "xcmV1MultiLocation": {
            "v1": {
                "parents": 1,
                "interior": {
                    "x2": [
                        {
                            "parachain": 2090
                        },
                        {
                            "generalKey": "0x00000000"
                        }
                    ]
                }
            }
        },
        "asset": "5",
        "source": [
            "2004"
        ]
    }

Phala Registry Parsing Failed

Step to reproduce:

on https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fphala.api.onfinality.io%2Fpublic-ws#/js

Code:

let res = await api.query.assetsRegistry.registryInfoByIds.entries()
console.log(res)

Errors:

Error: Unable to decode storage assetsRegistry.registryInfoByIds: entry 1:: createType(AssetsRegistryAssetRegistryInfo):: decodeU8aStruct: failed at 0x43410c010080ca396124000000000000… on reserveLocation (index 2/5): Option<XcmV3MultiLocation>:: decodeU8aStruct: failed at 0x0c010080ca3961240000000000000000… on interior (index 2/2): {"_enum":{"Here":"Null","X1":"XcmV3Junction","X2":"(XcmV3Junction,XcmV3Junction)","X3":"(XcmV3Junction,XcmV3Junction,XcmV3Junction)","X4":"(XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction)","X5":"(XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction)","X6":"(XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction)","X7":"(XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction)","X8":"(XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction)"}}:: Unable to create Enum via index 12, in Here, X1, X2, X3, X4, X5, X6, X7, X8
    at T._newType (https://polkadot.js.org/apps/modu.35d7b28670a9806f.js:50:6842)
    at T._formatStorageSetEntry (https://polkadot.js.org/apps/modu.35d7b28670a9806f.js:50:6328)
    at https://polkadot.js.org/apps/modu.35d7b28670a9806f.js:50:6069
    at r.reduce (<anonymous>)
    at T._formatStorageSet (https://polkadot.js.org/apps/modu.35d7b28670a9806f.js:50:6039)
    at https://polkadot.js.org/apps/modu.35d7b28670a9806f.js:50:5754
    at Array.map (<anonymous>)
    at T._formatOutput (https://polkadot.js.org/apps/modu.35d7b28670a9806f.js:50:5697)
    at T._formatResult (https://polkadot.js.org/apps/modu.35d7b28670a9806f.js:50:3438)
    at h (https://polkadot.js.org/apps/modu.35d7b28670a9806f.js:50:3929)

[Polkadot-2035] Phala-BNC

Abnormal record picked up by confidence check. Was expecting BNC to have "generalKey": "0x0001" instead of "generalKey": "0x0104"

See polkadot_2035 xcAsset registry

    {
        "paraID": 2030,
        "relayChain": "polkadot",
        "symbol": "BNC",
        "decimals": 12,
        "interiorType": "x2",
        "xcmV1Standardized": [
            {
                "network": "polkadot"
            },
            {
                "parachain": 2030
            },
            {
                "generalKey": "0x0104"
            }
        ],
        "xcmV1MultiLocationByte": "0x010200b91f06080104",
        "xcmV1MultiLocation": {
            "v1": {
                "parents": 1,
                "interior": {
                    "x2": [
                        {
                            "parachain": 2030
                        },
                        {
                            "generalKey": "0x0104"
                        }
                    ]
                }
            }
        },
        "asset": "8",
        "source": [
            "2035"
        ]
    }

Khala XcmV1MultiLocation byteEncode failure

Recent Khala runtime upgrade caused XcmV1MultiLocation byteEncode to fail at:

api.createType('XcmV1MultiLocation', multilocationStruct)

2023-04-04 15:36:57        REGISTRY: Unable to resolve type XcmV1MultiLocation, it will fail on construction
xcmV1MultiLocation_to_byte error {
    "v1": {
        "parents": 1,
        "interior": {
            "x2": [
                {
                    "parachain": 2085
                },
                {
                    "generalKey": "0x484b4f"
                }
            ]
        }
    }
} Error: createType(XcmV1MultiLocation):: DoNotConstruct: Cannot construct unknown type XcmV1MultiLocation
    at createTypeUnsafe (/Users/myichael/src/github.com/wolkdb/xcm-global-registry/node_modules/@polkadot/types-create/cjs/create/type.js:73:18)
    at TypeRegistry.createType (/Users/myichael/src/github.com/wolkdb/xcm-global-registry/node_modules/@polkadot/types/cjs/create/registry.js:345:46)
    at ApiPromise.createType (/Users/myichael/src/github.com/wolkdb/xcm-global-registry/node_modules/@polkadot/api/cjs/base/Decorate.js:135:27)
    at convert_xcmV1MultiLocation_to_byte (/Users/myichael/src/github.com/wolkdb/xcm-global-registry/xcmgarTool.js:191:33)
    at Object.convertXcmV1MultiLocationToByte (/Users/myichael/src/github.com/wolkdb/xcm-global-registry/xcmgarTool.js:456:16)
    at PhalaParser.processXcmAssetIdToLocation (/Users/myichael/src/github.com/wolkdb/xcm-global-registry/chainParsers/common_chainparser.js:340:80)
    at PhalaParser.processPhalaXcGar (/Users/myichael/src/github.com/wolkdb/xcm-global-registry/chainParsers/phala.js:122:89)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async PhalaParser.fetchXcGar (/Users/myichael/src/github.com/wolkdb/xcm-global-registry/chainParsers/phala.js:43:9)
    at async XCMGlobalAssetRegistryManager.crawlRegistry (/Users/myichael/src/github.com/wolkdb/xcm-global-registry/xcmgarManager.js:486:13)
    at async XCMGlobalAssetRegistryCLI.registry (/Users/myichael/src/github.com/wolkdb/xcm-global-registry/xcmgar:51:21)
    at async Command.<anonymous> (/Users/myichael/src/github.com/wolkdb/xcm-global-registry/xcmgar:132:6)
    at async Command.parseAsync (/Users/myichael/src/github.com/wolkdb/xcm-global-registry/node_modules/commander/lib/command.js:935:5)

[Polkadot-2031] Centrifuge-USDT

Check the correctness of USDT with Centrifuge team. "generalKey": "0x31393834" should have been "generalIndex": 1984?

  • "[{\"network\":\"polkadot\"},{\"parachain\":1000},{\"palletInstance\":50},{\"generalKey\":\"0x31393834\"}]": {
      "paraID": 1000,
      "relayChain": "polkadot",
      "symbol": "USDT",
      "decimals": 6,
      "interiorType": "x3",
      "xcmV1Standardized": [
          {
              "network": "polkadot"
          },
          {
              "parachain": 1000
          },
          {
              "palletInstance": 50
          },
          {
              "generalKey": "0x31393834"
          }
      ],
      "xcmV1MultiLocationByte": "0x010300a10f0432061031393834",
      "xcmV1MultiLocation": {
          "v1": {
              "parents": 1,
              "interior": {
                  "x3": [
                      {
                          "parachain": 1000
                      },
                      {
                          "palletInstance": 50
                      },
                      {
                          "generalKey": "0x31393834"
                      }
                  ]
              }
          }
      },
      "xcContractAddress": {},
      "xcCurrencyID": {
          "2031": {
              "ForeignAsset": "1"
          }
      },
      "confidence": 1,
      "source": [
          2031
      ]
    
    }

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.