mirror of https://github.com/crytic/slither
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
567 B
28 lines
567 B
6 years ago
|
/*
|
||
|
Fake proxy, do not use
|
||
|
*/
|
||
|
|
||
|
pragma solidity ^0.5.0;
|
||
|
|
||
|
contract Proxy{
|
||
|
|
||
|
address destination;
|
||
|
|
||
|
function myFunc() public{}
|
||
|
|
||
|
function () external{
|
||
|
uint size_destination_code;
|
||
|
assembly{
|
||
|
size_destination_code := extcodesize(destination_slot)
|
||
|
}
|
||
|
require(size_destination_code>0);
|
||
|
(bool ret_status,bytes memory ret_values) = destination.delegatecall(msg.data);
|
||
|
require(ret_status);
|
||
|
uint length = ret_values.length;
|
||
|
assembly{
|
||
|
return (ret_values, length)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|