This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// @notice Sort | |
/// @notice Loads the unsorted array from calldata and returns the sorted array | |
#define macro SORT() = takes (0) returns (0) { | |
// copy array from calldata to memory | |
0x24 calldataload // [array_length] | |
0x20 // [0x20, array_length] | |
mul // [32 * array_length] | |
0x44 // [0x44, 32 * array_length] | |
0x00 // [0x00, 0x44, 32 * array_length] | |
calldatacopy |