Skip to content

Commit

Permalink
test updated 4naly3er SARIF
Browse files Browse the repository at this point in the history
  • Loading branch information
mcp-coinbase committed Sep 18, 2024
1 parent 7bd9170 commit 313a370
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/hardcoded_gas_limits.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pragma solidity 0.6.4;

interface ICallable {
function callMe() external;
}

contract HardcodedNotGood {

address payable _callable = 0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa;
ICallable callable = ICallable(_callable);

constructor() public payable {
}

function doTransfer(uint256 amount) public {
_callable.transfer(amount);
}

function doSend(uint256 amount) public {
_callable.send(amount);
}

function callLowLevel() public {
_callable.call.value(0).gas(10000)("");
}

function callWithArgs() public {
callable.callMe{gas: 10000}();
}
}

0 comments on commit 313a370

Please sign in to comment.