Skip to content

Instantly share code, notes, and snippets.

@gigamesh
Created November 15, 2020 19:52
Show Gist options
  • Save gigamesh/1a4223701440e81f939f020c10980a2b to your computer and use it in GitHub Desktop.
Save gigamesh/1a4223701440e81f939f020c10980a2b to your computer and use it in GitHub Desktop.
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);
}
}
@gigamesh
Copy link
Author

Oh wow that makes things easier. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment