You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- abi: Contract's Abi as JSON. See [loadJson](#loadJson) command to import this file into a variable
173
190
-[chainId]: Forces a specific chain id for the request
@@ -176,11 +193,6 @@ Params:
176
193
-[fromBlock]: Block number to start the filter from
177
194
-[toBlock]: Block number to end the filter at
178
195
179
-
Output:
180
-
<pre>{
181
-
…
182
-
}</pre>
183
-
184
196
## date
185
197
Returns the current date in a human readable format.
186
198
@@ -228,28 +240,109 @@ Output (in variable `result`):
228
240
}</pre>
229
241
230
242
## encodeAbiParams
231
-
TODO
243
+
Generates ABI encoded data using the <ahref="https://docs.soliditylang.org/en/latest/abi-spec.html"target="_blank">ABI specification</a>, given a set of ABI parameters (inputs/outputs) and their corresponding values.
244
+
245
+
Usage:
246
+
```bash
247
+
encodeAbiParams $abiParams$values
248
+
```
249
+
250
+
Params:
251
+
- abiParams: Array of ABI parameters (inputs/outputs). Example: `[{ "name": "amount", "type": "uint256" }]`
252
+
- values: Array of values to encode. Example: `[ 123456 ]`
232
253
233
254
## encodePacked
234
-
TODO
255
+
Generates <ahref="https://docs.soliditylang.org/en/v0.8.18/abi-spec.html#non-standard-packed-mode"target="_blank">ABI non-standard packed encoded data</a> given a set of solidity types compatible with packed encoding.
256
+
257
+
Usage:
258
+
```bash
259
+
encodePacked $listOfTypes$listOfValues
260
+
```
261
+
262
+
Params:
263
+
- listOfTypes: List of solidity types compatible with packed encoding. Example: `['address', 'string', 'bytes16[]']`
264
+
- listOfValues: List of values to encode. Example: `['0x123…', 'Hello world', ['0x123…', '0x456…']]`
235
265
236
266
## eval
237
-
TODO
267
+
Evaluates a JavaScript expression between double quotation.
268
+
269
+
Usage:
270
+
```bash
271
+
eval expression
272
+
eval"2 + 2"# outputs 4
273
+
eval"[1, 2, 3]"# outputs the array
274
+
eval"({name: 'Fran', age: 44})"# outputs the object
275
+
eval expression > varName # Sends the result to a variable for later use
276
+
```
238
277
239
278
## findInSerialize
240
-
TODO
279
+
Finds objects where the serilized version includes the string passed as parameter.
280
+
281
+
Usage:
282
+
```bash
283
+
findInSerialize stringToFind $objects
284
+
```
285
+
286
+
Params:
287
+
- stringToFind: String to find in the array of objects
288
+
- objects: Array of objects to search in
241
289
242
290
## formatEther
243
-
TODO
291
+
Converts numerical wei to a string representation of ether.
292
+
293
+
Usage:
294
+
```bash
295
+
formatEther 1000000000000000000
296
+
```
297
+
298
+
Output:
299
+
<pre>1</pre>
300
+
301
+
Params:
302
+
- value: The wei value
244
303
245
304
## formatUnits
246
-
TODO
305
+
Divides a number by a given exponent of base 10, and formats it into a string representation of the number.
306
+
307
+
Usage:
308
+
```bash
309
+
formatUnits 420000000000 9
310
+
```
311
+
312
+
Output:
313
+
<pre>420</pre>
314
+
315
+
Params:
316
+
- value: BigNumber to format as a string, number or bigint
317
+
- decimals: Exponent of base 10
247
318
248
319
## fromProperty
249
-
TODO
320
+
Returns an array with the values of a property in an array of objects.
321
+
322
+
Usage:
323
+
```bash
324
+
fromProperty pathToProp $objects
325
+
```
326
+
327
+
Params:
328
+
- pathToProp: Path to the property to get. Example: `prop1.prop2.prop3`
329
+
- objects: Array of objects to get the property from
250
330
251
331
## getProof
252
-
TODO
332
+
Returns the account and storage values, including the Merkle proof, of the specified account.
0 commit comments