forked from Joystream/hydra
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Updated @polkadot/* dependencies, added support for metadata v14…
… in hydra-typegen): updated @po affects: @joystream/bn-typeorm, @joystream/hydra-cli, @joystream/hydra-common, @joystream/hydra-db-utils, @joystream/hydra-e2e-tests, @joystream/hydra-indexer-gateway, @joystream/hydra-indexer, @joystream/hydra-processor, @joystream/hydra-typegen, sample, sample-mappings - Updated @polkadot/* dependencies (5.9.1 => 8.9.1) - Updated bn.js (^5.2.1) and @types/bn.js (^5.1.0) - Updated prettier (^2.7.1) - Added '@polkadot/api-augment/substrate' in SubstrateService.ts - Updated \`hydra-typegen\` to support v14 metadata parsing (type definitions in metadata), dropped support for \`customTypes\` and older metadata BREAKING CHANGE: customTypes and metadata < v14 are no longer supported, @polkadot/api was updated from 5.9.1 => 8.9.1 ISSUES CLOSED: Joystream#495
- Loading branch information
Showing
35 changed files
with
1,058 additions
and
800 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import '@polkadot/api-augment/substrate' | ||
|
||
import { | ||
Hash, | ||
Header, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,9 @@ | ||
import path from 'path' | ||
import fs from 'fs' | ||
import { IConfig } from '../commands/typegen' | ||
|
||
export function validate({ events, calls, customTypes }: IConfig): void { | ||
export function validate({ events, calls }: IConfig): void { | ||
if (events.length === 0 && calls.length === 0) { | ||
throw new Error( | ||
`Nothing to generate: at least one event or call should be provided.` | ||
) | ||
} | ||
|
||
if (customTypes) { | ||
if (customTypes.typedefsLoc === undefined) { | ||
throw new Error( | ||
`Missing the type defintion location for the custom for types. Did you forget to add typedefsLoc?` | ||
) | ||
} | ||
const typedefsPath = path.resolve(customTypes.typedefsLoc) | ||
if (!fs.existsSync(typedefsPath)) { | ||
throw new Error(`Cannot find type definition file at ${typedefsPath}`) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.