mirror of
https://github.com/fluencelabs/lazy-snark
synced 2025-04-24 14:32:14 +00:00
Updated frontend
This commit is contained in:
parent
351f1d2940
commit
104fcc14ce
@ -28,6 +28,7 @@
|
||||
<label id="challenge">Challenge?</label>
|
||||
</div>
|
||||
</div>
|
||||
<p> </p>
|
||||
<div class="row 1">
|
||||
<div class="col-sm-7">
|
||||
<label id="state-id-0">None</label>
|
||||
@ -37,9 +38,9 @@
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<button type="button" class="btn btn-primary" id="challenge-0">Challenge on Fluence!</button>
|
||||
<p><a id = "link-0" target="_blank"></a></p>
|
||||
</div>
|
||||
</div>
|
||||
<p> </p>
|
||||
<div class="row 2">
|
||||
<div class="col-sm-7">
|
||||
<label id="state-id-1">None</label>
|
||||
@ -49,9 +50,9 @@
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<button type="button" class="btn btn-primary" id="challenge-1">Challenge on Fluence!</button>
|
||||
<p><a id = "link-1" target="_blank"></a></p>
|
||||
</div>
|
||||
</div>
|
||||
<p> </p>
|
||||
<div class="row 3">
|
||||
<div class="col-sm-7">
|
||||
<label id="state-id-2">None</label>
|
||||
@ -61,10 +62,9 @@
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<button type="button" class="btn btn-primary" id="challenge-2">Challenge on Fluence!</button>
|
||||
<p><a id = "link-2" target="_blank"></a></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p> </p>
|
||||
<div class="row 4">
|
||||
<div class="col-sm-7">
|
||||
<label id="state-id-3">None</label>
|
||||
@ -74,9 +74,9 @@
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<button type="button" class="btn btn-primary" id="challenge-3">Challenge on Fluence!</button>
|
||||
<p><a id = "link-3" target="_blank"></a></p>
|
||||
</div>
|
||||
</div>
|
||||
<p> </p>
|
||||
<div class="row 5">
|
||||
<div class="col-sm-7">
|
||||
<label id="state-id-4">None</label>
|
||||
@ -86,7 +86,6 @@
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<button type="button" class="btn btn-primary" id="challenge-4">Challenge on Fluence!</button>
|
||||
<p><a id = "link-4" target="_blank"></a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -8,22 +8,22 @@ window.getResultAsString = function (result) {
|
||||
|
||||
var contractInstance;
|
||||
|
||||
$(document).ready(function() {
|
||||
$(document).ready(async function() {
|
||||
let contractAddress = "0xeFF91455de6D4CF57C141bD8bF819E5f873c1A01";
|
||||
|
||||
// set ethUrl to `undefined` to use MetaMask instead of Ethereum node
|
||||
let ethUrl = "http://rinkeby.fluence.one:8545/";
|
||||
|
||||
// application to interact with that stored in Fluence contract
|
||||
let appId = "264";
|
||||
let appId = "269";
|
||||
|
||||
// create a session between client and backend application, and then join the game
|
||||
fluence.connect(contractAddress, appId, ethUrl).then((s) => {
|
||||
await fluence.connect(contractAddress, appId, ethUrl).then((s) => {
|
||||
console.log("Session created");
|
||||
window.session = s;
|
||||
});
|
||||
|
||||
var lazyAddress = '0x1cca1f0be338c747b11a16aba8d0905251628bdf';
|
||||
var lazyAddress = '0x4812b51D4420Da87C3cD78a77048328cd6914f27';
|
||||
let ControllerAbi = [
|
||||
{
|
||||
"constant": true,
|
||||
@ -430,8 +430,7 @@ $('button').click(function () {
|
||||
function challengeEthereum(id, data) {
|
||||
console.log('Challenging task N ' + data + ' on Ethereum!');
|
||||
contractInstance.challenge.sendTransaction(data, function (err, txHash) {
|
||||
$('#challenge-' + id).remove();
|
||||
$('#link-' + id).text('See tx on Etherscan!').attr("href", "https://rinkeby.etherscan.io/tx/" + txHash);
|
||||
|
||||
$('#challenge-' + id).text('See tx on Etherscan!');
|
||||
$('#challenge-' + id).attr("onclick", "window.open('https://rinkeby.etherscan.io/tx/" + txHash + "')");
|
||||
});
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "frontend-challenger",
|
||||
"name": "lazy-snark-frontend",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"private": true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user