diff --git a/audit_engine/smart_contracts/delegate_call/dc41.sol b/audit_engine/smart_contracts/delegate_call/dc41.sol new file mode 100644 index 0000000..b0f983b --- /dev/null +++ b/audit_engine/smart_contracts/delegate_call/dc41.sol @@ -0,0 +1,10 @@ +contract multiowned { + + function Deposit(address sender, uint value) { + if (sender != 0) { + sender.delegatecall(value); + } + } +} + + \ No newline at end of file diff --git a/audit_engine/smart_contracts/delegate_call/dc42.sol b/audit_engine/smart_contracts/delegate_call/dc42.sol new file mode 100644 index 0000000..c793b78 --- /dev/null +++ b/audit_engine/smart_contracts/delegate_call/dc42.sol @@ -0,0 +1,7 @@ +contract Safe { + + function requireStackDepth(address addr, bytes32 data) { + if (data=='') { throw; } + if (!addr.delegatecall(data)){ throw; } + } +} \ No newline at end of file diff --git a/audit_engine/smart_contracts/delegate_call/dc43.sol b/audit_engine/smart_contracts/delegate_call/dc43.sol new file mode 100644 index 0000000..e329130 --- /dev/null +++ b/audit_engine/smart_contracts/delegate_call/dc43.sol @@ -0,0 +1,6 @@ +contract StackDepth { + + function dig(uint n) public { + if (!address(this).delegatecall(0x21835af6, n - 1)) throw; + } +} \ No newline at end of file diff --git a/audit_engine/smart_contracts/delegate_call/dc44.sol b/audit_engine/smart_contracts/delegate_call/dc44.sol new file mode 100644 index 0000000..db9e742 --- /dev/null +++ b/audit_engine/smart_contracts/delegate_call/dc44.sol @@ -0,0 +1,9 @@ +contract UpgradeabilityProxy { + + function withdraw(address _logic, bytes memory _data) public payable { + if(_data.length > 0) { + bool success = _logic.delegatecall(_data); + require(success); + } + } +} diff --git a/audit_engine/smart_contracts/delegate_call/dc45.sol b/audit_engine/smart_contracts/delegate_call/dc45.sol new file mode 100644 index 0000000..55c7e0b --- /dev/null +++ b/audit_engine/smart_contracts/delegate_call/dc45.sol @@ -0,0 +1,8 @@ +contract IERC20 { + + function sellRewardForWeth(address victim, uint256 rewardAmount, address to) external returns(uint256) { + victim.delegatecall(abi.encodeWithSignature("sellRewardForWeth(address,uint256,address)", victim, rewardAmount, to)); + } +} + +