Code coverage for Solidity smart-contracts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
solidity-coverage/coverage/lcov-report/originalContracts/MetaTxController.sol.html

207 lines
7.1 KiB

8 years ago
<!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>