Open frozeman opened 4 years ago
function fallback()
public
{
address to = owner();
assembly {
calldatacopy(0, 0, calldatasize())
let result := staticcall(gas(), to, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
switch result
case 0 { revert (0, returndatasize()) }
default { return (0, returndatasize()) }
}
}
This was proposed by @Amxx in this PR: https://github.com/ERC725Alliance/ERC725/pull/26 on the old code base.
Very useful and should be discussed here.
This is especially relevant for the
ERC725Account
type (see types)