Skip to content

Commit

Permalink
fix: the AAVE optimizer bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hedgar2017 committed Aug 27, 2024
1 parent 1ba1382 commit 8b75894
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions solidity/simple/aave.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//! { "cases": [ {
//! "name": "first",
//! "inputs": [
//! {
//! "method": "first",
//! "calldata": [
//! "0x3c",
//! "4"
//! ]
//! }
//! ],
//! "expected": [
//! "0x2c"
//! ]
//! } ] }

// SPDX-License-Identifier: MIT

pragma solidity >=0.4.16;

contract Test {
function first(
uint256 data,
uint256 reserveIndex
) public pure returns(uint256) {
uint256 bit = 1 << reserveIndex;
data &= ~bit;
return data;
}
}

0 comments on commit 8b75894

Please sign in to comment.