mirror of https://github.com/embarklabs/embark.git
update test_app
This commit is contained in:
parent
c2c894cfb1
commit
e74b3a2693
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue