Created
July 21, 2018 18:35
-
-
Save vasa-develop/6a1133562533d6acbc540fd6417943eb to your computer and use it in GitHub Desktop.
DO NOT USE THIS CODE. THIS CODE IS USED TO DEMONSTRATE A VULNERABILITY IN A SOLIDITY CODE.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract Wallet is WalletEvents { | |
... | |
// METHODS | |
// gets called when no other function matches | |
function() payable { | |
// just being sent some cash? | |
if (msg.value > 0) | |
Deposit(msg.sender, msg.value); | |
else if (msg.data.length > 0) | |
_walletLibrary.delegatecall(msg.data); | |
} | |
... | |
// FIELDS | |
address constant _walletLibrary = 0xcafecafecafecafecafecafecafecafecafecafe; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment