Skip to content

Commit

Permalink
edit comments
Browse files Browse the repository at this point in the history
  • Loading branch information
massun-onibakuchi committed Jun 4, 2024
1 parent 03ee1c3 commit dc1ee57
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ For more information on how to use Foundry, check out the [Foundry Github Reposi
- [ ] Approve once on contract deployment instead of every liquidation
- Replace `jumpi` with other operations
- [x] Use `mload(type(uint256).max)` for `jumpi` if-else-revert pattern (`GrimReaperHuff`)
- [x] Abuse `returndatasize`, `calldatasize`, `chainid` and `msize` for `push` operations
- [x] Abuse `returndatasize`, `calldatasize`, `chainid` and `msize` for `push` operations (`GrimReaperHuff`)

## Acknowledgements

Expand Down
1 change: 1 addition & 0 deletions src/GrimReaper.huff
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@


/// @dev Read memory at 0x00 will trigger a memory expansion if the memory location is not already allocated.
/// @dev Consumes all gas if the condition `success` is false.
#define macro IF_FALSE_REVERT_BY_BURNING_GAS() = takes (1) returns (1) {
// [success]
0x01 swap1 sub // [0 (if true), type(uint256).max (if false)]
Expand Down
1 change: 1 addition & 0 deletions src/OptimizedGrimReaper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ contract OptimizedGrimReaper {
/// @dev function liquidationCall(address collateralAsset,address debtAsset,address user,uint256 debtToCover,bool receiveAToken)
bytes4 internal constant LIQUIDATION_CALL_ID = 0x00a718a9;

/// @dev Dispatching function calls manually saves tiny gas. It's not much worth it.
fallback() external payable virtual {
assembly {
// only the owner of this contract is allowed to call this function
Expand Down

0 comments on commit dc1ee57

Please sign in to comment.