contract Wallet {
...
address public logic_;
/**
* @dev Deposit any ERC20 token into this wallet.
* @param _token The address of the existing token contract.
* @param _amount The amount of tokens to deposit.
* @return Bool if the deposit was successful.
*/
function depositERC20Token (
address _token,
uint256 _amount
) external
returns(bool)
{
...
require(logic_.delegatecall(bytes4(sha3('deposit(address,uint256)')), _token, _amount));
return true;
}
}
Last active
April 11, 2019 11:05
-
-
Save andreafspeziale/2b3524f245c9133e6ce0ce3e870a46dd to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Snippet used in my https://medium.com/coinmonks/upgradeability-may-not-be-a-bug-96ff3cb6e41f article