Upgrade guide (to current) (#1194)
* Upgrade guide (to current) * ClassOf * JSON example * s/srml/interfaces/ * Typos * Update UPGRADING.md Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com> * Add copy-to-apps script * Properly extend exstended derive types * Round out UPGRADING * Version in CHANGELOG * Typos * Update UPGRADING.md * Update CHANGELOG * Bump common * 0.90.0-beta.0 * Cleanups * Split 0.82 & 0.90 * Update UPGRADING.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update UPGRADING.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update UPGRADING.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update UPGRADING.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update UPGRADING.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update UPGRADING.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update UPGRADING.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update UPGRADING.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update UPGRADING.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update CHANGELOG.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update CHANGELOG.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Typo * findFunction -> api.findCall
This commit is contained in:
co-authored by
Amaury Martiny
Thibaut Sardan
parent
fe35527a65
commit
a45e313c84
@@ -3,17 +3,20 @@
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { AccountId, Header } from '@polkadot/types/interfaces';
|
||||
|
||||
import { AnyJsonObject } from '@polkadot/types/types';
|
||||
import { AnyJsonObject, Constructor } from '@polkadot/types/types';
|
||||
|
||||
import { u64, ClassOf } from '@polkadot/types';
|
||||
|
||||
// This is a bit hacky, but is exactly what it resolves to when compiled -
|
||||
// and as a bonus is gets the typing right
|
||||
const _Header: Constructor<Header> = ClassOf('Header');
|
||||
|
||||
/**
|
||||
* @name HeaderExtended
|
||||
* @description
|
||||
* A [[Block]] header with an additional `author` field that indicates the block author
|
||||
*/
|
||||
export default class HeaderExtended extends ClassOf('Header') {
|
||||
export default class HeaderExtended extends _Header {
|
||||
private _author?: AccountId;
|
||||
|
||||
public constructor (header: Header | null = null, sessionValidators: AccountId[] = []) {
|
||||
|
||||
@@ -3,17 +3,21 @@
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { ReferendumIndex, ReferendumInfo } from '@polkadot/types/interfaces/democracy';
|
||||
import { AnyJsonObject, Constructor } from '@polkadot/types/types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
import { ClassOf, createType } from '@polkadot/types';
|
||||
import { AnyJsonObject } from '@polkadot/types/types';
|
||||
|
||||
// This is a bit hacky, but is exactly what it resolves to when compiled -
|
||||
// and as a bonus is gets the typing right
|
||||
const _ReferendumInfo: Constructor<ReferendumInfo> = ClassOf('ReferendumInfo');
|
||||
|
||||
/**
|
||||
* @name ReferendumInfoExtended
|
||||
* @description
|
||||
* A [[ReferendumInfo]] with an additional `index` field
|
||||
*/
|
||||
export default class ReferendumInfoExtended extends ClassOf('ReferendumInfo') {
|
||||
export default class ReferendumInfoExtended extends _ReferendumInfo {
|
||||
private _index: ReferendumIndex;
|
||||
|
||||
public constructor (value: ReferendumInfo | ReferendumInfoExtended, index?: BN | number) {
|
||||
|
||||
Reference in New Issue
Block a user