Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WeightToFeeCoefficient type #2296

Merged

Conversation

danforbes
Copy link
Contributor

Just taking a stab at this, I tried running yarn polkadot-types-from-defs --input ./packages/types/src/interfaces/support/ --package extrinsic but I get an error that says it can't find /packages/types/src/interfaces/support/default/types.ts.

cc: @amaurymartiny

@danforbes
Copy link
Contributor Author

NB: this is for paritytech/substrate-api-sidecar#50

Copy link
Member

@jacogr jacogr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link
Member

@jacogr jacogr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to add the interfaces/support/definitions.ts as an import from interfaces/definitions.ts - the rest are all generated on CI (So running yarn build:interfaces is optional, but actually really nice to do :))

@danforbes
Copy link
Contributor Author

One more NB...this relates to paritytech/substrate#6076

@danforbes danforbes force-pushed the add-weighttofeecoefficient-type branch from 8230229 to 344ced9 Compare May 20, 2020 21:45
@danforbes
Copy link
Contributor Author

Thanks for the tips, @jacogr - should be all set now 🙏 Just to confirm, Polkadot JS API will take care of converting snake-case to camel-case, correct? The names of the Substrate types are coeff_frac and coeff_int.

@jacogr
Copy link
Member

jacogr commented May 20, 2020

Actually,

  • SCALE does not encode the names/keys only the values, so it can actually be called anything
  • where non-SCALE objects are passed over RPC, serde is actually set on Substrate to always output camelCase

TL;DR it is just convenience.

Copy link
Member

@jacogr jacogr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@jacogr jacogr merged commit 4bd2f2f into polkadot-js:master May 20, 2020
@danforbes danforbes deleted the add-weighttofeecoefficient-type branch June 11, 2020 13:39
@polkadot-js-bot
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Jun 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants