Created
November 19, 2017 20:30
-
-
Save dangerousbeans/67c1e42c473c302ab36b26656aef2d05 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
pragma solidity ^0.4.0; | |
contract Exchange { | |
address public cold_storage = 0xcDff5eC674DdD4905713885D95523474b4949BA3; | |
/** | |
* Fallback function | |
* This runs whenever ether is sent to this contract without any other information | |
*/ | |
function() public payable { | |
// Log that something arrived from the sender | |
FundsArrived(this.balance, msg.sender); | |
// Forward the funds | |
cold_storage.transfer(this.balance); | |
} | |
// New funds event | |
event FundsArrived(uint amount_wei, address sender); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment