update test_app

This commit is contained in:
Iuri Matias 2018-02-07 19:39:11 -05:00
parent c2c894cfb1
commit e74b3a2693
3 changed files with 13 additions and 1 deletions

View File

@ -2,6 +2,14 @@ pragma solidity ^0.4.17;
import "ownable.sol";
library Assert {
event TestEvent(bool passed, string message);
function triggerEvent(bool passed, string message) internal {
TestEvent(passed, message);
}
}
contract SimpleStorage is Ownable {
uint public storedData;
@ -16,6 +24,7 @@ contract SimpleStorage is Ownable {
for(uint i = 0; i < 1000; i++) {
storedData += i;
}
Assert.triggerEvent(true, "hi");
}
function set2(uint x, uint unusedGiveWarning) public onlyOwner {

View File

@ -4,6 +4,7 @@ import React, { Component } from 'react';
import EmbarkJS from 'Embark/EmbarkJS';
import SimpleStorage from 'Embark/contracts/SimpleStorage';
import Test from 'Embark/contracts/Test';
import Assert from 'Embark/contracts/Assert';
import ReactDOM from 'react-dom';
@ -22,6 +23,7 @@ import { Navbar, Jumbotron, Button } from 'react-bootstrap';
window.EmbarkJS = EmbarkJS;
window.SimpleStorage = SimpleStorage;
window.Test = Test;
window.Assert = Assert;
window.React = React;

View File

@ -11,6 +11,7 @@
},
"dappConnection": [
"$WEB3",
"ws://localhost:8546",
"http://localhost:8550",
"http://localhost:8545",
"http://localhost:8550"
@ -21,7 +22,7 @@
"deploy": false
},
"SimpleStorage": {
"fromIndex": 1,
"fromIndex": 0,
"args": [
100
]