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

fix!: metadata updates, change documentation to docs #616

Merged
merged 5 commits into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/dist/app.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/src/openapi-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2175,7 +2175,7 @@ components:
fallback:
type: string
example: "0x00"
documentation:
docs:
type: string
example: " Information concerning any given referendum.\n\n TWOX-NOTE: SAFE as indexes are not under an attacker’s control."
description: Metadata of a storage item from a FRAME pallet.
Expand Down
1,580 changes: 790 additions & 790 deletions docs/yarn.lock

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@
"test:init-e2e-tests:westend": "python3 ./scripts/run_chain_tests.py --chain westend"
},
"dependencies": {
"@polkadot/api": "^5.0.1",
"@polkadot/apps-config": "0.94.2-72",
"@polkadot/util-crypto": "^7.0.1",
"@polkadot/api": "^5.1.1",
"@polkadot/apps-config": "0.94.2-79",
"@polkadot/util-crypto": "^7.0.2",
"@polkadot/x-rxjs": "^6.11.1",
"@substrate/calc": "^0.2.1",
"@substrate/calc": "^0.2.2",
"confmgr": "^1.0.6",
"express": "^4.17.1",
"express-winston": "^4.1.0",
Expand All @@ -71,15 +71,15 @@
"tsc-watch": "^4.4.0"
},
"resolutions": {
"@polkadot/api": "^5.0.1",
"@polkadot/api-contract": "^5.0.1",
"@polkadot/hw-ledger": "^7.0.1",
"@polkadot/keyring": "^7.0.1",
"@polkadot/networks": "^7.0.1",
"@polkadot/phishing": "^0.6.222",
"@polkadot/types": "^5.0.1",
"@polkadot/util": "^7.0.1",
"@polkadot/util-crypto": "^7.0.1",
"@polkadot/api": "^5.1.1",
"@polkadot/api-contract": "^5.1.1",
"@polkadot/hw-ledger": "^7.0.2",
"@polkadot/keyring": "^7.0.2",
"@polkadot/networks": "^7.0.2",
"@polkadot/phishing": "^0.6.231",
"@polkadot/types": "^5.1.1",
"@polkadot/util": "^7.0.2",
"@polkadot/util-crypto": "^7.0.2",
"@polkadot/wasm-crypto": "^4.1.2",
"node-forge": ">=0.10.0",
"node-fetch": ">=2.6.1",
Expand Down
6 changes: 2 additions & 4 deletions src/services/blocks/BlocksService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ export class BlocksService extends AbstractService {
// we set to false if !isSigned because unsigned never pays a fee
paysFee: isSigned ? null : false,
docs: extrinsicDocs
? this.sanitizeDocs(extrinsic.meta.documentation)
? this.sanitizeDocs(extrinsic.meta.docs)
: undefined,
};
});
Expand Down Expand Up @@ -384,9 +384,7 @@ export class BlocksService extends AbstractService {
method: event.method,
},
data: event.data,
docs: eventDocs
? this.sanitizeDocs(event.data.meta.documentation)
: undefined,
docs: eventDocs ? this.sanitizeDocs(event.data.meta.docs) : undefined,
};

if (phase.isApplyExtrinsic) {
Expand Down
4 changes: 1 addition & 3 deletions src/services/pallets/PalletsStorageService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@ export class PalletsStorageService extends AbstractService {
storageItemMeta
) as unknown as ISanitizedStorageItemMetadata;

normalizedStorageItemMeta.documentation = this.sanitizeDocs(
storageItemMeta.documentation
);
normalizedStorageItemMeta.docs = this.sanitizeDocs(storageItemMeta.docs);

return normalizedStorageItemMeta;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"plain": "PropIndex"
},
"fallback": "0x00000000",
"documentation": " The number of (public) proposals that have been made so far."
"docs": " The number of (public) proposals that have been made so far."
},
{
"name": "PublicProps",
Expand All @@ -22,7 +22,7 @@
"plain": "Vec<(PropIndex,Hash,AccountId)>"
},
"fallback": "0x00",
"documentation": " The public proposals. Unsorted. The second item is the proposal's hash."
"docs": " The public proposals. Unsorted. The second item is the proposal's hash."
},
{
"name": "DepositOf",
Expand All @@ -36,7 +36,7 @@
}
},
"fallback": "0x00",
"documentation": " Those who have locked a deposit.\n\n TWOX-NOTE: Safe, as increasing integer keys are safe."
"docs": " Those who have locked a deposit.\n\n TWOX-NOTE: Safe, as increasing integer keys are safe."
},
{
"name": "Preimages",
Expand All @@ -50,7 +50,7 @@
}
},
"fallback": "0x00",
"documentation": " Map of hashes to the proposal preimage, along with who registered it and their deposit.\n The block number is the block at which it was deposited."
"docs": " Map of hashes to the proposal preimage, along with who registered it and their deposit.\n The block number is the block at which it was deposited."
},
{
"name": "ReferendumCount",
Expand All @@ -59,7 +59,7 @@
"plain": "ReferendumIndex"
},
"fallback": "0x00000000",
"documentation": " The next free referendum index, aka the number of referenda started so far."
"docs": " The next free referendum index, aka the number of referenda started so far."
},
{
"name": "LowestUnbaked",
Expand All @@ -68,7 +68,7 @@
"plain": "ReferendumIndex"
},
"fallback": "0x00000000",
"documentation": " The lowest referendum index representing an unbaked referendum. Equal to\n `ReferendumCount` if there isn't a unbaked referendum."
"docs": " The lowest referendum index representing an unbaked referendum. Equal to\n `ReferendumCount` if there isn't a unbaked referendum."
},
{
"name": "ReferendumInfoOf",
Expand All @@ -82,7 +82,7 @@
}
},
"fallback": "0x00",
"documentation": " Information concerning any given referendum.\n\n TWOX-NOTE: SAFE as indexes are not under an attacker’s control."
"docs": " Information concerning any given referendum.\n\n TWOX-NOTE: SAFE as indexes are not under an attacker’s control."
},
{
"name": "VotingOf",
Expand All @@ -96,7 +96,7 @@
}
},
"fallback": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"documentation": " All votes for a particular voter. We store the balance for the number of votes that we\n have recorded. The second item is the total amount of delegations, that will be added.\n\n TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway."
"docs": " All votes for a particular voter. We store the balance for the number of votes that we\n have recorded. The second item is the total amount of delegations, that will be added.\n\n TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway."
},
{
"name": "Locks",
Expand All @@ -110,7 +110,7 @@
}
},
"fallback": "0x00",
"documentation": " Accounts for which there are locks in action which may be removed at some point in the\n future. The value is the block number at which the lock expires and may be removed.\n\n TWOX-NOTE: OK ― `AccountId` is a secure hash."
"docs": " Accounts for which there are locks in action which may be removed at some point in the\n future. The value is the block number at which the lock expires and may be removed.\n\n TWOX-NOTE: OK ― `AccountId` is a secure hash."
},
{
"name": "LastTabledWasExternal",
Expand All @@ -119,7 +119,7 @@
"plain": "bool"
},
"fallback": "0x00",
"documentation": " True if the last referendum tabled was submitted externally. False if it was a public\n proposal."
"docs": " True if the last referendum tabled was submitted externally. False if it was a public\n proposal."
},
{
"name": "NextExternal",
Expand All @@ -128,7 +128,7 @@
"plain": "(Hash,VoteThreshold)"
},
"fallback": "0x00",
"documentation": " The referendum to be tabled whenever it would be valid to table an external proposal.\n This happens when a referendum needs to be tabled and one of two conditions are met:\n - `LastTabledWasExternal` is `false`; or\n - `PublicProps` is empty."
"docs": " The referendum to be tabled whenever it would be valid to table an external proposal.\n This happens when a referendum needs to be tabled and one of two conditions are met:\n - `LastTabledWasExternal` is `false`; or\n - `PublicProps` is empty."
},
{
"name": "Blacklist",
Expand All @@ -142,7 +142,7 @@
}
},
"fallback": "0x00",
"documentation": " A record of who vetoed what. Maps proposal hash to a possible existent block number\n (until when it may not be resubmitted) and who vetoed it."
"docs": " A record of who vetoed what. Maps proposal hash to a possible existent block number\n (until when it may not be resubmitted) and who vetoed it."
},
{
"name": "Cancellations",
Expand All @@ -156,7 +156,7 @@
}
},
"fallback": "0x00",
"documentation": " Record of all proposals that have been subject to emergency cancellation."
"docs": " Record of all proposals that have been subject to emergency cancellation."
},
{
"name": "StorageVersion",
Expand All @@ -165,7 +165,7 @@
"plain": "Releases"
},
"fallback": "0x00",
"documentation": " Storage version of the pallet.\n\n New networks start with last version."
"docs": " Storage version of the pallet.\n\n New networks start with last version."
}
]
}
Loading