Skip to content

Conversation

@jacogr
Copy link
Member

@jacogr jacogr commented Jul 21, 2019

  • Needed for Extrinsic v2 #1150 (e2e testing)
  • Adds Weight calculation primitives
  • Created srml/{im-online, grandpa} based on new types

@jacogr jacogr added the WIP Work in Progress label Jul 21, 2019
@jacogr jacogr removed the WIP Work in Progress label Jul 21, 2019
"modifier": "Optional",
"type": {
"PlainType": "u32"
"PlainType": "Weight"
Copy link
Member Author

@jacogr jacogr Jul 21, 2019

Choose a reason for hiding this comment

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

This is going to create some issues down the line as soon as Babe comes online. Babe also has weights, defined as u64, but the above is u32

/// Number of blocks after which the change will be enacted.
delay: 'BlockNumber'
},
StoredPendingChange: {
Copy link
Member Author

Choose a reason for hiding this comment

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

Not technically needed, we had a class for this - but since we created grandpa, removed the class and moved the definition in here

function setImports ({ codecTypes, otherTypes, ownTypes }: TypeImports, type: string | null, codecType: string | null): void {
if (type && !ownTypes.includes(type) && !otherTypes[type]) {
otherTypes[type] = true;
function setImports ({ codecTypes, ownTypes, primitiveTypes, substrateTypes }: TypeImports, type: string | null, codecType: string | null): void {
Copy link
Member Author

Choose a reason for hiding this comment

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

Make is slightly more clever - it can now import from types/type in addition to types/primitive

@@ -0,0 +1,7 @@
// Copyright 2017-2019 @polkadot/types authors & contributors
Copy link
Member Author

Choose a reason for hiding this comment

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

New, if you don't care where it comes from, you can just import the types from @polkadot/types/srml/types

export { default as ApprovalFlag } from './ApprovalFlag';
export { default as AssetOf } from './AssetOf';
export { default as AuthorityId } from './AuthorityId';
export { default as AuthorityWeight } from './AuthorityWeight';
Copy link
Member Author

Choose a reason for hiding this comment

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

Moved to srml/grandpa for cleanup

export { default as SetIndex } from './SetIndex';
export { default as SignaturePayload, SignaturePayloadRaw } from './SignaturePayload';
export { default as StakingLedger } from './StakingLedger';
export { default as StoredPendingChange } from './StoredPendingChange';
Copy link
Member Author

Choose a reason for hiding this comment

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

Moved to srml/grandpa for cleanup

@jacogr
Copy link
Member Author

jacogr commented Jul 21, 2019

Merging to continue with the Extrinsics v2 testing - since this is just types from the newest metadata, it should be relatively safe.

@jacogr jacogr merged commit 3d7a460 into master Jul 21, 2019
@jacogr jacogr deleted the jg-metadata-bump branch July 21, 2019 08:35
ianhe8x pushed a commit to plugblockchain/api.js that referenced this pull request Jul 30, 2019
* Latest metadata for substrate 2.x

* Save json...

* Latest types

* typo in name

* typo in name

* Export all types from the seperate modules
ianhe8x pushed a commit to plugblockchain/api.js that referenced this pull request Jul 31, 2019
* Latest metadata for substrate 2.x

* Save json...

* Latest types

* typo in name

* typo in name

* Export all types from the seperate modules
@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 8, 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