Giter Site home page Giter Site logo

Comments (6)

valentunn avatar valentunn commented on June 14, 2024 1

@wliyongfeng we found a workaround which uses typesBundle overrides. This snippet is for rococo but it works the same way for Kusama Asset Hub by adjusting runtime versions and specName

import { OverrideBundleDefinition } from "@polkadot/types/types";

const definitions: OverrideBundleDefinition = {
  types: [
    {
      minmax: [0, 10004],
      types: {
        NovaAssetId: "Option<AssetId>"
      },
    },
    {
      minmax: [10005, null],
      types: {
        NovaAssetId: "Option<MultiLocation>"
      },
    },
  ],
  signedExtensions: {
    ChargeAssetTxPayment: {
      extrinsic: {
        tip: 'Compact<Balance>',
        // eslint-disable-next-line sort-keys
        assetId: 'NovaAssetId'
      },
      payload: {}
    }
  }
};

export default { typesBundle: { spec: { "statemine": definitions } } };

from api.

wliyongfeng avatar wliyongfeng commented on June 14, 2024 1

@valentunn I tried and it works. It's very nice, love you.

from api.

wliyongfeng avatar wliyongfeng commented on June 14, 2024

@jacogr Could you take a look at this issue and #5734? They are crucial to explorers who depend on polkadot api.

from api.

valentunn avatar valentunn commented on June 14, 2024

This seems to be related to ChargeAssetTxPayment signed extension being used in transactions. Our guess is that API doesn't infer types of signed extensions from runtime metadata correctly. For ChargeAssetTxPayment, its type is a struct with tip and assetId. Type for assetId was changed from u32 to MultiLocation with most recent Kusama/Westmint upgrades
This introduces issues for our indexers as well

from api.

wliyongfeng avatar wliyongfeng commented on June 14, 2024

@jacogr Could you release a new version of @polkadot/api? So we can update our dependencies.

from api.

polkadot-js-bot avatar polkadot-js-bot commented on June 14, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.

from api.

Related Issues (20)

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.