index.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>Contract Reactor (for Ethereum)</title>
  8. <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
  9. <script src="bower_components/jquery/dist/jquery.min.js"></script>
  10. <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
  11. <script src="bower_components/bignumber.js/bignumber.min.js"></script>
  12. <script src="bower_components/web3/dist/web3.js"></script><!--debugging-->
  13. <script src="bower_components/react/react.js"></script><!--debugging-->
  14. <script src="bower_components/react/JSXTransformer.js"></script>
  15. <script>
  16. if (typeof web3 === "undefined") {
  17. web3 = require('web3');
  18. window.web3 = web3;
  19. }
  20. //connect to either aleth/mist depending what is online. Prefer Mist as is supposed to be more usable one into the future.
  21. //this looks ugly. There must be better convention.
  22. try {
  23. web3.setProvider(new web3.providers.HttpProvider('http://127.0.0.1:8536')); //mist port
  24. console.log(web3.eth.blockNumber);
  25. console.log("Connected to Mist/Ethereum on port 8545");
  26. } catch(err) {
  27. console.log("Mist's RPC port is not online, or the port has changed.");
  28. try {
  29. web3.setProvider(new web3.providers.HttpProvider('http://127.0.0.1:8080')); //cpp-port
  30. console.log(web3.eth.blockNumber);
  31. console.log("Connected to Aleth/cpp-eth on port 8080");
  32. } catch(err) {
  33. console.log("AlethZero's RPC port is not online, or the port has changed.");
  34. }
  35. }
  36. </script>
  37. </head>
  38. <body>
  39. <div class="container">
  40. <div id="top">
  41. </div>
  42. <div id="contracts">
  43. </div>
  44. </div>
  45. <!-- Development Purposes. AlethZero is caching very aggressively -->
  46. <!-- Run web root where reactor.jsx is. -->
  47. <script>document.write('<script type="text/jsx" src="js/Header.jsx?dev=' + Math.floor(Math.random() * 1000) + '"\><\/script>');</script>
  48. <script>document.write('<script type="text/jsx" src="js/InputWrapper.jsx?dev=' + Math.floor(Math.random() * 1000) + '"\><\/script>');</script>
  49. <script>document.write('<script type="text/jsx" src="js/FunctionWrapper.jsx?dev=' + Math.floor(Math.random() * 1000) + '"\><\/script>');</script>
  50. <script>document.write('<script type="text/jsx" src="js/DeployWrapper.jsx?dev=' + Math.floor(Math.random() * 1000) + '"\><\/script>');</script>
  51. <script>document.write('<script type="text/jsx" src="js/ContractWrapper.jsx?dev=' + Math.floor(Math.random() * 1000) + '"\><\/script>');</script>
  52. <script>document.write('<script type="text/jsx" src="js/reactor.jsx?dev=' + Math.floor(Math.random() * 1000) + '"\><\/script>');</script>
  53. <script>document.write('<script type="text/jsx" src="js/script.jsx?dev=' + Math.floor(Math.random() * 1000) + '"\><\/script>');</script>
  54. </body>
  55. </html>