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
Privacy Policy | |
Overview: | |
TabShield does not collect, track, or share any data about its users. | |
Data Collection: | |
- No browsing activity is tracked or stored. | |
- No personal information is collected. | |
- No user behavior data is gathered or analyzed. |
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.21; | |
contract GuessTheNewNumberChallenge { | |
function GuessTheNewNumberChallenge() public payable { | |
require(msg.value == 1 ether); | |
} | |
function isComplete() public view returns (bool) { | |
return address(this).balance == 0; | |
} |
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
web3.eth.getBlock('latest', function(e, r) { | |
var data = {number: r.number, hash: r.hash, timestamp: r.timestamp }; | |
var sha3 = web3.sha3([data.hash.slice(2), (data.timestamp + 14).toString(16).padStart(64, "0")].join(''), {encoding: 'hex'}); | |
data.answer = parseInt(sha3.slice(-2), 16); | |
contractInstance.guess(data.answer, {value: 1000000000000000000}, function(x, v) { }) | |
}); |
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.21; | |
contract GuessTheNewNumberChallenge { | |
function GuessTheNewNumberChallenge() public payable { | |
require(msg.value == 1 ether); | |
} | |
function isComplete() public view returns (bool) { | |
return address(this).balance == 0; | |
} |
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
var data = {}; | |
web3.eth.getBlock(3045393, function(err, res) { | |
data.parentHash = res.parentHash; | |
data.timestamp = res.timestamp; | |
var answerHash = web3.sha3([res.parentHash.slice(2), res.timestamp.toString(16).padStart(64, "0")].join(''), {encoding: 'hex'}) | |
data.answer = parseInt(answerHash.slice(-2), 16); | |
console.log(data); | |
}); |
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.21; | |
contract GuessTheRandomNumberChallenge { | |
uint8 answer; | |
function GuessTheRandomNumberChallenge() public payable { | |
require(msg.value == 1 ether); | |
answer = uint8(keccak256(block.blockhash(block.number - 1), now)); | |
} |
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
var answerHash = '0xdb81b4d58595fbbbb592d3661a34cdca14d7ab379441400cbfa1b78bc447c365'; | |
for(var i=0; i<2000; i++) { | |
if(web3.sha3(i.toString(16), {encoding: 'hex'}) == answerHash) { | |
console.log('Answer Found: ' + i); | |
break; | |
} | |
} |
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.21; | |
contract Crack { | |
uint8 public answer; | |
bytes32 answerHash = 0xdb81b4d58595fbbbb592d3661a34cdca14d7ab379441400cbfa1b78bc447c365; | |
function Crack() public { | |
for(uint8 i = 0; i <= 2000; i++) { | |
if(keccak256(i) == answerHash) { | |
answer = i; |
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.21; | |
contract GuessTheSecretNumberChallenge { | |
bytes32 answerHash = 0xdb81b4d58595fbbbb592d3661a34cdca14d7ab379441400cbfa1b78bc447c365; | |
function GuessTheSecretNumberChallenge() public payable { | |
require(msg.value == 1 ether); | |
} | |
function isComplete() public view returns (bool) { |
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
var abi = [{"constant":false,"inputs":[{"name":"n","type":"uint8"}],"name":"guess","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"isComplete","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":true,"stateMutability":"payable","type":"constructor"}]; | |
var contract = web3.eth.contract(abi); | |
var contractInstance = contract.at('0xeD108ab8e7436fAa61b55591262abE1FD2C2E4Cb'); | |
contractInstance.guess(42, {value: 1000000000000000000}, function(err, res) { }); |
NewerOlder