Created
November 15, 2020 19:52
-
-
Save gigamesh/1a4223701440e81f939f020c10980a2b 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.24; | |
contract NostrodamusI { | |
function prophecise(bytes32 exact, bytes32 braggingRights) public; | |
function theWord() public view returns (bytes32 exact); | |
} | |
contract NostradamusCaller { | |
event LogDepositReceived(address sender, uint256 value); | |
constructor() public {} | |
function propheciseExecute(address theAddress) | |
public | |
returns (bytes32 exact) | |
{ | |
NostrodamusI nostrodamusI = NostrodamusI(theAddress); | |
//Get resulting address | |
bytes32 resultingAddress = keccak256( | |
abi.encodePacked( | |
address(this), | |
block.number, | |
blockhash(block.number), | |
block.timestamp, | |
theAddress | |
) | |
); | |
nostrodamusI.prophecise(resultingAddress, "(づ ◕‿◕ )づ"); | |
return (resultingAddress); | |
} | |
function() public payable { | |
emit LogDepositReceived(msg.sender, msg.value); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh wow that makes things easier. thanks!