Call Encoder Utility
Raw calldata for logic calls can be generated with the callencode command. Call Encode can be performed on objects from the lab memory or directly with an object literal. The returned calldata is the doc-encoded hex string of the object.
- Syntax
>> callencode [identifier | object]
- Example (Arg Value)
>> callencode {name: 500, value: "manish"}
0x0d5f064576c5016e616d650301f476616c7565066d616e697368
- Example (Memory Var)
>> set A 500
>> set B "manish"
>> callencode {name: A, value: B}
0x0d5f064576c5016e616d650301f476616c7565066d616e697368
>> set C {name: A, value: B}
>> callencode C
0x0d5f064576c5016e616d650301f476616c7565066d616e697368
Call Decoder Utility
Raw output data from logic calls can be decoded with the calldecode command. Call Decode can be performed on objects from the lab memory or directly with an object literal.
- Syntax
>> calldecode [identifier | object data] from [name].[callsite]
- Example (Arg Value)
>> set A 0x0d2f06256f6b02
>> calldecode A from ERC20.Mint!
// Outputs ||| ok: true
- Example (Memory Var)
>> calldecode 0x0d2f06256f6b02 from ERC20.Mint!
// Outputs ||| ok: true
Error Decoding Utility
Decoding error objects returned by logic call can be done with the error decoding utility. The given error data is decoded for the error object of the respective engine and printed. Currently the only supported engine for error decoding is PISA.
- Syntax
>> errdecode [error data | identifier] from [engine]
Example:
>> errdecode 0x0e4f0666ce01737472696e6768656c6c6f213f068602726f6f742e7365747570205b3078305d726f6f742e446f205b3078305d202e2e2e205b3078323a205448524f57203078305d from PISA
// prints error object
>> set err 0x0e4f0666ce01737472696e6768656c6c6f213f068602726f6f742e7365747570205b3078305d726f6f742e446f205b3078305d202e2e2e205b3078323a205448524f57203078305d
>> errdecode err from PISA
// prints error object
Slothash Utility
Slothash for accessing storage data can be generated with the slothash command. Currently, it only supports a simple slot hashing by accepting an uint8 slot and returning its hash, but this will be extended when PISA's storage layer is complete.
- Syntax
>> slothash [slot]
- Example
>> slothash 0
03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c111314