Fix metadata example (#2967)
This commit is contained in:
parent
5b92c75521
commit
b3a76cd862
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user