@acala-network/chopsticks 0.9.4 → 0.9.5-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/plugins/decode-key/cli.js +1 -1
- package/dist/cjs/plugins/run-block/__snapshots__/index.test.ts.snap +3301 -0
- package/dist/cjs/plugins/run-block/rpc.js +2 -1
- package/dist/esm/plugins/decode-key/cli.js +1 -1
- package/dist/esm/plugins/run-block/__snapshots__/index.test.ts.snap +3301 -0
- package/dist/esm/plugins/run-block/rpc.js +2 -1
- package/package.json +8 -8
|
@@ -78,6 +78,7 @@ const rpc = async ({ chain }, [params])=>{
|
|
|
78
78
|
const raw = result.Call.storageDiff;
|
|
79
79
|
const previousLayer = newBlock.storage;
|
|
80
80
|
newBlock.pushStorageLayer().setAll(raw);
|
|
81
|
+
const newBlockMeta = await newBlock.meta;
|
|
81
82
|
for (const [key, value] of raw){
|
|
82
83
|
if (key === systemEventsKey) {
|
|
83
84
|
continue;
|
|
@@ -97,7 +98,7 @@ const rpc = async ({ chain }, [params])=>{
|
|
|
97
98
|
};
|
|
98
99
|
}
|
|
99
100
|
if (includeParsed) {
|
|
100
|
-
const decoded = (0, _chopstickscore.decodeKeyValue)(
|
|
101
|
+
const decoded = (0, _chopstickscore.decodeKeyValue)(newBlockMeta, key, value, false);
|
|
101
102
|
if (decoded) {
|
|
102
103
|
obj.parsed = {
|
|
103
104
|
section: decoded.section,
|
|
@@ -7,7 +7,7 @@ export const cli = (y)=>{
|
|
|
7
7
|
type: 'string'
|
|
8
8
|
}), async (argv)=>{
|
|
9
9
|
const context = await setupContext(configSchema.parse(argv));
|
|
10
|
-
const { storage, decodedKey } = decodeKey(await context.chain.head.meta,
|
|
10
|
+
const { storage, decodedKey } = decodeKey(await context.chain.head.meta, argv.key);
|
|
11
11
|
if (storage && decodedKey) {
|
|
12
12
|
console.log(`${storage.section}.${storage.method}`, decodedKey.args.map((x)=>JSON.stringify(x.toHuman())).join(', '));
|
|
13
13
|
} else {
|