Std Logs
Std Logs expand upon the logging events from the DSTest
library.
Events
event log_array(uint256[] val);
event log_array(int256[] val);
event log_named_array(string key, uint256[] val);
event log_named_array(string key, int256[] val);
Usage
This section provides usage examples.
log_array
event log_array(<type>[] val);
Where <type>
can be int256
, uint256
, address
.
Example
// Assuming storage
// uint256[] data = [10, 20, 30, 40, 50];
emit log_array(data);
log_named_array
event log_named_array(string key, <type>[] val);
Where <type>
can be int256
, uint256
, address
.
Example
// Assuming storage
// uint256[] data = [10, 20, 30, 40, 50];
emit log_named_array("Data", data);