Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Docstest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
sysadmin
Docstest
Commits
babf1515
Commit
babf1515
authored
Jul 28, 2022
by
Sydney Anne Erickson
Browse files
Options
Downloads
Plain Diff
Merge branch 'metadata-fix' into 'master'
Metadata fix See merge request
xx-labs/docs!1
parents
ee66942c
c21c14e9
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
metadata.json
+1
-0
1 addition, 0 deletions
metadata.json
src/md.ts
+4
-2
4 additions, 2 deletions
src/md.ts
tsconfig.json
+1
-0
1 addition, 0 deletions
tsconfig.json
with
6 additions
and
2 deletions
metadata.json
+
1
−
0
View file @
babf1515
This diff is collapsed.
Click to expand it.
src/md.ts
+
4
−
2
View file @
babf1515
...
@@ -15,12 +15,14 @@ import type { Codec, DefinitionRpcParam } from '@polkadot/types/types';
...
@@ -15,12 +15,14 @@ import type { Codec, DefinitionRpcParam } from '@polkadot/types/types';
import
fs
from
'
fs
'
;
import
fs
from
'
fs
'
;
import
{
result
as
rpcdata
}
from
'
../metadata.json
'
;
import
{
Metadata
,
TypeRegistry
,
Vec
}
from
'
@polkadot/types
'
;
import
{
Metadata
,
TypeRegistry
,
Vec
}
from
'
@polkadot/types
'
;
import
*
as
definitions
from
'
@polkadot/types/interfaces/definitions
'
;
import
*
as
definitions
from
'
@polkadot/types/interfaces/definitions
'
;
import
{
getStorage
as
getSubstrateStorage
}
from
'
@polkadot/types/metadata/decorate/storage/getStorage
'
;
import
{
getStorage
as
getSubstrateStorage
}
from
'
@polkadot/types/metadata/decorate/storage/getStorage
'
;
import
{
Text
}
from
'
@polkadot/types/primitive
'
;
import
{
Text
}
from
'
@polkadot/types/primitive
'
;
import
{
unwrapStorageType
}
from
'
@polkadot/types/primitive/StorageKey
'
;
import
{
unwrapStorageType
}
from
'
@polkadot/types/primitive/StorageKey
'
;
import
rpcdata
from
'
@polkadot/types-support/metadata/static-substrate
'
;
//
import rpcdata from '@polkadot/types-support/metadata/static-substrate';
import
{
stringCamelCase
,
stringLowerFirst
}
from
'
@polkadot/util
'
;
import
{
stringCamelCase
,
stringLowerFirst
}
from
'
@polkadot/util
'
;
interface
SectionItem
{
interface
SectionItem
{
...
@@ -414,7 +416,7 @@ function writeFile (name: string, ...chunks: any[]): void {
...
@@ -414,7 +416,7 @@ function writeFile (name: string, ...chunks: any[]): void {
export
function
main
():
void
{
export
function
main
():
void
{
const
registry
=
new
TypeRegistry
();
const
registry
=
new
TypeRegistry
();
const
metadata
=
new
Metadata
(
registry
,
rpcdata
);
const
metadata
=
new
Metadata
(
registry
,
rpcdata
as
`0x
${
string
}
`
);
registry
.
setMetadata
(
metadata
);
registry
.
setMetadata
(
metadata
);
...
...
This diff is collapsed.
Click to expand it.
tsconfig.json
+
1
−
0
View file @
babf1515
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
"baseUrl"
:
"/Users/mirabel/Downloads/test"
,
"baseUrl"
:
"/Users/mirabel/Downloads/test"
,
"moduleResolution"
:
"node"
,
"moduleResolution"
:
"node"
,
"esModuleInterop"
:
true
,
"esModuleInterop"
:
true
,
"resolveJsonModule"
:
true
,
"target"
:
"ES2015"
,
"target"
:
"ES2015"
,
"paths"
:
{
"paths"
:
{
"sample-polkadotjs-typegen/*"
:
[
"src/*"
],
"sample-polkadotjs-typegen/*"
:
[
"src/*"
],
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment