diff --git a/.gitignore b/.gitignore
index 88ae067..040bfb7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,2 @@
allFiredEvents
-coverage.json
-coverage/
node_modules/
diff --git a/coverage.json b/coverage.json
new file mode 100644
index 0000000..8dec1a2
--- /dev/null
+++ b/coverage.json
@@ -0,0 +1 @@
+{"/Users/user/Sites/uport-proxy/originalContracts/IdentityFactory.sol":{"l":{"15":4,"16":4,"17":4,"18":4,"19":4,"21":4,"22":4},"path":"/Users/user/Sites/uport-proxy/originalContracts/IdentityFactory.sol","s":{"1":4,"2":4,"3":4,"4":4,"5":4,"6":4,"7":4},"b":{},"f":{"1":4},"fnMap":{"1":{"name":"CreateProxyWithControllerAndRecovery","line":14,"loc":{"start":{"line":14,"column":4},"end":{"line":14,"column":125}}}},"statementMap":{"1":{"start":{"line":15,"column":8},"end":{"line":15,"column":32}},"2":{"start":{"line":16,"column":8},"end":{"line":16,"column":112}},"3":{"start":{"line":17,"column":8},"end":{"line":17,"column":33}},"4":{"start":{"line":18,"column":8},"end":{"line":18,"column":80}},"5":{"start":{"line":19,"column":8},"end":{"line":19,"column":60}},"6":{"start":{"line":21,"column":8},"end":{"line":21,"column":66}},"7":{"start":{"line":22,"column":8},"end":{"line":22,"column":40}}},"branchMap":{}},"/Users/user/Sites/uport-proxy/originalContracts/IdentityFactoryWithRecoveryKey.sol":{"l":{"15":1,"16":1,"17":1,"18":1,"20":1,"21":1},"path":"/Users/user/Sites/uport-proxy/originalContracts/IdentityFactoryWithRecoveryKey.sol","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1},"b":{},"f":{"1":1},"fnMap":{"1":{"name":"CreateProxyWithControllerAndRecoveryKey","line":14,"loc":{"start":{"line":14,"column":4},"end":{"line":14,"column":129}}}},"statementMap":{"1":{"start":{"line":15,"column":8},"end":{"line":15,"column":32}},"2":{"start":{"line":16,"column":8},"end":{"line":16,"column":112}},"3":{"start":{"line":17,"column":8},"end":{"line":17,"column":33}},"4":{"start":{"line":18,"column":8},"end":{"line":18,"column":58}},"5":{"start":{"line":20,"column":8},"end":{"line":20,"column":64}},"6":{"start":{"line":21,"column":8},"end":{"line":21,"column":40}}},"branchMap":{}},"/Users/user/Sites/uport-proxy/originalContracts/Lib1.sol":{"l":{"4":0,"5":0,"7":0,"10":10,"11":10,"12":10,"13":10},"path":"/Users/user/Sites/uport-proxy/originalContracts/Lib1.sol","s":{"1":0,"2":0,"3":0,"4":0,"5":10,"6":10,"7":10},"b":{"1":[0,0]},"f":{"1":0,"2":10},"fnMap":{"1":{"name":"findAddress","line":3,"loc":{"start":{"line":3,"column":4},"end":{"line":3,"column":71}}},"2":{"name":"removeAddress","line":9,"loc":{"start":{"line":9,"column":4},"end":{"line":9,"column":56}}}},"statementMap":{"1":{"start":{"line":4,"column":8},"end":{"line":4,"column":130}},"2":{"start":{"line":5,"column":12},"end":{"line":5,"column":43}},"3":{"start":{"line":5,"column":29},"end":{"line":5,"column":42}},"4":{"start":{"line":7,"column":8},"end":{"line":7,"column":17}},"5":{"start":{"line":10,"column":8},"end":{"line":10,"column":44}},"6":{"start":{"line":11,"column":8},"end":{"line":11,"column":37}},"7":{"start":{"line":13,"column":8},"end":{"line":13,"column":35}}},"branchMap":{"1":{"line":5,"type":"if","locations":[{"start":{"line":5,"column":12},"end":{"line":5,"column":12}},{"start":{"line":5,"column":12},"end":{"line":5,"column":12}}]}}},"/Users/user/Sites/uport-proxy/originalContracts/MetaTxController.sol":{"l":{"13":0,"14":0,"15":0,"16":0,"21":0,"22":0,"24":0,"25":0,"26":0,"31":0,"35":0,"42":0,"43":0},"path":"/Users/user/Sites/uport-proxy/originalContracts/MetaTxController.sol","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0},"b":{"1":[0,0],"2":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0},"fnMap":{"1":{"name":"only","line":10,"loc":{"start":{"line":10,"column":2},"end":{"line":10,"column":29}}},"2":{"name":"MetaTxController","line":12,"loc":{"start":{"line":12,"column":2},"end":{"line":12,"column":87}}},"3":{"name":"sendTx","line":19,"loc":{"start":{"line":19,"column":2},"end":{"line":19,"column":106}}},"4":{"name":"updateUserKey","line":30,"loc":{"start":{"line":30,"column":2},"end":{"line":30,"column":60}}},"5":{"name":"updateAdminKey","line":34,"loc":{"start":{"line":34,"column":2},"end":{"line":34,"column":62}}},"6":{"name":"transferOwnership","line":38,"loc":{"start":{"line":38,"column":2},"end":{"line":38,"column":62}}}},"statementMap":{"1":{"start":{"line":10,"column":31},"end":{"line":10,"column":55}},"2":{"start":{"line":13,"column":4},"end":{"line":13,"column":30}},"3":{"start":{"line":14,"column":4},"end":{"line":14,"column":21}},"4":{"start":{"line":15,"column":4},"end":{"line":15,"column":23}},"5":{"start":{"line":16,"column":4},"end":{"line":16,"column":21}},"6":{"start":{"line":21,"column":4},"end":{"line":21,"column":67}},"7":{"start":{"line":22,"column":4},"end":{"line":22,"column":43}},"8":{"start":{"line":24,"column":4},"end":{"line":24,"column":678}},"9":{"start":{"line":25,"column":6},"end":{"line":25,"column":44}},"10":{"start":{"line":26,"column":6},"end":{"line":26,"column":24}},"11":{"start":{"line":31,"column":4},"end":{"line":31,"column":23}},"12":{"start":{"line":35,"column":4},"end":{"line":35,"column":25}},"13":{"start":{"line":42,"column":4},"end":{"line":42,"column":27}},"14":{"start":{"line":43,"column":4},"end":{"line":43,"column":20}}},"branchMap":{"1":{"line":10,"type":"if","locations":[{"start":{"line":10,"column":31},"end":{"line":10,"column":31}},{"start":{"line":10,"column":31},"end":{"line":10,"column":31}}]},"2":{"line":24,"type":"if","locations":[{"start":{"line":24,"column":4},"end":{"line":24,"column":4}},{"start":{"line":24,"column":4},"end":{"line":24,"column":4}}]}}},"/Users/user/Sites/uport-proxy/originalContracts/Owned.sol":{"l":{"9":0,"15":0},"path":"/Users/user/Sites/uport-proxy/originalContracts/Owned.sol","s":{"1":0,"2":0,"3":0,"4":0,"5":0},"b":{"1":[0,0],"2":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0},"fnMap":{"1":{"name":"onlyOwner","line":5,"loc":{"start":{"line":5,"column":4},"end":{"line":5,"column":22}}},"2":{"name":"ifOwner","line":6,"loc":{"start":{"line":6,"column":4},"end":{"line":6,"column":35}}},"3":{"name":"Owned","line":8,"loc":{"start":{"line":8,"column":4},"end":{"line":8,"column":18}}},"4":{"name":"isOwner","line":12,"loc":{"start":{"line":12,"column":4},"end":{"line":12,"column":54}}},"5":{"name":"transfer","line":14,"loc":{"start":{"line":14,"column":4},"end":{"line":14,"column":46}}}},"statementMap":{"1":{"start":{"line":5,"column":26},"end":{"line":5,"column":52}},"2":{"start":{"line":6,"column":39},"end":{"line":6,"column":60}},"3":{"start":{"line":9,"column":8},"end":{"line":9,"column":25}},"4":{"start":{"line":12,"column":58},"end":{"line":12,"column":78}},"5":{"start":{"line":15,"column":8},"end":{"line":15,"column":21}}},"branchMap":{"1":{"line":5,"type":"if","locations":[{"start":{"line":5,"column":26},"end":{"line":5,"column":26}},{"start":{"line":5,"column":26},"end":{"line":5,"column":26}}]},"2":{"line":6,"type":"if","locations":[{"start":{"line":6,"column":39},"end":{"line":6,"column":39}},{"start":{"line":6,"column":39},"end":{"line":6,"column":39}}]}}},"/Users/user/Sites/uport-proxy/originalContracts/Proxy.sol":{"l":{"18":2,"26":7,"27":1,"29":6,"37":10,"43":12},"path":"/Users/user/Sites/uport-proxy/originalContracts/Proxy.sol","s":{"1":2,"2":7,"3":1,"4":6,"5":20,"6":0,"7":10,"8":20,"9":12},"b":{"1":[1,6],"2":[19,1],"3":[0,0]},"f":{"1":2,"2":7,"3":20,"4":0,"5":10,"6":20,"7":12},"fnMap":{"1":{"name":null,"line":17,"loc":{"start":{"line":17,"column":4},"end":{"line":17,"column":22}}},"2":{"name":"forward","line":21,"loc":{"start":{"line":21,"column":4},"end":{"line":21,"column":74}}},"3":{"name":"onlyOwner","line":33,"loc":{"start":{"line":33,"column":4},"end":{"line":33,"column":22}}},"4":{"name":"ifOwner","line":34,"loc":{"start":{"line":34,"column":4},"end":{"line":34,"column":35}}},"5":{"name":"Proxy","line":36,"loc":{"start":{"line":36,"column":4},"end":{"line":36,"column":18}}},"6":{"name":"isOwner","line":40,"loc":{"start":{"line":40,"column":4},"end":{"line":40,"column":54}}},"7":{"name":"transfer","line":42,"loc":{"start":{"line":42,"column":4},"end":{"line":42,"column":46}}}},"statementMap":{"1":{"start":{"line":18,"column":8},"end":{"line":18,"column":38}},"2":{"start":{"line":26,"column":8},"end":{"line":26,"column":864}},"3":{"start":{"line":27,"column":12},"end":{"line":27,"column":17}},"4":{"start":{"line":29,"column":8},"end":{"line":29,"column":42}},"5":{"start":{"line":33,"column":26},"end":{"line":33,"column":52}},"6":{"start":{"line":34,"column":39},"end":{"line":34,"column":60}},"7":{"start":{"line":37,"column":8},"end":{"line":37,"column":25}},"8":{"start":{"line":40,"column":58},"end":{"line":40,"column":78}},"9":{"start":{"line":43,"column":8},"end":{"line":43,"column":21}}},"branchMap":{"1":{"line":26,"type":"if","locations":[{"start":{"line":26,"column":8},"end":{"line":26,"column":8}},{"start":{"line":26,"column":8},"end":{"line":26,"column":8}}]},"2":{"line":33,"type":"if","locations":[{"start":{"line":33,"column":26},"end":{"line":33,"column":26}},{"start":{"line":33,"column":26},"end":{"line":33,"column":26}}]},"3":{"line":34,"type":"if","locations":[{"start":{"line":34,"column":39},"end":{"line":34,"column":39}},{"start":{"line":34,"column":39},"end":{"line":34,"column":39}}]}}},"/Users/user/Sites/uport-proxy/originalContracts/RecoverableController.sol":{"l":{"28":12,"29":12,"30":12,"31":12,"32":12,"33":12,"37":4,"41":1,"42":1,"43":1,"46":2,"47":1,"48":1,"53":1,"54":1,"55":1,"58":2,"59":1,"60":1,"65":1,"66":1,"67":1,"70":2,"71":1,"72":1,"73":1,"79":7,"80":7},"path":"/Users/user/Sites/uport-proxy/originalContracts/RecoverableController.sol","s":{"1":11,"2":22,"3":12,"4":12,"5":12,"6":12,"7":12,"8":12,"9":4,"10":1,"11":1,"12":1,"13":2,"14":1,"15":1,"16":1,"17":1,"18":2,"19":1,"20":1,"21":1,"22":1,"23":1,"24":2,"25":1,"26":1,"27":12,"28":7},"b":{"1":[7,4],"2":[19,3],"3":[1,1],"4":[1,1],"5":[1,1]},"f":{"1":11,"2":22,"3":12,"4":4,"5":1,"6":2,"7":1,"8":2,"9":1,"10":2,"11":12,"12":7},"fnMap":{"1":{"name":"onlyUserKey","line":24,"loc":{"start":{"line":24,"column":4},"end":{"line":24,"column":25}}},"2":{"name":"onlyRecoveryKey","line":25,"loc":{"start":{"line":25,"column":4},"end":{"line":25,"column":29}}},"3":{"name":"RecoverableController","line":27,"loc":{"start":{"line":27,"column":4},"end":{"line":27,"column":114}}},"4":{"name":"forward","line":36,"loc":{"start":{"line":36,"column":4},"end":{"line":36,"column":76}}},"5":{"name":"signRecoveryChange","line":40,"loc":{"start":{"line":40,"column":4},"end":{"line":40,"column":71}}},"6":{"name":"changeRecovery","line":45,"loc":{"start":{"line":45,"column":4},"end":{"line":45,"column":28}}},"7":{"name":"signControllerChange","line":52,"loc":{"start":{"line":52,"column":4},"end":{"line":52,"column":72}}},"8":{"name":"changeController","line":57,"loc":{"start":{"line":57,"column":4},"end":{"line":57,"column":30}}},"9":{"name":"signUserKeyChange","line":64,"loc":{"start":{"line":64,"column":4},"end":{"line":64,"column":66}}},"10":{"name":"changeUserKey","line":69,"loc":{"start":{"line":69,"column":4},"end":{"line":69,"column":26}}},"11":{"name":"changeRecoveryFromRecovery","line":77,"loc":{"start":{"line":77,"column":4},"end":{"line":77,"column":75}}},"12":{"name":"changeUserKeyFromRecovery","line":78,"loc":{"start":{"line":78,"column":4},"end":{"line":78,"column":70}}}},"statementMap":{"1":{"start":{"line":24,"column":29},"end":{"line":24,"column":57}},"2":{"start":{"line":25,"column":33},"end":{"line":25,"column":65}},"3":{"start":{"line":28,"column":8},"end":{"line":28,"column":18}},"4":{"start":{"line":29,"column":8},"end":{"line":29,"column":34}},"5":{"start":{"line":30,"column":8},"end":{"line":30,"column":25}},"6":{"start":{"line":31,"column":8},"end":{"line":31,"column":37}},"7":{"start":{"line":32,"column":8},"end":{"line":32,"column":35}},"8":{"start":{"line":33,"column":8},"end":{"line":33,"column":31}},"9":{"start":{"line":37,"column":8},"end":{"line":37,"column":46}},"10":{"start":{"line":41,"column":8},"end":{"line":41,"column":59}},"11":{"start":{"line":42,"column":8},"end":{"line":42,"column":49}},"12":{"start":{"line":43,"column":8},"end":{"line":43,"column":54}},"13":{"start":{"line":46,"column":8},"end":{"line":46,"column":1564}},"14":{"start":{"line":47,"column":12},"end":{"line":47,"column":44}},"15":{"start":{"line":53,"column":8},"end":{"line":53,"column":58}},"16":{"start":{"line":54,"column":8},"end":{"line":54,"column":47}},"17":{"start":{"line":55,"column":8},"end":{"line":55,"column":56}},"18":{"start":{"line":58,"column":8},"end":{"line":58,"column":2060}},"19":{"start":{"line":59,"column":12},"end":{"line":59,"column":45}},"20":{"start":{"line":60,"column":12},"end":{"line":60,"column":38}},"21":{"start":{"line":65,"column":8},"end":{"line":65,"column":56}},"22":{"start":{"line":66,"column":8},"end":{"line":66,"column":41}},"23":{"start":{"line":67,"column":8},"end":{"line":67,"column":53}},"24":{"start":{"line":70,"column":8},"end":{"line":70,"column":2535}},"25":{"start":{"line":71,"column":12},"end":{"line":71,"column":36}},"26":{"start":{"line":73,"column":12},"end":{"line":73,"column":53}},"27":{"start":{"line":77,"column":79},"end":{"line":77,"column":104}},"28":{"start":{"line":80,"column":8},"end":{"line":80,"column":25}}},"branchMap":{"1":{"line":24,"type":"if","locations":[{"start":{"line":24,"column":29},"end":{"line":24,"column":29}},{"start":{"line":24,"column":29},"end":{"line":24,"column":29}}]},"2":{"line":25,"type":"if","locations":[{"start":{"line":25,"column":33},"end":{"line":25,"column":33}},{"start":{"line":25,"column":33},"end":{"line":25,"column":33}}]},"3":{"line":46,"type":"if","locations":[{"start":{"line":46,"column":8},"end":{"line":46,"column":8}},{"start":{"line":46,"column":8},"end":{"line":46,"column":8}}]},"4":{"line":58,"type":"if","locations":[{"start":{"line":58,"column":8},"end":{"line":58,"column":8}},{"start":{"line":58,"column":8},"end":{"line":58,"column":8}}]},"5":{"line":70,"type":"if","locations":[{"start":{"line":70,"column":8},"end":{"line":70,"column":8}},{"start":{"line":70,"column":8},"end":{"line":70,"column":8}}]}}},"/Users/user/Sites/uport-proxy/originalContracts/RecoveryQuorum.sol":{"l":{"21":10,"22":10,"23":40,"24":40,"28":50,"29":48,"30":48,"31":48,"35":52,"36":6,"37":6,"39":45,"40":14,"42":45,"48":16,"49":11,"51":16,"52":16,"53":45,"55":16,"58":71,"59":638,"60":82,"69":52,"70":554,"72":52,"75":45,"76":39,"77":39,"81":11,"83":11,"84":4,"86":7,"92":16,"93":16,"94":66,"95":10,"96":10,"97":10,"98":10,"103":1287,"109":1192,"112":638},"path":"/Users/user/Sites/uport-proxy/originalContracts/RecoveryQuorum.sol","s":{"1":17,"2":10,"3":10,"4":40,"5":40,"6":50,"7":48,"8":48,"9":48,"10":52,"11":6,"12":6,"13":45,"14":14,"15":16,"16":11,"17":16,"18":16,"19":45,"20":16,"21":71,"22":638,"23":14,"24":52,"25":554,"26":52,"27":45,"28":39,"29":39,"30":11,"31":11,"32":4,"33":7,"34":16,"35":16,"36":66,"37":10,"38":10,"39":10,"40":10,"41":1287,"42":1258,"43":1192,"44":638},"b":{"1":[16,1],"2":[48,2],"3":[6,46],"4":[14,31],"5":[82,556],"6":[324,230],"7":[39,6],"8":[11,0],"9":[4,7],"10":[10,56]},"f":{"1":17,"2":10,"3":50,"4":52,"5":16,"6":71,"7":14,"8":52,"9":45,"10":11,"11":16,"12":1287,"13":1258,"14":1192,"15":638},"fnMap":{"1":{"name":"onlyUserKey","line":18,"loc":{"start":{"line":18,"column":4},"end":{"line":18,"column":24}}},"2":{"name":"RecoveryQuorum","line":20,"loc":{"start":{"line":20,"column":4},"end":{"line":20,"column":68}}},"3":{"name":"signUserChange","line":27,"loc":{"start":{"line":27,"column":4},"end":{"line":27,"column":51}}},"4":{"name":"changeUserKey","line":34,"loc":{"start":{"line":34,"column":4},"end":{"line":34,"column":45}}},"5":{"name":"replaceDelegates","line":47,"loc":{"start":{"line":47,"column":4},"end":{"line":47,"column":94}}},"6":{"name":"collectedSignatures","line":57,"loc":{"start":{"line":57,"column":4},"end":{"line":57,"column":82}}},"7":{"name":"getAddresses","line":65,"loc":{"start":{"line":65,"column":4},"end":{"line":65,"column":54}}},"8":{"name":"neededSignatures","line":67,"loc":{"start":{"line":67,"column":4},"end":{"line":67,"column":44}}},"9":{"name":"addDelegate","line":74,"loc":{"start":{"line":74,"column":4},"end":{"line":74,"column":49}}},"10":{"name":"removeDelegate","line":80,"loc":{"start":{"line":80,"column":4},"end":{"line":80,"column":52}}},"11":{"name":"garbageCollect","line":91,"loc":{"start":{"line":91,"column":4},"end":{"line":91,"column":35}}},"12":{"name":"delegateRecordExists","line":102,"loc":{"start":{"line":102,"column":4},"end":{"line":102,"column":66}}},"13":{"name":"delegateIsDeleted","line":105,"loc":{"start":{"line":105,"column":4},"end":{"line":105,"column":63}}},"14":{"name":"delegateIsCurrent","line":108,"loc":{"start":{"line":108,"column":4},"end":{"line":108,"column":63}}},"15":{"name":"delegateHasValidSignature","line":111,"loc":{"start":{"line":111,"column":4},"end":{"line":111,"column":71}}}},"statementMap":{"1":{"start":{"line":18,"column":28},"end":{"line":18,"column":69}},"2":{"start":{"line":21,"column":8},"end":{"line":21,"column":54}},"3":{"start":{"line":22,"column":8},"end":{"line":22,"column":708}},"4":{"start":{"line":23,"column":12},"end":{"line":23,"column":48}},"5":{"start":{"line":24,"column":12},"end":{"line":24,"column":117}},"6":{"start":{"line":28,"column":8},"end":{"line":28,"column":1003}},"7":{"start":{"line":29,"column":12},"end":{"line":29,"column":66}},"8":{"start":{"line":30,"column":12},"end":{"line":30,"column":41}},"9":{"start":{"line":31,"column":12},"end":{"line":31,"column":54}},"10":{"start":{"line":35,"column":8},"end":{"line":35,"column":1296}},"11":{"start":{"line":36,"column":12},"end":{"line":36,"column":59}},"12":{"start":{"line":37,"column":12},"end":{"line":37,"column":1433}},"13":{"start":{"line":39,"column":16},"end":{"line":39,"column":1571}},"14":{"start":{"line":40,"column":20},"end":{"line":40,"column":69}},"15":{"start":{"line":48,"column":8},"end":{"line":48,"column":1919}},"16":{"start":{"line":49,"column":12},"end":{"line":49,"column":47}},"17":{"start":{"line":51,"column":8},"end":{"line":51,"column":23}},"18":{"start":{"line":52,"column":8},"end":{"line":52,"column":2067}},"19":{"start":{"line":53,"column":12},"end":{"line":53,"column":41}},"20":{"start":{"line":55,"column":8},"end":{"line":55,"column":52}},"21":{"start":{"line":58,"column":8},"end":{"line":58,"column":2327}},"22":{"start":{"line":59,"column":12},"end":{"line":59,"column":2397}},"23":{"start":{"line":65,"column":58},"end":{"line":65,"column":82}},"24":{"start":{"line":69,"column":8},"end":{"line":69,"column":2793}},"25":{"start":{"line":70,"column":12},"end":{"line":70,"column":92}},"26":{"start":{"line":72,"column":8},"end":{"line":72,"column":41}},"27":{"start":{"line":75,"column":8},"end":{"line":75,"column":3061}},"28":{"start":{"line":76,"column":12},"end":{"line":76,"column":142}},"29":{"start":{"line":77,"column":12},"end":{"line":77,"column":43}},"30":{"start":{"line":81,"column":8},"end":{"line":81,"column":3414}},"31":{"start":{"line":83,"column":12},"end":{"line":83,"column":3561}},"32":{"start":{"line":84,"column":16},"end":{"line":84,"column":53}},"33":{"start":{"line":86,"column":16},"end":{"line":86,"column":81}},"34":{"start":{"line":92,"column":8},"end":{"line":92,"column":17}},"35":{"start":{"line":93,"column":8},"end":{"line":93,"column":3860}},"36":{"start":{"line":94,"column":12},"end":{"line":94,"column":3923}},"37":{"start":{"line":95,"column":16},"end":{"line":95,"column":63}},"38":{"start":{"line":96,"column":16},"end":{"line":96,"column":63}},"39":{"start":{"line":97,"column":16},"end":{"line":97,"column":66}},"40":{"start":{"line":98,"column":16},"end":{"line":98,"column":55}},"41":{"start":{"line":103,"column":8},"end":{"line":103,"column":34}},"42":{"start":{"line":106,"column":8},"end":{"line":106,"column":36}},"43":{"start":{"line":109,"column":8},"end":{"line":109,"column":87}},"44":{"start":{"line":112,"column":8},"end":{"line":112,"column":63}}},"branchMap":{"1":{"line":18,"type":"if","locations":[{"start":{"line":18,"column":28},"end":{"line":18,"column":28}},{"start":{"line":18,"column":28},"end":{"line":18,"column":28}}]},"2":{"line":28,"type":"if","locations":[{"start":{"line":28,"column":8},"end":{"line":28,"column":8}},{"start":{"line":28,"column":8},"end":{"line":28,"column":8}}]},"3":{"line":35,"type":"if","locations":[{"start":{"line":35,"column":8},"end":{"line":35,"column":8}},{"start":{"line":35,"column":8},"end":{"line":35,"column":8}}]},"4":{"line":39,"type":"if","locations":[{"start":{"line":39,"column":16},"end":{"line":39,"column":16}},{"start":{"line":39,"column":16},"end":{"line":39,"column":16}}]},"5":{"line":59,"type":"if","locations":[{"start":{"line":59,"column":12},"end":{"line":59,"column":12}},{"start":{"line":59,"column":12},"end":{"line":59,"column":12}}]},"6":{"line":70,"type":"if","locations":[{"start":{"line":70,"column":12},"end":{"line":70,"column":12}},{"start":{"line":70,"column":12},"end":{"line":70,"column":12}}]},"7":{"line":75,"type":"if","locations":[{"start":{"line":75,"column":8},"end":{"line":75,"column":8}},{"start":{"line":75,"column":8},"end":{"line":75,"column":8}}]},"8":{"line":81,"type":"if","locations":[{"start":{"line":81,"column":8},"end":{"line":81,"column":8}},{"start":{"line":81,"column":8},"end":{"line":81,"column":8}}]},"9":{"line":83,"type":"if","locations":[{"start":{"line":83,"column":12},"end":{"line":83,"column":12}},{"start":{"line":83,"column":12},"end":{"line":83,"column":12}}]},"10":{"line":94,"type":"if","locations":[{"start":{"line":94,"column":12},"end":{"line":94,"column":12}},{"start":{"line":94,"column":12},"end":{"line":94,"column":12}}]}}},"/Users/user/Sites/uport-proxy/originalContracts/TestRegistry.sol":{"l":{"7":6,"11":1},"path":"/Users/user/Sites/uport-proxy/originalContracts/TestRegistry.sol","s":{"1":6,"2":1},"b":{},"f":{"1":6,"2":1},"fnMap":{"1":{"name":"register","line":6,"loc":{"start":{"line":6,"column":2},"end":{"line":6,"column":28}}},"2":{"name":"testThrow","line":10,"loc":{"start":{"line":10,"column":2},"end":{"line":10,"column":23}}}},"statementMap":{"1":{"start":{"line":7,"column":4},"end":{"line":7,"column":27}},"2":{"start":{"line":11,"column":6},"end":{"line":11,"column":11}}},"branchMap":{}}}
\ No newline at end of file
diff --git a/coverage/lcov-report/base.css b/coverage/lcov-report/base.css
new file mode 100644
index 0000000..29737bc
--- /dev/null
+++ b/coverage/lcov-report/base.css
@@ -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;
+}
diff --git a/coverage/lcov-report/index.html b/coverage/lcov-report/index.html
new file mode 100644
index 0000000..b9ff29d
--- /dev/null
+++ b/coverage/lcov-report/index.html
@@ -0,0 +1,93 @@
+
+
+
+ Code coverage report for All files
+
+
+
+
+
+
+
+
+
+
+ /
+
+
+
+ 80.33%
+ Statements
+ 98/122
+
+
+ 71.74%
+ Branches
+ 33/46
+
+
+ 74.51%
+ Functions
+ 38/51
+
+
+ 84.21%
+ Lines
+ 96/114
+
+
+
+
+
+
+
+
+ File
+
+ Statements
+
+ Branches
+
+ Functions
+
+ Lines
+
+
+
+
+ originalContracts/
+
+ 80.33%
+ 98/122
+ 71.74%
+ 33/46
+ 74.51%
+ 38/51
+ 84.21%
+ 96/114
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage/lcov-report/originalContracts/IdentityFactory.sol.html b/coverage/lcov-report/originalContracts/IdentityFactory.sol.html
new file mode 100644
index 0000000..86d46d8
--- /dev/null
+++ b/coverage/lcov-report/originalContracts/IdentityFactory.sol.html
@@ -0,0 +1,137 @@
+
+
+
+ Code coverage report for originalContracts/IdentityFactory.sol
+
+
+
+
+
+
+
+
+
+
+
+
+ 100%
+ Statements
+ 7/7
+
+
+ 100%
+ Branches
+ 0/0
+
+
+ 100%
+ Functions
+ 1/1
+
+
+ 100%
+ Lines
+ 7/7
+
+
+
+
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+4×
+4×
+4×
+4×
+4×
+
+4×
+4×
+
+
+ pragma solidity ^0.4.4;
+import "./RecoveryQuorum.sol";
+
+contract IdentityFactory {
+ event IdentityCreated(
+ address indexed userKey,
+ address proxy,
+ address controller,
+ address recoveryQuorum);
+
+ mapping(address => address) public senderToProxy;
+
+ //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);
+
+ IdentityCreated(userKey, proxy, controller, recoveryQuorum);
+ senderToProxy[msg.sender] = proxy;
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage/lcov-report/originalContracts/IdentityFactoryWithRecoveryKey.sol.html b/coverage/lcov-report/originalContracts/IdentityFactoryWithRecoveryKey.sol.html
new file mode 100644
index 0000000..fb9d72e
--- /dev/null
+++ b/coverage/lcov-report/originalContracts/IdentityFactoryWithRecoveryKey.sol.html
@@ -0,0 +1,134 @@
+
+
+
+ Code coverage report for originalContracts/IdentityFactoryWithRecoveryKey.sol
+
+
+
+
+
+
+
+
+
+
+
+
+ 100%
+ Statements
+ 6/6
+
+
+ 100%
+ Branches
+ 0/0
+
+
+ 100%
+ Functions
+ 1/1
+
+
+ 100%
+ Lines
+ 6/6
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+
+
+
+
+
+
+
+
+
+
+
+
+
+1×
+1×
+1×
+1×
+
+1×
+1×
+
+
+ pragma solidity ^0.4.4;
+import "./RecoverableController.sol";
+
+contract IdentityFactoryWithRecoveryKey {
+ event IdentityCreated(
+ address indexed userKey,
+ address proxy,
+ address controller,
+ address recoveryKey);
+
+ mapping(address => address) public senderToProxy;
+
+ //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);
+
+ IdentityCreated(userKey, proxy, controller, _recoveryKey);
+ senderToProxy[msg.sender] = proxy;
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage/lcov-report/originalContracts/Lib1.sol.html b/coverage/lcov-report/originalContracts/Lib1.sol.html
new file mode 100644
index 0000000..1247ed9
--- /dev/null
+++ b/coverage/lcov-report/originalContracts/Lib1.sol.html
@@ -0,0 +1,110 @@
+
+
+
+ Code coverage report for originalContracts/Lib1.sol
+
+
+
+
+
+
+
+
+
+
+
+
+ 42.86%
+ Statements
+ 3/7
+
+
+ 0%
+ Branches
+ 0/2
+
+
+ 50%
+ Functions
+ 1/2
+
+
+ 57.14%
+ Lines
+ 4/7
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+
+
+
+
+
+
+
+
+10×
+10×
+10×
+10×
+
+
+ pragma solidity ^0.4.4;
+library Lib1{
+ function findAddress(address a, address[] storage arry) returns (int ){
+ for (uint i = 0 ; i < arry.length ; i++){
+ if(arry[i] == a){return int(i); }
+ }
+ return -1;
+ }
+ function removeAddress(uint i, address[] storage arry){
+ uint lengthMinusOne = arry.length - 1;
+ arry[i] = arry[lengthMinusOne];
+ delete arry[lengthMinusOne];
+ arry.length = lengthMinusOne;
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage/lcov-report/originalContracts/MetaTxController.sol.html b/coverage/lcov-report/originalContracts/MetaTxController.sol.html
new file mode 100644
index 0000000..c9146a1
--- /dev/null
+++ b/coverage/lcov-report/originalContracts/MetaTxController.sol.html
@@ -0,0 +1,206 @@
+
+
+
+ Code coverage report for originalContracts/MetaTxController.sol
+
+
+
+
+
+
+
+
+
+
+
+
+ 0%
+ Statements
+ 0/14
+
+
+ 0%
+ Branches
+ 0/4
+
+
+ 0%
+ Functions
+ 0/6
+
+
+ 0%
+ Lines
+ 0/13
+
+
+
+
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ pragma solidity ^0.4.4;
+import "./Proxy.sol";
+contract MetaTxController {
+
+ Proxy public proxy;
+ address public userKey;
+ address public adminKey;
+ uint public referenceNonce;
+
+ modifier only(address key) { if (msg.sender == key) _; }
+
+ function MetaTxController(address proxyAddress, address _userKey, address _adminKey) {
+ proxy = Proxy(proxyAddress) ;
+ userKey = _userKey ;
+ adminKey = _adminKey ;
+ referenceNonce = 0 ;
+ }
+
+ function sendTx(address destination, uint value, bytes data, uint nonce, uint8 v, bytes32 r, bytes32 s) {
+
+ var h = sha3(destination, bytes32(value), bytes32(nonce), data);
+ var addressFromSig = ecrecover(h,v,r,s);
+
+ if (nonce == referenceNonce && addressFromSig == userKey) {
+ proxy.forward(destination, value, data) ;
+ referenceNonce += 1 ;
+ }
+ }
+
+ function updateUserKey(address newUserKey) only(adminKey) {
+ userKey = newUserKey ;
+ }
+
+ function updateAdminKey(address newAdminKey) only(adminKey) {
+ adminKey = newAdminKey ;
+ }
+
+ function transferOwnership(address newOwner) only(adminKey) {
+ // This will end the functionality of the Ownership contract
+ // since it's no longer allowed to forward transactions
+ // to the proxy
+ proxy.transfer(newOwner) ;
+ suicide(newOwner) ;
+ }
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage/lcov-report/originalContracts/Owned.sol.html b/coverage/lcov-report/originalContracts/Owned.sol.html
new file mode 100644
index 0000000..ff00adc
--- /dev/null
+++ b/coverage/lcov-report/originalContracts/Owned.sol.html
@@ -0,0 +1,116 @@
+
+
+
+ Code coverage report for originalContracts/Owned.sol
+
+
+
+
+
+
+
+
+
+
+
+
+ 0%
+ Statements
+ 0/5
+
+
+ 0%
+ Branches
+ 0/4
+
+
+ 0%
+ Functions
+ 0/5
+
+
+ 0%
+ Lines
+ 0/2
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ // A base Owned contract
+pragma solidity ^0.4.4;
+contract Owned {
+ address public owner;
+ modifier onlyOwner( ){ if (isOwner(msg.sender)) _; }
+ modifier ifOwner(address sender) { if(isOwner(sender)) _; }
+
+ function Owned( ){
+ owner = msg.sender ;
+ }
+
+ function isOwner(address addr) public returns(bool) { return addr == owner; }
+
+ function transfer(address _owner) onlyOwner {
+ owner = _owner ;
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage/lcov-report/originalContracts/Proxy.sol.html b/coverage/lcov-report/originalContracts/Proxy.sol.html
new file mode 100644
index 0000000..d16c836
--- /dev/null
+++ b/coverage/lcov-report/originalContracts/Proxy.sol.html
@@ -0,0 +1,200 @@
+
+
+
+ Code coverage report for originalContracts/Proxy.sol
+
+
+
+
+
+
+
+
+
+
+
+
+ 88.89%
+ Statements
+ 8/9
+
+
+ 66.67%
+ Branches
+ 4/6
+
+
+ 85.71%
+ Functions
+ 6/7
+
+
+ 100%
+ Lines
+ 6/6
+
+
+
+
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2×
+
+
+
+
+
+
+
+7×
+1×
+
+6×
+
+
+
+
+
+
+
+10×
+
+
+
+
+
+12×
+
+
+ // The core proxy facade
+// - is owned by a user or implementation contract
+// - only forwards transactions for its owner
+pragma solidity ^0.4.4;
+
+contract Proxy {
+ event Forwarded (
+ address indexed destination,
+ uint value,
+ bytes data
+ );
+ event Received (
+ address indexed sender,
+ uint value
+ );
+
+ function () payable {
+ Received(msg.sender, msg.value);
+ }
+
+ 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);
+ }
+
+ address public owner;
+ modifier onlyOwner(){ if (isOwner(msg.sender)) _; }
+ modifier ifOwner(address sender) { if(isOwner(sender)) _; }
+
+ function Proxy(){
+ owner = msg.sender;
+ }
+
+ function isOwner(address addr) public returns(bool) { return addr == owner; }
+
+ function transfer(address _owner) onlyOwner {
+ owner = _owner;
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage/lcov-report/originalContracts/RecoverableController.sol.html b/coverage/lcov-report/originalContracts/RecoverableController.sol.html
new file mode 100644
index 0000000..999fe4e
--- /dev/null
+++ b/coverage/lcov-report/originalContracts/RecoverableController.sol.html
@@ -0,0 +1,314 @@
+
+
+
+ Code coverage report for originalContracts/RecoverableController.sol
+
+
+
+
+
+
+
+
+
+
+
+
+ 100%
+ Statements
+ 28/28
+
+
+ 100%
+ Branches
+ 10/10
+
+
+ 100%
+ Functions
+ 12/12
+
+
+ 100%
+ Lines
+ 28/28
+
+
+
+
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+12×
+12×
+12×
+12×
+12×
+12×
+
+
+
+4×
+
+
+
+1×
+1×
+1×
+
+
+2×
+1×
+1×
+
+
+
+
+1×
+1×
+1×
+
+
+2×
+1×
+1×
+
+
+
+
+1×
+1×
+1×
+
+
+2×
+1×
+1×
+1×
+
+
+
+
+
+7×
+7×
+
+
+
+ pragma solidity ^0.4.4;
+import "./Proxy.sol";
+
+contract RecoverableController {
+ uint public version;
+ Proxy public proxy;
+
+ address public userKey;
+ address public proposedUserKey;
+ uint public proposedUserKeyPendingUntil;
+
+ address public recoveryKey;
+ address public proposedRecoveryKey;
+ uint public proposedRecoveryKeyPendingUntil;
+
+ address public proposedController;
+ uint public proposedControllerPendingUntil;
+
+ uint public shortTimeLock;// use 900 for 15 minutes
+ uint public longTimeLock; // use 259200 for 3 days
+
+ event RecoveryEvent(string action, address initiatedBy);
+
+ modifier onlyUserKey() { if (msg.sender == userKey) _; }
+ modifier onlyRecoveryKey() { if (msg.sender == recoveryKey) _; }
+
+ function RecoverableController(address proxyAddress, address _userKey, uint _longTimeLock, uint _shortTimeLock) {
+ version = 1;
+ proxy = Proxy(proxyAddress);
+ userKey = _userKey;
+ shortTimeLock = _shortTimeLock;
+ longTimeLock = _longTimeLock;
+ recoveryKey = msg.sender;
+ }
+
+ 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 < now && 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 < now && 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 < now && 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;
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage/lcov-report/originalContracts/RecoveryQuorum.sol.html b/coverage/lcov-report/originalContracts/RecoveryQuorum.sol.html
new file mode 100644
index 0000000..fc36ebe
--- /dev/null
+++ b/coverage/lcov-report/originalContracts/RecoveryQuorum.sol.html
@@ -0,0 +1,407 @@
+
+
+
+ Code coverage report for originalContracts/RecoveryQuorum.sol
+
+
+
+
+
+
+
+
+
+
+
+
+ 100%
+ Statements
+ 44/44
+
+
+ 95%
+ Branches
+ 19/20
+
+
+ 100%
+ Functions
+ 15/15
+
+
+ 100%
+ Lines
+ 43/43
+
+
+
+
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+10×
+10×
+40×
+40×
+
+
+
+50×
+48×
+48×
+48×
+
+
+
+52×
+6×
+6×
+
+45×
+14×
+
+45×
+
+
+
+
+
+16×
+11×
+
+16×
+16×
+45×
+
+16×
+
+
+71×
+638×
+82×
+
+
+
+
+
+
+
+
+52×
+554×
+
+52×
+
+
+45×
+39×
+39×
+
+
+
+11×
+
+11×
+4×
+
+7×
+
+
+
+
+
+16×
+16×
+66×
+10×
+10×
+10×
+10×
+
+
+
+
+1287×
+
+
+
+
+
+1192×
+
+
+638×
+
+
+ pragma solidity ^0.4.4;
+import "./RecoverableController.sol";
+import "./Lib1.sol";
+
+contract RecoveryQuorum {
+ RecoverableController public controller;
+
+ address[] public delegateAddresses; // needed for iteration of mapping
+ mapping (address => Delegate) public delegates;
+ struct Delegate{
+ uint deletedAfter; // delegate exists if not 0
+ uint pendingUntil;
+ address proposedUserKey;
+ }
+
+ event RecoveryEvent(string action, address initiatedBy);
+
+ modifier onlyUserKey(){ if (msg.sender == controller.userKey()) _; }
+
+ function RecoveryQuorum(address _controller, address[] _delegates){
+ controller = RecoverableController(_controller);
+ for(uint i = 0; i < _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) >= neededSignatures()){
+ controller.changeUserKeyFromRecovery(newUserKey);
+ for(uint i = 0 ; i < delegateAddresses.length ; i++){
+ //remove any pending delegates after a recovery
+ if(delegates[delegateAddresses[i]].pendingUntil > now){
+ delegates[delegateAddresses[i]].deletedAfter = now;
+ }
+ delete delegates[delegateAddresses[i]].proposedUserKey;
+ }
+ }
+ }
+
+ function replaceDelegates(address[] delegatesToRemove, address[] delegatesToAdd) onlyUserKey{
+ for(uint i = 0 ; i < delegatesToRemove.length ; i++){
+ removeDelegate(delegatesToRemove[i]);
+ }
+ garbageCollect();
+ for(uint j = 0 ; j < delegatesToAdd.length ; j++){
+ addDelegate(delegatesToAdd[j]);
+ }
+ RecoveryEvent("replaceDelegates", msg.sender);
+ }
+ function collectedSignatures(address _proposedUserKey) returns (uint signatures){
+ for(uint i = 0 ; i < delegateAddresses.length ; i++){
+ if (delegateHasValidSignature(delegates[delegateAddresses[i]]) && delegates[delegateAddresses[i]].proposedUserKey == _proposedUserKey){
+ signatures++;
+ }
+ }
+ }
+
+ function getAddresses() constant returns (address[]){ return delegateAddresses; }
+
+ function neededSignatures() returns (uint){
+ uint currentDelegateCount; //always 0 at this point
+ for(uint i = 0 ; i < delegateAddresses.length ; i++){
+ if(delegateIsCurrent(delegates[delegateAddresses[i]])){ currentDelegateCount++; }
+ }
+ return currentDelegateCount/2 + 1;
+ }
+ function addDelegate(address delegate) private {
+ if(!delegateRecordExists(delegates[delegate]) && delegateAddresses.length < 15) {
+ delegates[delegate] = Delegate({proposedUserKey: 0x0, pendingUntil: now + controller.longTimeLock(), deletedAfter: 31536000000000});
+ delegateAddresses.push(delegate);
+ }
+ }
+ function removeDelegate(address delegate) private {
+ E if(delegates[delegate].deletedAfter > controller.longTimeLock() + now){
+ //remove right away if they are still pending
+ if(delegates[delegate].pendingUntil > now){
+ delegates[delegate].deletedAfter = now;
+ } else{
+ delegates[delegate].deletedAfter = controller.longTimeLock() + now;
+ }
+ }
+ }
+
+ function garbageCollect() private{
+ uint i = 0;
+ while(i < 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 <= now; //doesnt check record existence
+ }
+ function delegateIsCurrent(Delegate d) private returns (bool){
+ return delegateRecordExists(d) && !delegateIsDeleted(d) && now > d.pendingUntil;
+ }
+ function delegateHasValidSignature(Delegate d) private returns (bool){
+ return delegateIsCurrent(d) && d.proposedUserKey != 0x0;
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage/lcov-report/originalContracts/TestRegistry.sol.html b/coverage/lcov-report/originalContracts/TestRegistry.sol.html
new file mode 100644
index 0000000..a22b96f
--- /dev/null
+++ b/coverage/lcov-report/originalContracts/TestRegistry.sol.html
@@ -0,0 +1,107 @@
+
+
+
+ Code coverage report for originalContracts/TestRegistry.sol
+
+
+
+
+
+
+
+
+
+
+
+
+ 100%
+ Statements
+ 2/2
+
+
+ 100%
+ Branches
+ 0/0
+
+
+ 100%
+ Functions
+ 2/2
+
+
+ 100%
+ Lines
+ 2/2
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+
+
+
+
+
+6×
+
+
+
+1×
+
+
+
+ pragma solidity ^0.4.4;
+contract TestRegistry {
+
+ mapping(address => uint) public registry;
+
+ function register(uint x) {
+ registry[msg.sender] = x;
+ }
+
+ function testThrow() {
+ throw;
+ }
+
+}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage/lcov-report/originalContracts/index.html b/coverage/lcov-report/originalContracts/index.html
new file mode 100644
index 0000000..7c13996
--- /dev/null
+++ b/coverage/lcov-report/originalContracts/index.html
@@ -0,0 +1,197 @@
+
+
+
+ Code coverage report for originalContracts/
+
+
+
+
+
+
+
+
+
+
+ all files originalContracts/
+
+
+
+ 80.33%
+ Statements
+ 98/122
+
+
+ 71.74%
+ Branches
+ 33/46
+
+
+ 74.51%
+ Functions
+ 38/51
+
+
+ 84.21%
+ Lines
+ 96/114
+
+
+
+
+
+
+
+
+ File
+
+ Statements
+
+ Branches
+
+ Functions
+
+ Lines
+
+
+
+
+ IdentityFactory.sol
+
+ 100%
+ 7/7
+ 100%
+ 0/0
+ 100%
+ 1/1
+ 100%
+ 7/7
+
+
+
+ IdentityFactoryWithRecoveryKey.sol
+
+ 100%
+ 6/6
+ 100%
+ 0/0
+ 100%
+ 1/1
+ 100%
+ 6/6
+
+
+
+ Lib1.sol
+
+ 42.86%
+ 3/7
+ 0%
+ 0/2
+ 50%
+ 1/2
+ 57.14%
+ 4/7
+
+
+
+ MetaTxController.sol
+
+ 0%
+ 0/14
+ 0%
+ 0/4
+ 0%
+ 0/6
+ 0%
+ 0/13
+
+
+
+ Owned.sol
+
+ 0%
+ 0/5
+ 0%
+ 0/4
+ 0%
+ 0/5
+ 0%
+ 0/2
+
+
+
+ Proxy.sol
+
+ 88.89%
+ 8/9
+ 66.67%
+ 4/6
+ 85.71%
+ 6/7
+ 100%
+ 6/6
+
+
+
+ RecoverableController.sol
+
+ 100%
+ 28/28
+ 100%
+ 10/10
+ 100%
+ 12/12
+ 100%
+ 28/28
+
+
+
+ RecoveryQuorum.sol
+
+ 100%
+ 44/44
+ 95%
+ 19/20
+ 100%
+ 15/15
+ 100%
+ 43/43
+
+
+
+ TestRegistry.sol
+
+ 100%
+ 2/2
+ 100%
+ 0/0
+ 100%
+ 2/2
+ 100%
+ 2/2
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage/lcov-report/prettify.css b/coverage/lcov-report/prettify.css
new file mode 100644
index 0000000..b317a7c
--- /dev/null
+++ b/coverage/lcov-report/prettify.css
@@ -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}
diff --git a/coverage/lcov-report/prettify.js b/coverage/lcov-report/prettify.js
new file mode 100644
index 0000000..ef51e03
--- /dev/null
+++ b/coverage/lcov-report/prettify.js
@@ -0,0 +1 @@
+window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^