Fix metadata example (#2967)

This commit is contained in:
Jaco Greeff 2020-06-16 12:39:10 +02:00 committed by GitHub
parent 5b92c75521
commit b3a76cd862
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,15 +42,15 @@ export const rpcQueryState: Snippet = {
text: 'Get state metadata',
label: { color: 'pink', children: 'RPC', size: 'tiny' },
code: `// retrieve and log the complete metadata of your node
const { magicNumber,metadata } = await api.rpc.state.getMetadata();
const metadata = await api.rpc.state.getMetadata();
console.log( 'Magic number: ' + magicNumber );
console.log( 'Metadata: ' + metadata.raw );
console.log('version: ' + metadata.version);
console.log('formatted: ' + JSON.stringify(metadata.asLatest.toHuman(), null, 2));
`
};
export const rpcSysthemInfo: Snippet = {
value: 'rpcSysthemInfo',
value: 'rpcSystemInfo',
text: 'Get system information',
label: { color: 'pink', children: 'RPC', size: 'tiny' },
code: `// Retrieve the chain & node information information via rpc calls