Uport coverage

uport
cgewecke 8 years ago
parent c498814470
commit c814f0a2b8
  1. 2
      .gitignore
  2. 1
      coverage.json
  3. 213
      coverage/lcov-report/base.css
  4. 93
      coverage/lcov-report/index.html
  5. 137
      coverage/lcov-report/originalContracts/IdentityFactory.sol.html
  6. 134
      coverage/lcov-report/originalContracts/IdentityFactoryWithRecoveryKey.sol.html
  7. 110
      coverage/lcov-report/originalContracts/Lib1.sol.html
  8. 206
      coverage/lcov-report/originalContracts/MetaTxController.sol.html
  9. 116
      coverage/lcov-report/originalContracts/Owned.sol.html
  10. 200
      coverage/lcov-report/originalContracts/Proxy.sol.html
  11. 314
      coverage/lcov-report/originalContracts/RecoverableController.sol.html
  12. 407
      coverage/lcov-report/originalContracts/RecoveryQuorum.sol.html
  13. 107
      coverage/lcov-report/originalContracts/TestRegistry.sol.html
  14. 197
      coverage/lcov-report/originalContracts/index.html
  15. 1
      coverage/lcov-report/prettify.css
  16. 1
      coverage/lcov-report/prettify.js
  17. BIN
      coverage/lcov-report/sort-arrow-sprite.png
  18. 158
      coverage/lcov-report/sorter.js
  19. 343
      coverage/lcov.info
  20. 17
      runCoveredTests.js

2
.gitignore vendored

@ -1,4 +1,2 @@
allFiredEvents
coverage.json
coverage/
node_modules/

File diff suppressed because one or more lines are too long

@ -0,0 +1,213 @@
body, html {
margin:0; padding: 0;
height: 100%;
}
body {
font-family: Helvetica Neue, Helvetica, Arial;
font-size: 14px;
color:#333;
}
.small { font-size: 12px; }
*, *:after, *:before {
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
box-sizing:border-box;
}
h1 { font-size: 20px; margin: 0;}
h2 { font-size: 14px; }
pre {
font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
margin: 0;
padding: 0;
-moz-tab-size: 2;
-o-tab-size: 2;
tab-size: 2;
}
a { color:#0074D9; text-decoration:none; }
a:hover { text-decoration:underline; }
.strong { font-weight: bold; }
.space-top1 { padding: 10px 0 0 0; }
.pad2y { padding: 20px 0; }
.pad1y { padding: 10px 0; }
.pad2x { padding: 0 20px; }
.pad2 { padding: 20px; }
.pad1 { padding: 10px; }
.space-left2 { padding-left:55px; }
.space-right2 { padding-right:20px; }
.center { text-align:center; }
.clearfix { display:block; }
.clearfix:after {
content:'';
display:block;
height:0;
clear:both;
visibility:hidden;
}
.fl { float: left; }
@media only screen and (max-width:640px) {
.col3 { width:100%; max-width:100%; }
.hide-mobile { display:none!important; }
}
.quiet {
color: #7f7f7f;
color: rgba(0,0,0,0.5);
}
.quiet a { opacity: 0.7; }
.fraction {
font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
font-size: 10px;
color: #555;
background: #E8E8E8;
padding: 4px 5px;
border-radius: 3px;
vertical-align: middle;
}
div.path a:link, div.path a:visited { color: #333; }
table.coverage {
border-collapse: collapse;
margin: 10px 0 0 0;
padding: 0;
}
table.coverage td {
margin: 0;
padding: 0;
vertical-align: top;
}
table.coverage td.line-count {
text-align: right;
padding: 0 5px 0 20px;
}
table.coverage td.line-coverage {
text-align: right;
padding-right: 10px;
min-width:20px;
}
table.coverage td span.cline-any {
display: inline-block;
padding: 0 5px;
width: 100%;
}
.missing-if-branch {
display: inline-block;
margin-right: 5px;
border-radius: 3px;
position: relative;
padding: 0 4px;
background: #333;
color: yellow;
}
.skip-if-branch {
display: none;
margin-right: 10px;
position: relative;
padding: 0 4px;
background: #ccc;
color: white;
}
.missing-if-branch .typ, .skip-if-branch .typ {
color: inherit !important;
}
.coverage-summary {
border-collapse: collapse;
width: 100%;
}
.coverage-summary tr { border-bottom: 1px solid #bbb; }
.keyline-all { border: 1px solid #ddd; }
.coverage-summary td, .coverage-summary th { padding: 10px; }
.coverage-summary tbody { border: 1px solid #bbb; }
.coverage-summary td { border-right: 1px solid #bbb; }
.coverage-summary td:last-child { border-right: none; }
.coverage-summary th {
text-align: left;
font-weight: normal;
white-space: nowrap;
}
.coverage-summary th.file { border-right: none !important; }
.coverage-summary th.pct { }
.coverage-summary th.pic,
.coverage-summary th.abs,
.coverage-summary td.pct,
.coverage-summary td.abs { text-align: right; }
.coverage-summary td.file { white-space: nowrap; }
.coverage-summary td.pic { min-width: 120px !important; }
.coverage-summary tfoot td { }
.coverage-summary .sorter {
height: 10px;
width: 7px;
display: inline-block;
margin-left: 0.5em;
background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
}
.coverage-summary .sorted .sorter {
background-position: 0 -20px;
}
.coverage-summary .sorted-desc .sorter {
background-position: 0 -10px;
}
.status-line { height: 10px; }
/* dark red */
.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
.low .chart { border:1px solid #C21F39 }
/* medium red */
.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
/* light red */
.low, .cline-no { background:#FCE1E5 }
/* light green */
.high, .cline-yes { background:rgb(230,245,208) }
/* medium green */
.cstat-yes { background:rgb(161,215,106) }
/* dark green */
.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
.high .chart { border:1px solid rgb(77,146,33) }
/* dark yellow (gold) */
.medium .chart { border:1px solid #f9cd0b; }
.status-line.medium, .medium .cover-fill { background: #f9cd0b; }
/* light yellow */
.medium { background: #fff4c2; }
/* light gray */
span.cline-neutral { background: #eaeaea; }
.cbranch-no { background: yellow !important; color: #111; }
.cstat-skip { background: #ddd; color: #111; }
.fstat-skip { background: #ddd; color: #111 !important; }
.cbranch-skip { background: #ddd !important; color: #111; }
.cover-fill, .cover-empty {
display:inline-block;
height: 12px;
}
.chart {
line-height: 0;
}
.cover-empty {
background: white;
}
.cover-full {
border-right: none !important;
}
pre.prettyprint {
border: none !important;
padding: 0 !important;
margin: 0 !important;
}
.com { color: #999 !important; }
.ignore-none { color: #999; font-weight: normal; }
.wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -48px;
}
.footer, .push {
height: 48px;
}

@ -0,0 +1,93 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for All files</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="prettify.css" />
<link rel="stylesheet" href="base.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1>
/
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">80.33% </span>
<span class="quiet">Statements</span>
<span class='fraction'>98/122</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">71.74% </span>
<span class="quiet">Branches</span>
<span class='fraction'>33/46</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">74.51% </span>
<span class="quiet">Functions</span>
<span class='fraction'>38/51</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">84.21% </span>
<span class="quiet">Lines</span>
<span class='fraction'>96/114</span>
</div>
</div>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="originalContracts/"><a href="originalContracts/index.html">originalContracts/</a></td>
<td data-value="80.33" class="pic high"><div class="chart"><div class="cover-fill" style="width: 80%;"></div><div class="cover-empty" style="width:20%;"></div></div></td>
<td data-value="80.33" class="pct high">80.33%</td>
<td data-value="122" class="abs high">98/122</td>
<td data-value="71.74" class="pct medium">71.74%</td>
<td data-value="46" class="abs medium">33/46</td>
<td data-value="74.51" class="pct medium">74.51%</td>
<td data-value="51" class="abs medium">38/51</td>
<td data-value="84.21" class="pct high">84.21%</td>
<td data-value="114" class="abs high">96/114</td>
</tr>
</tbody>
</table>
</div><div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Mar 27 2017 16:25:45 GMT-0700 (PDT)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
if (typeof prettyPrint === 'function') {
prettyPrint();
}
};
</script>
<script src="sorter.js"></script>
</body>
</html>

@ -0,0 +1,137 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for originalContracts/IdentityFactory.sol</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1>
<a href="../index.html">all files</a> / <a href="index.html">originalContracts/</a> IdentityFactory.sol
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>7/7</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>7/7</span>
</div>
</div>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">pragma solidity ^0.4.4;
import "./RecoveryQuorum.sol";
&nbsp;
contract IdentityFactory {
event IdentityCreated(
address indexed userKey,
address proxy,
address controller,
address recoveryQuorum);
&nbsp;
mapping(address =&gt; address) public senderToProxy;
&nbsp;
//cost ~2.4M gas
function CreateProxyWithControllerAndRecovery(address userKey, address[] delegates, uint longTimeLock, uint shortTimeLock) {
Proxy proxy = new Proxy();
RecoverableController controller = new RecoverableController(proxy, userKey, longTimeLock, shortTimeLock);
proxy.transfer(controller);
RecoveryQuorum recoveryQuorum = new RecoveryQuorum(controller, delegates);
controller.changeRecoveryFromRecovery(recoveryQuorum);
&nbsp;
IdentityCreated(userKey, proxy, controller, recoveryQuorum);
senderToProxy[msg.sender] = proxy;
}
}
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Mar 27 2017 16:25:45 GMT-0700 (PDT)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
if (typeof prettyPrint === 'function') {
prettyPrint();
}
};
</script>
<script src="../sorter.js"></script>
</body>
</html>

@ -0,0 +1,134 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for originalContracts/IdentityFactoryWithRecoveryKey.sol</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1>
<a href="../index.html">all files</a> / <a href="index.html">originalContracts/</a> IdentityFactoryWithRecoveryKey.sol
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>6/6</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>6/6</span>
</div>
</div>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">pragma solidity ^0.4.4;
import "./RecoverableController.sol";
&nbsp;
contract IdentityFactoryWithRecoveryKey {
event IdentityCreated(
address indexed userKey,
address proxy,
address controller,
address recoveryKey);
&nbsp;
mapping(address =&gt; address) public senderToProxy;
&nbsp;
//cost ~2.4M gas
function CreateProxyWithControllerAndRecoveryKey(address userKey, address _recoveryKey, uint longTimeLock, uint shortTimeLock) {
Proxy proxy = new Proxy();
RecoverableController controller = new RecoverableController(proxy, userKey, longTimeLock, shortTimeLock);
proxy.transfer(controller);
controller.changeRecoveryFromRecovery(_recoveryKey);
&nbsp;
IdentityCreated(userKey, proxy, controller, _recoveryKey);
senderToProxy[msg.sender] = proxy;
}
}
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Mar 27 2017 16:25:45 GMT-0700 (PDT)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
if (typeof prettyPrint === 'function') {
prettyPrint();
}
};
</script>
<script src="../sorter.js"></script>
</body>
</html>

@ -0,0 +1,110 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for originalContracts/Lib1.sol</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1>
<a href="../index.html">all files</a> / <a href="index.html">originalContracts/</a> Lib1.sol
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">42.86% </span>
<span class="quiet">Statements</span>
<span class='fraction'>3/7</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">50% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">57.14% </span>
<span class="quiet">Lines</span>
<span class='fraction'>4/7</span>
</div>
</div>
</div>
<div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">pragma solidity ^0.4.4;
library Lib1{
<span class="fstat-no" title="function not covered" > function findAddress(address a, address[] storage arry) returns (int</span>){
<span class="cstat-no" title="statement not covered" > for (uint i = 0 ; i &lt; arry.length ; i++){</span>
<span class="cstat-no" title="statement not covered" > if(arry[i] == a){<span class="cstat-no" title="statement not covered" >return int(i);</span>}</span>
}
<span class="cstat-no" title="statement not covered" > return -1;</span>
}
function removeAddress(uint i, address[] storage arry){
uint lengthMinusOne = arry.length - 1;
arry[i] = arry[lengthMinusOne];
delete arry[lengthMinusOne];
arry.length = lengthMinusOne;
}
}
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Mar 27 2017 16:25:45 GMT-0700 (PDT)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
if (typeof prettyPrint === 'function') {
prettyPrint();
}
};
</script>
<script src="../sorter.js"></script>
</body>
</html>

@ -0,0 +1,206 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for originalContracts/MetaTxController.sol</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1>
<a href="../index.html">all files</a> / <a href="index.html">originalContracts/</a> MetaTxController.sol
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Statements</span>
<span class='fraction'>0/14</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/4</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Functions</span>
<span class='fraction'>0/6</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Lines</span>
<span class='fraction'>0/13</span>
</div>
</div>
</div>
<div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">pragma solidity ^0.4.4;
import "./Proxy.sol";
contract MetaTxController {
&nbsp;
Proxy public proxy;
address public userKey;
address public adminKey;
uint public referenceNonce;
&nbsp;
<span class="fstat-no" title="function not covered" > modifier only(address key) {</span> <span class="cstat-no" title="statement not covered" >if (msg.sender == key) _;</span>}
&nbsp;
<span class="fstat-no" title="function not covered" > function MetaTxController(address proxyAddress, address _userKey, address _adminKey) {</span>
<span class="cstat-no" title="statement not covered" > proxy = Proxy(proxyAddress)</span>;
<span class="cstat-no" title="statement not covered" > userKey = _userKey</span>;
<span class="cstat-no" title="statement not covered" > adminKey = _adminKey</span>;
<span class="cstat-no" title="statement not covered" > referenceNonce = 0</span>;
}
&nbsp;
<span class="fstat-no" title="function not covered" > function sendTx(address destination, uint value, bytes data, uint nonce, uint8 v, bytes32 r, bytes32 s) {</span>
&nbsp;
<span class="cstat-no" title="statement not covered" > var h = sha3(destination, bytes32(value), bytes32(nonce), data);</span>
<span class="cstat-no" title="statement not covered" > var addressFromSig = ecrecover(h,v,r,s);</span>
<span class="cstat-no" title="statement not covered" > if (nonce == referenceNonce &amp;&amp; addressFromSig == userKey) {</span>
<span class="cstat-no" title="statement not covered" > proxy.forward(destination, value, data)</span>;
<span class="cstat-no" title="statement not covered" > referenceNonce += 1</span>;
}
}
&nbsp;
<span class="fstat-no" title="function not covered" > function updateUserKey(address newUserKey) only(adminKey) {</span>
<span class="cstat-no" title="statement not covered" > userKey = newUserKey</span>;
}
&nbsp;
<span class="fstat-no" title="function not covered" > function updateAdminKey(address newAdminKey) only(adminKey) {</span>
<span class="cstat-no" title="statement not covered" > adminKey = newAdminKey</span>;
}
&nbsp;
<span class="fstat-no" title="function not covered" > function transferOwnership(address newOwner) only(adminKey) {</span>
// This will end the functionality of the Ownership contract
// since it's no longer allowed to forward transactions
// to the proxy
<span class="cstat-no" title="statement not covered" > proxy.transfer(newOwner)</span>;
<span class="cstat-no" title="statement not covered" > suicide(newOwner)</span>;
}
&nbsp;
}
&nbsp;
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Mar 27 2017 16:25:45 GMT-0700 (PDT)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
if (typeof prettyPrint === 'function') {
prettyPrint();
}
};
</script>
<script src="../sorter.js"></script>
</body>
</html>

@ -0,0 +1,116 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for originalContracts/Owned.sol</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1>
<a href="../index.html">all files</a> / <a href="index.html">originalContracts/</a> Owned.sol
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Statements</span>
<span class='fraction'>0/5</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/4</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Functions</span>
<span class='fraction'>0/5</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Lines</span>
<span class='fraction'>0/2</span>
</div>
</div>
</div>
<div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// A base Owned contract
pragma solidity ^0.4.4;
contract Owned {
address public owner;
<span class="fstat-no" title="function not covered" > modifier onlyOwner(</span>){ <span class="cstat-no" title="statement not covered" >if (isOwner(msg.sender)) _;</span> }
<span class="fstat-no" title="function not covered" > modifier ifOwner(address sender)</span> { <span class="cstat-no" title="statement not covered" >if(isOwner(sender)) _;</span> }
&nbsp;
<span class="fstat-no" title="function not covered" > function Owned(</span>){
<span class="cstat-no" title="statement not covered" > owner = msg.sender</span>;
}
<span class="fstat-no" title="function not covered" > function isOwner(address addr) public returns(bool)</span> { <span class="cstat-no" title="statement not covered" >return addr == owner;</span> }
&nbsp;
<span class="fstat-no" title="function not covered" > function transfer(address _owner) onlyOwner</span> {
<span class="cstat-no" title="statement not covered" > owner = _owner</span>;
}
}
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Mar 27 2017 16:25:45 GMT-0700 (PDT)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
if (typeof prettyPrint === 'function') {
prettyPrint();
}
};
</script>
<script src="../sorter.js"></script>
</body>
</html>

@ -0,0 +1,200 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for originalContracts/Proxy.sol</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1>
<a href="../index.html">all files</a> / <a href="index.html">originalContracts/</a> Proxy.sol
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">88.89% </span>
<span class="quiet">Statements</span>
<span class='fraction'>8/9</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">66.67% </span>
<span class="quiet">Branches</span>
<span class='fraction'>4/6</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">85.71% </span>
<span class="quiet">Functions</span>
<span class='fraction'>6/7</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>6/6</span>
</div>
</div>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">12×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// The core proxy facade
// - is owned by a user or implementation contract
// - only forwards transactions for its owner
pragma solidity ^0.4.4;
&nbsp;
contract Proxy {
event Forwarded (
address indexed destination,
uint value,
bytes data
);
event Received (
address indexed sender,
uint value
);
&nbsp;
function () payable {
Received(msg.sender, msg.value);
}
&nbsp;
function forward(address destination, uint value, bytes data) onlyOwner {
// If a contract tries to CALL or CREATE a contract with either
// (i) insufficient balance, or (ii) stack depth already at maximum (1024),
// the sub-execution and transfer do not occur at all, no gas gets consumed, and 0 is added to the stack.
// see: https://github.com/ethereum/wiki/wiki/Subtleties#exceptional-conditions
if (!destination.call.value(value)(data)) {
throw;
}
Forwarded(destination, value, data);
}
&nbsp;
address public owner;
modifier onlyOwner(){ if (isOwner(msg.sender)) _; }
<span class="fstat-no" title="function not covered" > modifier ifOwner(address sender)</span> { <span class="cstat-no" title="statement not covered" >if(isOwner(sender)) _;</span> }
&nbsp;
function Proxy(){
owner = msg.sender;
}
function isOwner(address addr) public returns(bool) { return addr == owner; }
&nbsp;
function transfer(address _owner) onlyOwner {
owner = _owner;
}
}
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Mar 27 2017 16:25:45 GMT-0700 (PDT)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
if (typeof prettyPrint === 'function') {
prettyPrint();
}
};
</script>
<script src="../sorter.js"></script>
</body>
</html>

@ -0,0 +1,314 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for originalContracts/RecoverableController.sol</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1>
<a href="../index.html">all files</a> / <a href="index.html">originalContracts/</a> RecoverableController.sol
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>28/28</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>10/10</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>12/12</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>28/28</span>
</div>
</div>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">12×</span>
<span class="cline-any cline-yes">12×</span>
<span class="cline-any cline-yes">12×</span>
<span class="cline-any cline-yes">12×</span>
<span class="cline-any cline-yes">12×</span>
<span class="cline-any cline-yes">12×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">pragma solidity ^0.4.4;
import "./Proxy.sol";
&nbsp;
contract RecoverableController {
uint public version;
Proxy public proxy;
address public userKey;
address public proposedUserKey;
uint public proposedUserKeyPendingUntil;
&nbsp;
address public recoveryKey;
address public proposedRecoveryKey;
uint public proposedRecoveryKeyPendingUntil;
&nbsp;
address public proposedController;
uint public proposedControllerPendingUntil;
&nbsp;
uint public shortTimeLock;// use 900 for 15 minutes
uint public longTimeLock; // use 259200 for 3 days
&nbsp;
event RecoveryEvent(string action, address initiatedBy);
&nbsp;
modifier onlyUserKey() { if (msg.sender == userKey) _; }
modifier onlyRecoveryKey() { if (msg.sender == recoveryKey) _; }
&nbsp;
function RecoverableController(address proxyAddress, address _userKey, uint _longTimeLock, uint _shortTimeLock) {
version = 1;
proxy = Proxy(proxyAddress);
userKey = _userKey;
shortTimeLock = _shortTimeLock;
longTimeLock = _longTimeLock;
recoveryKey = msg.sender;
}
&nbsp;
function forward(address destination, uint value, bytes data) onlyUserKey {
proxy.forward(destination, value, data);
}
//pass 0x0 to cancel
function signRecoveryChange(address _proposedRecoveryKey) onlyUserKey{
proposedRecoveryKeyPendingUntil = now + longTimeLock;
proposedRecoveryKey = _proposedRecoveryKey;
RecoveryEvent("signRecoveryChange", msg.sender);
}
function changeRecovery() {
if(proposedRecoveryKeyPendingUntil &lt; now &amp;&amp; proposedRecoveryKey != 0x0){
recoveryKey = proposedRecoveryKey;
delete proposedRecoveryKey;
}
}
//pass 0x0 to cancel
function signControllerChange(address _proposedController) onlyUserKey{
proposedControllerPendingUntil = now + longTimeLock;
proposedController = _proposedController;
RecoveryEvent("signControllerChange", msg.sender);
}
function changeController() {
if(proposedControllerPendingUntil &lt; now &amp;&amp; proposedController != 0x0){
proxy.transfer(proposedController);
suicide(proposedController);
}
}
//pass 0x0 to cancel
function signUserKeyChange(address _proposedUserKey) onlyUserKey{
proposedUserKeyPendingUntil = now + shortTimeLock;
proposedUserKey = _proposedUserKey;
RecoveryEvent("signUserKeyChange", msg.sender);
}
function changeUserKey(){
if(proposedUserKeyPendingUntil &lt; now &amp;&amp; proposedUserKey != 0x0){
userKey = proposedUserKey;
delete proposedUserKey;
RecoveryEvent("changeUserKey", msg.sender);
}
}
function changeRecoveryFromRecovery(address _recoveryKey) onlyRecoveryKey{ recoveryKey = _recoveryKey; }
function changeUserKeyFromRecovery(address _userKey) onlyRecoveryKey{
delete proposedUserKey;
userKey = _userKey;
}
}
&nbsp;
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Mar 27 2017 16:25:45 GMT-0700 (PDT)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
if (typeof prettyPrint === 'function') {
prettyPrint();
}
};
</script>
<script src="../sorter.js"></script>
</body>
</html>

@ -0,0 +1,407 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for originalContracts/RecoveryQuorum.sol</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1>
<a href="../index.html">all files</a> / <a href="index.html">originalContracts/</a> RecoveryQuorum.sol
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>44/44</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">95% </span>
<span class="quiet">Branches</span>
<span class='fraction'>19/20</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>15/15</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>43/43</span>
</div>
</div>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-yes">40×</span>
<span class="cline-any cline-yes">40×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">50×</span>
<span class="cline-any cline-yes">48×</span>
<span class="cline-any cline-yes">48×</span>
<span class="cline-any cline-yes">48×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">52×</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">45×</span>
<span class="cline-any cline-yes">14×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">45×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">16×</span>
<span class="cline-any cline-yes">11×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">16×</span>
<span class="cline-any cline-yes">16×</span>
<span class="cline-any cline-yes">45×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">16×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">71×</span>
<span class="cline-any cline-yes">638×</span>
<span class="cline-any cline-yes">82×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">52×</span>
<span class="cline-any cline-yes">554×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">52×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">45×</span>
<span class="cline-any cline-yes">39×</span>
<span class="cline-any cline-yes">39×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">11×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">11×</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">16×</span>
<span class="cline-any cline-yes">16×</span>
<span class="cline-any cline-yes">66×</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1287×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1192×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">638×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">pragma solidity ^0.4.4;
import "./RecoverableController.sol";
import "./Lib1.sol";
&nbsp;
contract RecoveryQuorum {
RecoverableController public controller;
&nbsp;
address[] public delegateAddresses; // needed for iteration of mapping
mapping (address =&gt; Delegate) public delegates;
struct Delegate{
uint deletedAfter; // delegate exists if not 0
uint pendingUntil;
address proposedUserKey;
}
&nbsp;
event RecoveryEvent(string action, address initiatedBy);
&nbsp;
modifier onlyUserKey(){ if (msg.sender == controller.userKey()) _; }
&nbsp;
function RecoveryQuorum(address _controller, address[] _delegates){
controller = RecoverableController(_controller);
for(uint i = 0; i &lt; _delegates.length; i++){
delegateAddresses.push(_delegates[i]);
delegates[_delegates[i]] = Delegate({proposedUserKey: 0x0, pendingUntil: 0, deletedAfter: 31536000000000});
}
}
function signUserChange(address proposedUserKey) {
if(delegateRecordExists(delegates[msg.sender])) {
delegates[msg.sender].proposedUserKey = proposedUserKey;
changeUserKey(proposedUserKey);
RecoveryEvent("signUserChange", msg.sender);
}
}
function changeUserKey(address newUserKey) {
if(collectedSignatures(newUserKey) &gt;= neededSignatures()){
controller.changeUserKeyFromRecovery(newUserKey);
for(uint i = 0 ; i &lt; delegateAddresses.length ; i++){
//remove any pending delegates after a recovery
if(delegates[delegateAddresses[i]].pendingUntil &gt; now){
delegates[delegateAddresses[i]].deletedAfter = now;
}
delete delegates[delegateAddresses[i]].proposedUserKey;
}
}
}
&nbsp;
function replaceDelegates(address[] delegatesToRemove, address[] delegatesToAdd) onlyUserKey{
for(uint i = 0 ; i &lt; delegatesToRemove.length ; i++){
removeDelegate(delegatesToRemove[i]);
}
garbageCollect();
for(uint j = 0 ; j &lt; delegatesToAdd.length ; j++){
addDelegate(delegatesToAdd[j]);
}
RecoveryEvent("replaceDelegates", msg.sender);
}
function collectedSignatures(address _proposedUserKey) returns (uint signatures){
for(uint i = 0 ; i &lt; delegateAddresses.length ; i++){
if (delegateHasValidSignature(delegates[delegateAddresses[i]]) &amp;&amp; delegates[delegateAddresses[i]].proposedUserKey == _proposedUserKey){
signatures++;
}
}
}
&nbsp;
function getAddresses() constant returns (address[]){ return delegateAddresses; }
&nbsp;
function neededSignatures() returns (uint){
uint currentDelegateCount; //always 0 at this point
for(uint i = 0 ; i &lt; delegateAddresses.length ; i++){
if(delegateIsCurrent(delegates[delegateAddresses[i]])){ currentDelegateCount++; }
}
return currentDelegateCount/2 + 1;
}
function addDelegate(address delegate) private {
if(!delegateRecordExists(delegates[delegate]) &amp;&amp; delegateAddresses.length &lt; 15) {
delegates[delegate] = Delegate({proposedUserKey: 0x0, pendingUntil: now + controller.longTimeLock(), deletedAfter: 31536000000000});
delegateAddresses.push(delegate);
}
}
function removeDelegate(address delegate) private {
<span class="missing-if-branch" title="else path not taken" >E</span>if(delegates[delegate].deletedAfter &gt; controller.longTimeLock() + now){
//remove right away if they are still pending
if(delegates[delegate].pendingUntil &gt; now){
delegates[delegate].deletedAfter = now;
} else{
delegates[delegate].deletedAfter = controller.longTimeLock() + now;
}
}
}
&nbsp;
function garbageCollect() private{
uint i = 0;
while(i &lt; delegateAddresses.length){
if(delegateIsDeleted(delegates[delegateAddresses[i]])){
delegates[delegateAddresses[i]].deletedAfter = 0;
delegates[delegateAddresses[i]].pendingUntil = 0;
delegates[delegateAddresses[i]].proposedUserKey = 0;
Lib1.removeAddress(i, delegateAddresses);
}else{i++;}
}
}
function delegateRecordExists(Delegate d) private returns (bool){
return d.deletedAfter != 0;
}
function delegateIsDeleted(Delegate d) private returns (bool){
return d.deletedAfter &lt;= now; //doesnt check record existence
}
function delegateIsCurrent(Delegate d) private returns (bool){
return delegateRecordExists(d) &amp;&amp; !delegateIsDeleted(d) &amp;&amp; now &gt; d.pendingUntil;
}
function delegateHasValidSignature(Delegate d) private returns (bool){
return delegateIsCurrent(d) &amp;&amp; d.proposedUserKey != 0x0;
}
}
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Mar 27 2017 16:25:45 GMT-0700 (PDT)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
if (typeof prettyPrint === 'function') {
prettyPrint();
}
};
</script>
<script src="../sorter.js"></script>
</body>
</html>

@ -0,0 +1,107 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for originalContracts/TestRegistry.sol</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1>
<a href="../index.html">all files</a> / <a href="index.html">originalContracts/</a> TestRegistry.sol
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>2/2</span>
</div>
</div>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">pragma solidity ^0.4.4;
contract TestRegistry {
&nbsp;
mapping(address =&gt; uint) public registry;
&nbsp;
function register(uint x) {
registry[msg.sender] = x;
}
&nbsp;
function testThrow() {
throw;
}
&nbsp;
}
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Mar 27 2017 16:25:45 GMT-0700 (PDT)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
if (typeof prettyPrint === 'function') {
prettyPrint();
}
};
</script>
<script src="../sorter.js"></script>
</body>
</html>

@ -0,0 +1,197 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for originalContracts/</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1>
<a href="../index.html">all files</a> originalContracts/
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">80.33% </span>
<span class="quiet">Statements</span>
<span class='fraction'>98/122</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">71.74% </span>
<span class="quiet">Branches</span>
<span class='fraction'>33/46</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">74.51% </span>
<span class="quiet">Functions</span>
<span class='fraction'>38/51</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">84.21% </span>
<span class="quiet">Lines</span>
<span class='fraction'>96/114</span>
</div>
</div>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="IdentityFactory.sol"><a href="IdentityFactory.sol.html">IdentityFactory.sol</a></td>
<td data-value="100" class="pic high"><div class="chart"><div class="cover-fill cover-full" style="width: 100%;"></div><div class="cover-empty" style="width:0%;"></div></div></td>
<td data-value="100" class="pct high">100%</td>
<td data-value="7" class="abs high">7/7</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="7" class="abs high">7/7</td>
</tr>
<tr>
<td class="file high" data-value="IdentityFactoryWithRecoveryKey.sol"><a href="IdentityFactoryWithRecoveryKey.sol.html">IdentityFactoryWithRecoveryKey.sol</a></td>
<td data-value="100" class="pic high"><div class="chart"><div class="cover-fill cover-full" style="width: 100%;"></div><div class="cover-empty" style="width:0%;"></div></div></td>
<td data-value="100" class="pct high">100%</td>
<td data-value="6" class="abs high">6/6</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="6" class="abs high">6/6</td>
</tr>
<tr>
<td class="file low" data-value="Lib1.sol"><a href="Lib1.sol.html">Lib1.sol</a></td>
<td data-value="42.86" class="pic low"><div class="chart"><div class="cover-fill" style="width: 42%;"></div><div class="cover-empty" style="width:58%;"></div></div></td>
<td data-value="42.86" class="pct low">42.86%</td>
<td data-value="7" class="abs low">3/7</td>
<td data-value="0" class="pct low">0%</td>
<td data-value="2" class="abs low">0/2</td>
<td data-value="50" class="pct medium">50%</td>
<td data-value="2" class="abs medium">1/2</td>
<td data-value="57.14" class="pct medium">57.14%</td>
<td data-value="7" class="abs medium">4/7</td>
</tr>
<tr>
<td class="file low" data-value="MetaTxController.sol"><a href="MetaTxController.sol.html">MetaTxController.sol</a></td>
<td data-value="0" class="pic low"><div class="chart"><div class="cover-fill" style="width: 0%;"></div><div class="cover-empty" style="width:100%;"></div></div></td>
<td data-value="0" class="pct low">0%</td>
<td data-value="14" class="abs low">0/14</td>
<td data-value="0" class="pct low">0%</td>
<td data-value="4" class="abs low">0/4</td>
<td data-value="0" class="pct low">0%</td>
<td data-value="6" class="abs low">0/6</td>
<td data-value="0" class="pct low">0%</td>
<td data-value="13" class="abs low">0/13</td>
</tr>
<tr>
<td class="file low" data-value="Owned.sol"><a href="Owned.sol.html">Owned.sol</a></td>
<td data-value="0" class="pic low"><div class="chart"><div class="cover-fill" style="width: 0%;"></div><div class="cover-empty" style="width:100%;"></div></div></td>
<td data-value="0" class="pct low">0%</td>
<td data-value="5" class="abs low">0/5</td>
<td data-value="0" class="pct low">0%</td>
<td data-value="4" class="abs low">0/4</td>
<td data-value="0" class="pct low">0%</td>
<td data-value="5" class="abs low">0/5</td>
<td data-value="0" class="pct low">0%</td>
<td data-value="2" class="abs low">0/2</td>
</tr>
<tr>
<td class="file high" data-value="Proxy.sol"><a href="Proxy.sol.html">Proxy.sol</a></td>
<td data-value="88.89" class="pic high"><div class="chart"><div class="cover-fill" style="width: 88%;"></div><div class="cover-empty" style="width:12%;"></div></div></td>
<td data-value="88.89" class="pct high">88.89%</td>
<td data-value="9" class="abs high">8/9</td>
<td data-value="66.67" class="pct medium">66.67%</td>
<td data-value="6" class="abs medium">4/6</td>
<td data-value="85.71" class="pct high">85.71%</td>
<td data-value="7" class="abs high">6/7</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="6" class="abs high">6/6</td>
</tr>
<tr>
<td class="file high" data-value="RecoverableController.sol"><a href="RecoverableController.sol.html">RecoverableController.sol</a></td>
<td data-value="100" class="pic high"><div class="chart"><div class="cover-fill cover-full" style="width: 100%;"></div><div class="cover-empty" style="width:0%;"></div></div></td>
<td data-value="100" class="pct high">100%</td>
<td data-value="28" class="abs high">28/28</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="10" class="abs high">10/10</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="12" class="abs high">12/12</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="28" class="abs high">28/28</td>
</tr>
<tr>
<td class="file high" data-value="RecoveryQuorum.sol"><a href="RecoveryQuorum.sol.html">RecoveryQuorum.sol</a></td>
<td data-value="100" class="pic high"><div class="chart"><div class="cover-fill cover-full" style="width: 100%;"></div><div class="cover-empty" style="width:0%;"></div></div></td>
<td data-value="100" class="pct high">100%</td>
<td data-value="44" class="abs high">44/44</td>
<td data-value="95" class="pct high">95%</td>
<td data-value="20" class="abs high">19/20</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="15" class="abs high">15/15</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="43" class="abs high">43/43</td>
</tr>
<tr>
<td class="file high" data-value="TestRegistry.sol"><a href="TestRegistry.sol.html">TestRegistry.sol</a></td>
<td data-value="100" class="pic high"><div class="chart"><div class="cover-fill cover-full" style="width: 100%;"></div><div class="cover-empty" style="width:0%;"></div></div></td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
</tr>
</tbody>
</table>
</div><div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Mar 27 2017 16:25:45 GMT-0700 (PDT)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
if (typeof prettyPrint === 'function') {
prettyPrint();
}
};
</script>
<script src="../sorter.js"></script>
</body>
</html>

@ -0,0 +1 @@
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

@ -0,0 +1,158 @@
var addSorting = (function () {
"use strict";
var cols,
currentSort = {
index: 0,
desc: false
};
// returns the summary table element
function getTable() { return document.querySelector('.coverage-summary'); }
// returns the thead element of the summary table
function getTableHeader() { return getTable().querySelector('thead tr'); }
// returns the tbody element of the summary table
function getTableBody() { return getTable().querySelector('tbody'); }
// returns the th element for nth column
function getNthColumn(n) { return getTableHeader().querySelectorAll('th')[n]; }
// loads all columns
function loadColumns() {
var colNodes = getTableHeader().querySelectorAll('th'),
colNode,
cols = [],
col,
i;
for (i = 0; i < colNodes.length; i += 1) {
colNode = colNodes[i];
col = {
key: colNode.getAttribute('data-col'),
sortable: !colNode.getAttribute('data-nosort'),
type: colNode.getAttribute('data-type') || 'string'
};
cols.push(col);
if (col.sortable) {
col.defaultDescSort = col.type === 'number';
colNode.innerHTML = colNode.innerHTML + '<span class="sorter"></span>';
}
}
return cols;
}
// attaches a data attribute to every tr element with an object
// of data values keyed by column name
function loadRowData(tableRow) {
var tableCols = tableRow.querySelectorAll('td'),
colNode,
col,
data = {},
i,
val;
for (i = 0; i < tableCols.length; i += 1) {
colNode = tableCols[i];
col = cols[i];
val = colNode.getAttribute('data-value');
if (col.type === 'number') {
val = Number(val);
}
data[col.key] = val;
}
return data;
}
// loads all row data
function loadData() {
var rows = getTableBody().querySelectorAll('tr'),
i;
for (i = 0; i < rows.length; i += 1) {
rows[i].data = loadRowData(rows[i]);
}
}
// sorts the table using the data for the ith column
function sortByIndex(index, desc) {
var key = cols[index].key,
sorter = function (a, b) {
a = a.data[key];
b = b.data[key];
return a < b ? -1 : a > b ? 1 : 0;
},
finalSorter = sorter,
tableBody = document.querySelector('.coverage-summary tbody'),
rowNodes = tableBody.querySelectorAll('tr'),
rows = [],
i;
if (desc) {
finalSorter = function (a, b) {
return -1 * sorter(a, b);
};
}
for (i = 0; i < rowNodes.length; i += 1) {
rows.push(rowNodes[i]);
tableBody.removeChild(rowNodes[i]);
}
rows.sort(finalSorter);
for (i = 0; i < rows.length; i += 1) {
tableBody.appendChild(rows[i]);
}
}
// removes sort indicators for current column being sorted
function removeSortIndicators() {
var col = getNthColumn(currentSort.index),
cls = col.className;
cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
col.className = cls;
}
// adds sort indicators for current column being sorted
function addSortIndicators() {
getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted';
}
// adds event listeners for all sorter widgets
function enableUI() {
var i,
el,
ithSorter = function ithSorter(i) {
var col = cols[i];
return function () {
var desc = col.defaultDescSort;
if (currentSort.index === i) {
desc = !currentSort.desc;
}
sortByIndex(i, desc);
removeSortIndicators();
currentSort.index = i;
currentSort.desc = desc;
addSortIndicators();
};
};
for (i =0 ; i < cols.length; i += 1) {
if (cols[i].sortable) {
// add the click event handler on the th so users
// dont have to click on those tiny arrows
el = getNthColumn(i).querySelector('.sorter').parentElement;
if (el.addEventListener) {
el.addEventListener('click', ithSorter(i));
} else {
el.attachEvent('onclick', ithSorter(i));
}
}
}
}
// adds sorting functionality to the UI
return function () {
if (!getTable()) {
return;
}
cols = loadColumns();
loadData(cols);
addSortIndicators();
enableUI();
};
})();
window.addEventListener('load', addSorting);

@ -0,0 +1,343 @@
TN:
SF:/Users/user/Sites/uport-proxy/originalContracts/IdentityFactory.sol
FN:14,CreateProxyWithControllerAndRecovery
FNF:1
FNH:1
FNDA:4,CreateProxyWithControllerAndRecovery
DA:15,4
DA:16,4
DA:17,4
DA:18,4
DA:19,4
DA:21,4
DA:22,4
LF:7
LH:7
BRF:0
BRH:0
end_of_record
TN:
SF:/Users/user/Sites/uport-proxy/originalContracts/IdentityFactoryWithRecoveryKey.sol
FN:14,CreateProxyWithControllerAndRecoveryKey
FNF:1
FNH:1
FNDA:1,CreateProxyWithControllerAndRecoveryKey
DA:15,1
DA:16,1
DA:17,1
DA:18,1
DA:20,1
DA:21,1
LF:6
LH:6
BRF:0
BRH:0
end_of_record
TN:
SF:/Users/user/Sites/uport-proxy/originalContracts/Lib1.sol
FN:3,findAddress
FN:9,removeAddress
FNF:2
FNH:1
FNDA:0,findAddress
FNDA:10,removeAddress
DA:4,0
DA:5,0
DA:7,0
DA:10,10
DA:11,10
DA:12,10
DA:13,10
LF:7
LH:4
BRDA:5,1,0,0
BRDA:5,1,1,0
BRF:2
BRH:0
end_of_record
TN:
SF:/Users/user/Sites/uport-proxy/originalContracts/MetaTxController.sol
FN:10,only
FN:12,MetaTxController
FN:19,sendTx
FN:30,updateUserKey
FN:34,updateAdminKey
FN:38,transferOwnership
FNF:6
FNH:0
FNDA:0,only
FNDA:0,MetaTxController
FNDA:0,sendTx
FNDA:0,updateUserKey
FNDA:0,updateAdminKey
FNDA:0,transferOwnership
DA:13,0
DA:14,0
DA:15,0
DA:16,0
DA:21,0
DA:22,0
DA:24,0
DA:25,0
DA:26,0
DA:31,0
DA:35,0
DA:42,0
DA:43,0
LF:13
LH:0
BRDA:10,1,0,0
BRDA:10,1,1,0
BRDA:24,2,0,0
BRDA:24,2,1,0
BRF:4
BRH:0
end_of_record
TN:
SF:/Users/user/Sites/uport-proxy/originalContracts/Owned.sol
FN:5,onlyOwner
FN:6,ifOwner
FN:8,Owned
FN:12,isOwner
FN:14,transfer
FNF:5
FNH:0
FNDA:0,onlyOwner
FNDA:0,ifOwner
FNDA:0,Owned
FNDA:0,isOwner
FNDA:0,transfer
DA:9,0
DA:15,0
LF:2
LH:0
BRDA:5,1,0,0
BRDA:5,1,1,0
BRDA:6,2,0,0
BRDA:6,2,1,0
BRF:4
BRH:0
end_of_record
TN:
SF:/Users/user/Sites/uport-proxy/originalContracts/Proxy.sol
FN:17,
FN:21,forward
FN:33,onlyOwner
FN:34,ifOwner
FN:36,Proxy
FN:40,isOwner
FN:42,transfer
FNF:7
FNH:6
FNDA:2,
FNDA:7,forward
FNDA:20,onlyOwner
FNDA:0,ifOwner
FNDA:10,Proxy
FNDA:20,isOwner
FNDA:12,transfer
DA:18,2
DA:26,7
DA:27,1
DA:29,6
DA:37,10
DA:43,12
LF:6
LH:6
BRDA:26,1,0,1
BRDA:26,1,1,6
BRDA:33,2,0,19
BRDA:33,2,1,1
BRDA:34,3,0,0
BRDA:34,3,1,0
BRF:6
BRH:4
end_of_record
TN:
SF:/Users/user/Sites/uport-proxy/originalContracts/RecoverableController.sol
FN:24,onlyUserKey
FN:25,onlyRecoveryKey
FN:27,RecoverableController
FN:36,forward
FN:40,signRecoveryChange
FN:45,changeRecovery
FN:52,signControllerChange
FN:57,changeController
FN:64,signUserKeyChange
FN:69,changeUserKey
FN:77,changeRecoveryFromRecovery
FN:78,changeUserKeyFromRecovery
FNF:12
FNH:12
FNDA:11,onlyUserKey
FNDA:22,onlyRecoveryKey
FNDA:12,RecoverableController
FNDA:4,forward
FNDA:1,signRecoveryChange
FNDA:2,changeRecovery
FNDA:1,signControllerChange
FNDA:2,changeController
FNDA:1,signUserKeyChange
FNDA:2,changeUserKey
FNDA:12,changeRecoveryFromRecovery
FNDA:7,changeUserKeyFromRecovery
DA:28,12
DA:29,12
DA:30,12
DA:31,12
DA:32,12
DA:33,12
DA:37,4
DA:41,1
DA:42,1
DA:43,1
DA:46,2
DA:47,1
DA:48,1
DA:53,1
DA:54,1
DA:55,1
DA:58,2
DA:59,1
DA:60,1
DA:65,1
DA:66,1
DA:67,1
DA:70,2
DA:71,1
DA:72,1
DA:73,1
DA:79,7
DA:80,7
LF:28
LH:28
BRDA:24,1,0,7
BRDA:24,1,1,4
BRDA:25,2,0,19
BRDA:25,2,1,3
BRDA:46,3,0,1
BRDA:46,3,1,1
BRDA:58,4,0,1
BRDA:58,4,1,1
BRDA:70,5,0,1
BRDA:70,5,1,1
BRF:10
BRH:10
end_of_record
TN:
SF:/Users/user/Sites/uport-proxy/originalContracts/RecoveryQuorum.sol
FN:18,onlyUserKey
FN:20,RecoveryQuorum
FN:27,signUserChange
FN:34,changeUserKey
FN:47,replaceDelegates
FN:57,collectedSignatures
FN:65,getAddresses
FN:67,neededSignatures
FN:74,addDelegate
FN:80,removeDelegate
FN:91,garbageCollect
FN:102,delegateRecordExists
FN:105,delegateIsDeleted
FN:108,delegateIsCurrent
FN:111,delegateHasValidSignature
FNF:15
FNH:15
FNDA:17,onlyUserKey
FNDA:10,RecoveryQuorum
FNDA:50,signUserChange
FNDA:52,changeUserKey
FNDA:16,replaceDelegates
FNDA:71,collectedSignatures
FNDA:14,getAddresses
FNDA:52,neededSignatures
FNDA:45,addDelegate
FNDA:11,removeDelegate
FNDA:16,garbageCollect
FNDA:1287,delegateRecordExists
FNDA:1258,delegateIsDeleted
FNDA:1192,delegateIsCurrent
FNDA:638,delegateHasValidSignature
DA:21,10
DA:22,10
DA:23,40
DA:24,40
DA:28,50
DA:29,48
DA:30,48
DA:31,48
DA:35,52
DA:36,6
DA:37,6
DA:39,45
DA:40,14
DA:42,45
DA:48,16
DA:49,11
DA:51,16
DA:52,16
DA:53,45
DA:55,16
DA:58,71
DA:59,638
DA:60,82
DA:69,52
DA:70,554
DA:72,52
DA:75,45
DA:76,39
DA:77,39
DA:81,11
DA:83,11
DA:84,4
DA:86,7
DA:92,16
DA:93,16
DA:94,66
DA:95,10
DA:96,10
DA:97,10
DA:98,10
DA:103,1287
DA:109,1192
DA:112,638
LF:43
LH:43
BRDA:18,1,0,16
BRDA:18,1,1,1
BRDA:28,2,0,48
BRDA:28,2,1,2
BRDA:35,3,0,6
BRDA:35,3,1,46
BRDA:39,4,0,14
BRDA:39,4,1,31
BRDA:59,5,0,82
BRDA:59,5,1,556
BRDA:70,6,0,324
BRDA:70,6,1,230
BRDA:75,7,0,39
BRDA:75,7,1,6
BRDA:81,8,0,11
BRDA:81,8,1,0
BRDA:83,9,0,4
BRDA:83,9,1,7
BRDA:94,10,0,10
BRDA:94,10,1,56
BRF:20
BRH:19
end_of_record
TN:
SF:/Users/user/Sites/uport-proxy/originalContracts/TestRegistry.sol
FN:6,register
FN:10,testThrow
FNF:2
FNH:2
FNDA:6,register
FNDA:1,testThrow
DA:7,6
DA:11,1
LF:2
LH:2
BRF:0
BRH:0
end_of_record

@ -17,23 +17,25 @@ if (!shell.test('-e', './node_modules/ethereumjs-vm/lib/opFns.js.orig')) {
shell.exec('patch -b ./node_modules/ethereumjs-vm/lib/opFns.js ./hookIntoEvents.patch');
}
// Run the modified testrpc with large block limit
const testrpcProcess = childprocess.exec('./node_modules/ethereumjs-testrpc/bin/testrpc --gasLimit 0xfffffffffffff --gasPrice 0x1');
// commen this out and just run the same in another terminal.
const testrpcProcess = childprocess.exec('./node_modules/ethereumjs-testrpc/bin/testrpc --gasLimit 0xfffffffffffffffff --accounts 25');
if (shell.test('-d', '../originalContracts')) {
shell.rm('-rf', './../contracts');
shell.mv('./../originalContracts', './../contracts');
console.log('There is already an "originalContracts" directory in your truffle directory.\n' +
'This is probably due to a previous solcover failure.\n' +
'Please make sure the ./contracts/ directory contains your contracts (perhaps by copying them from originalContracts), ' +
'and then delete the originalContracts directory.');
process.exit(1);
// process.exit(1);
}
shell.mv('./../contracts/', './../originalContracts/');
shell.mkdir('./../contracts/');
// For each contract in originalContracts, get the instrumented version
shell.ls('./../originalContracts/**/*.sol').forEach(file => {
if (file !== 'originalContracts/Migrations.sol') {
if (file !== './../originalContracts/Migrations.sol') {
const canonicalContractPath = path.resolve(file);
console.log('instrumenting ', canonicalContractPath);
const contract = fs.readFileSync(canonicalContractPath).toString();
const instrumentedContractInfo = getInstrumentedVersion(contract, canonicalContractPath);
@ -45,7 +47,12 @@ shell.ls('./../originalContracts/**/*.sol').forEach(file => {
shell.cp('./../originalContracts/Migrations.sol', './../contracts/Migrations.sol');
shell.rm('./allFiredEvents'); // Delete previous results
shell.exec('truffle test --network test');
console.log('running `truffle test`')
//shell.exec('truffle test');
//shell.exec('truffle test --network test');
shell.exec('./node_modules/truffle/cli.js test --network test');
const events = fs.readFileSync('./allFiredEvents').toString().split('\n');
events.pop();

Loading…
Cancel
Save