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
0x7461CCF1FD55c069ce13E07D163C65c78c8b48D1 |
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
PS C:\Users\merunas\Desktop\api-node> docker-compose run feed-chain | |
Starting apinode_localchain_1 ... | |
Starting apinode_localchain_1 ... done | |
npm info it worked if it ends with ok | |
npm info using [email protected] | |
npm info using [email protected] | |
npm info attempt registry request try #1 at 3:41:41 PM | |
npm http request GET https://registry.npmjs.org/fsevents | |
npm http 200 https://registry.npmjs.org/fsevents | |
npm info lifecycle [email protected]~preinstall: [email protected] |
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
0x5912d3e530201d7b3ff7e140421f03a7cdb386a3 |
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
let Contract | |
let contractInstance | |
let contractAddress | |
function start() { | |
document.querySelector('#new-game').addEventListener('click', () => { | |
... | |
}) | |
document.querySelector('#join-game').addEventListener('click', () => { | |
... | |
}) |
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
function start() { | |
document.querySelector('#new-game').addEventListener('click', () => { | |
const classNewGameBox = document.querySelector('.new-game-setup').className | |
// Toggle hidden box to display it or hide it | |
if(classNewGameBox === 'new-game-setup') { | |
// To hide the box | |
document.querySelector('.new-game-setup').className = 'hidden new-game-setup' | |
document.querySelector('#button-continue').className = 'hidden' | |
document.querySelector('#join-game').disabled = false | |
} else { |
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
const abi = [ | |
{ | |
"constant": true, | |
"inputs": [], | |
"name": "player2Escrow", | |
"outputs": [ | |
{ | |
"name": "", | |
"type": "uint256" | |
} |
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
const abi = [ | |
{ | |
"constant": true, | |
"inputs": [], | |
"name": "player2Escrow", | |
"outputs": [ | |
{ | |
"name": "", | |
"type": "uint256" | |
} |
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
<!DOCTYPE html> | |
<html lang="en" dir="ltr"> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="index.css"> | |
<title>Dice ethereum game</title> | |
</head> | |
<body> | |
<div class="main-content"> | |
<h1>Ethereum Dice</h1> |
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 = web3.eth.contract(abi) | |
contractInstance = Contract.new({ | |
value: web3.toWei(valueSelected), | |
data: bytecode.object, | |
gas: 7e6 | |
}, (err, result) => { | |
// This callback will be called twice, the second time includes the contract address | |
if(!result.address) { | |
console.log('wait until the block is mined with the contract creation transaction') |
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
let Contract | |
let contractInstance | |
function start() { | |
document.querySelector('#new-game').addEventListener('click', () => { | |
const classNewGameBox = document.querySelector('.new-game-setup').className | |
// Toggle hidden box to display it or hide it | |
if(classNewGameBox === 'new-game-setup') { | |
// To hide the box |
OlderNewer