@acala-network/chopsticks-core 0.14.0 → 0.14.1
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.
|
@@ -213,6 +213,22 @@ class GenesisProvider {
|
|
|
213
213
|
if (params.length < 1) throw Error('invalid params');
|
|
214
214
|
return _class_private_field_get(this, _genesis).genesis.raw.top[params[0]];
|
|
215
215
|
}
|
|
216
|
+
case 'state_queryStorageAt':
|
|
217
|
+
{
|
|
218
|
+
if (params.length < 2) throw Error('invalid params');
|
|
219
|
+
const [keys, hash] = params;
|
|
220
|
+
const values = [];
|
|
221
|
+
for (const key of keys){
|
|
222
|
+
const storage = _class_private_field_get(this, _genesis).genesis.raw.top[key];
|
|
223
|
+
if (storage) {
|
|
224
|
+
values.push(storage);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return {
|
|
228
|
+
block: hash,
|
|
229
|
+
changes: values
|
|
230
|
+
};
|
|
231
|
+
}
|
|
216
232
|
default:
|
|
217
233
|
throw Error(`${method} not implemented`);
|
|
218
234
|
}
|
|
@@ -149,6 +149,22 @@ import { defaultLogger, isPrefixedChildKey } from './index.js';
|
|
|
149
149
|
if (params.length < 1) throw Error('invalid params');
|
|
150
150
|
return this.#genesis.genesis.raw.top[params[0]];
|
|
151
151
|
}
|
|
152
|
+
case 'state_queryStorageAt':
|
|
153
|
+
{
|
|
154
|
+
if (params.length < 2) throw Error('invalid params');
|
|
155
|
+
const [keys, hash] = params;
|
|
156
|
+
const values = [];
|
|
157
|
+
for (const key of keys){
|
|
158
|
+
const storage = this.#genesis.genesis.raw.top[key];
|
|
159
|
+
if (storage) {
|
|
160
|
+
values.push(storage);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return {
|
|
164
|
+
block: hash,
|
|
165
|
+
changes: values
|
|
166
|
+
};
|
|
167
|
+
}
|
|
152
168
|
default:
|
|
153
169
|
throw Error(`${method} not implemented`);
|
|
154
170
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acala-network/chopsticks-core",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"author": "Acala Developers <hello@acala.network>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"depcheck": "npx depcheck"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@acala-network/chopsticks-executor": "0.14.
|
|
14
|
+
"@acala-network/chopsticks-executor": "0.14.1",
|
|
15
15
|
"@polkadot/rpc-provider": "^12.3.1",
|
|
16
16
|
"@polkadot/types": "^12.3.1",
|
|
17
17
|
"@polkadot/types-codec": "^12.3.1",
|