├── LICENSE ├── README.md ├── StackExchangeBounty.sol └── web-ui ├── LICENSE ├── appveyor.yml ├── contracts ├── Migrations.sol ├── StackExchangeBounty.sol └── usingOraclize.sol ├── dist ├── dev │ ├── app │ │ ├── +home │ │ │ ├── home.component.css │ │ │ ├── home.component.html │ │ │ ├── home.component.js │ │ │ ├── home.module.js │ │ │ ├── home.routes.js │ │ │ └── index.js │ │ ├── +question │ │ │ ├── index.js │ │ │ ├── question.component.css │ │ │ ├── question.component.html │ │ │ ├── question.component.js │ │ │ ├── question.module.js │ │ │ └── question.routes.js │ │ ├── app.component.html │ │ ├── app.component.js │ │ ├── app.module.js │ │ ├── app.routes.js │ │ ├── hot_loader_main.js │ │ ├── main.js │ │ └── shared │ │ │ ├── config │ │ │ └── env.config.js │ │ │ ├── constants │ │ │ ├── index.js │ │ │ └── tutorial.js │ │ │ ├── index.js │ │ │ ├── mathjax │ │ │ ├── index.js │ │ │ └── mathjax.directive.js │ │ │ ├── navbar │ │ │ ├── index.js │ │ │ ├── navbar.component.css │ │ │ ├── navbar.component.html │ │ │ └── navbar.component.js │ │ │ ├── question │ │ │ ├── index.js │ │ │ └── question.js │ │ │ ├── questions │ │ │ ├── index.js │ │ │ └── questions.service.js │ │ │ ├── shared.module.js │ │ │ └── web3 │ │ │ ├── index.js │ │ │ └── web3.service.js │ ├── assets │ │ ├── data.json │ │ └── svg │ │ │ └── more.svg │ ├── css │ │ └── main.css │ ├── index.html │ ├── js │ │ ├── web3.js │ │ └── web3.min.js │ ├── testing │ │ └── router │ │ │ ├── mock-location-strategy.js │ │ │ └── router-testing-providers.js │ └── tsconfig.json ├── prod │ ├── assets │ │ ├── data.json │ │ └── svg │ │ │ └── more.svg │ ├── css │ │ └── main.css │ ├── index.html │ ├── js │ │ ├── app.js │ │ ├── shims.js │ │ ├── web3.js │ │ └── web3.min.js │ └── tsconfig.json └── tmp │ ├── app │ ├── +home │ │ ├── home.component.css │ │ ├── home.component.html │ │ ├── home.component.js │ │ ├── home.component.ts │ │ ├── home.module.js │ │ ├── home.module.ts │ │ ├── home.routes.js │ │ ├── home.routes.ts │ │ ├── index.js │ │ └── index.ts │ ├── +question │ │ ├── index.js │ │ ├── index.ts │ │ ├── question.component.css │ │ ├── question.component.html │ │ ├── question.component.js │ │ ├── question.component.ts │ │ ├── question.module.js │ │ ├── question.module.ts │ │ ├── question.routes.js │ │ └── question.routes.ts │ ├── app.component.html │ ├── app.component.js │ ├── app.component.ts │ ├── app.module.js │ ├── app.module.ts │ ├── app.routes.js │ ├── app.routes.ts │ ├── hot_loader_main.js │ ├── hot_loader_main.ts │ ├── main.js │ ├── main.ts │ └── shared │ │ ├── config │ │ ├── env.config.js │ │ └── env.config.ts │ │ ├── constants │ │ ├── index.js │ │ ├── index.ts │ │ ├── tutorial.js │ │ └── tutorial.ts │ │ ├── index.js │ │ ├── index.ts │ │ ├── mathjax │ │ ├── index.js │ │ ├── index.ts │ │ ├── mathjax.directive.js │ │ └── mathjax.directive.ts │ │ ├── navbar │ │ ├── index.js │ │ ├── index.ts │ │ ├── navbar.component.css │ │ ├── navbar.component.html │ │ ├── navbar.component.js │ │ └── navbar.component.ts │ │ ├── question │ │ ├── index.js │ │ ├── index.ts │ │ ├── question.js │ │ └── question.ts │ │ ├── questions │ │ ├── index.js │ │ ├── index.ts │ │ ├── questions.service.js │ │ └── questions.service.ts │ │ ├── shared.module.js │ │ ├── shared.module.ts │ │ └── web3 │ │ ├── index.js │ │ ├── index.ts │ │ ├── web3.service.js │ │ └── web3.service.ts │ ├── css │ └── main.css │ ├── index.html │ ├── testing │ └── router │ │ ├── mock-location-strategy.js │ │ ├── mock-location-strategy.ts │ │ ├── router-testing-providers.js │ │ └── router-testing-providers.ts │ └── typings.d.ts ├── gulpfile.ts ├── karma.conf.js ├── migrations ├── 1_initial_migration.js └── 2_deploy_contracts.js ├── package.json ├── protractor.conf.js ├── src └── client │ ├── .node-xmlhttprequest-sync-16636 │ ├── app │ ├── +home │ │ ├── home.component.css │ │ ├── home.component.html │ │ ├── home.component.ts │ │ ├── home.module.ts │ │ ├── home.routes.ts │ │ └── index.ts │ ├── +question │ │ ├── index.ts │ │ ├── question.component.css │ │ ├── question.component.html │ │ ├── question.component.ts │ │ ├── question.module.ts │ │ └── question.routes.ts │ ├── app.component.e2e-spec.ts │ ├── app.component.html │ ├── app.component.spec.ts │ ├── app.component.ts │ ├── app.module.ts │ ├── app.routes.ts │ ├── hot_loader_main.ts │ ├── main.ts │ └── shared │ │ ├── config │ │ └── env.config.ts │ │ ├── constants │ │ ├── index.ts │ │ └── tutorial.ts │ │ ├── index.ts │ │ ├── mathjax │ │ ├── index.ts │ │ └── mathjax.directive.ts │ │ ├── navbar │ │ ├── index.ts │ │ ├── navbar.component.css │ │ ├── navbar.component.html │ │ └── navbar.component.ts │ │ ├── question │ │ ├── index.ts │ │ └── question.ts │ │ ├── questions │ │ ├── index.ts │ │ └── questions.service.ts │ │ ├── shared.module.ts │ │ └── web3 │ │ ├── index.ts │ │ └── web3.service.ts │ ├── assets │ ├── data.json │ └── svg │ │ └── more.svg │ ├── css │ └── main.css │ ├── index.html │ ├── js │ ├── web3.js │ └── web3.min.js │ ├── testing │ └── router │ │ ├── mock-location-strategy.ts │ │ └── router-testing-providers.ts │ ├── tsconfig.json │ └── typings.d.ts ├── test-main.js ├── test └── stackexchangebounty.js ├── tools ├── .gitignore ├── README.md ├── config.ts ├── config │ ├── project.config.ts │ ├── seed.config.interfaces.ts │ └── seed.config.ts ├── debug.ts ├── env │ ├── base.ts │ ├── dev.ts │ ├── env-config.interface.ts │ └── prod.ts ├── manual_typings │ ├── project │ │ └── sample.package.d.ts │ └── seed │ │ ├── angular2-hot-loader.d.ts │ │ ├── autoprefixer.d.ts │ │ ├── colorguard.d.ts │ │ ├── connect-livereload.d.ts │ │ ├── cssnano.d.ts │ │ ├── doiuse.d.ts │ │ ├── express-history-api-fallback.d.ts │ │ ├── istream.d.ts │ │ ├── karma.d.ts │ │ ├── merge-stream.d.ts │ │ ├── open.d.ts │ │ ├── postcss-reporter.d.ts │ │ ├── slash.d.ts │ │ ├── stylelint.d.ts │ │ ├── systemjs-builder.d.ts │ │ ├── tildify.d.ts │ │ ├── tiny-lr.d.ts │ │ └── walk.d.ts ├── tasks │ ├── project │ │ └── sample.task.ts │ └── seed │ │ ├── build.assets.dev.ts │ │ ├── build.assets.prod.ts │ │ ├── build.bundles.app.ts │ │ ├── build.bundles.ts │ │ ├── build.docs.ts │ │ ├── build.html_css.ts │ │ ├── build.index.dev.ts │ │ ├── build.index.prod.ts │ │ ├── build.js.dev.ts │ │ ├── build.js.e2e.ts │ │ ├── build.js.prod.ts │ │ ├── build.js.test.ts │ │ ├── build.js.tools.ts │ │ ├── check.versions.ts │ │ ├── clean.all.ts │ │ ├── clean.coverage.ts │ │ ├── clean.dev.ts │ │ ├── clean.prod.ts │ │ ├── clean.tools.ts │ │ ├── copy.js.prod.ts │ │ ├── css-lint.ts │ │ ├── e2e.ts │ │ ├── generate.manifest.ts │ │ ├── karma.run.ts │ │ ├── karma.watch.ts │ │ ├── serve.coverage.ts │ │ ├── serve.docs.ts │ │ ├── server.prod.ts │ │ ├── server.start.ts │ │ ├── tslint.ts │ │ ├── watch.dev.ts │ │ ├── watch.e2e.ts │ │ ├── watch.test.ts │ │ └── webdriver.ts ├── utils.ts └── utils │ ├── project.utils.ts │ ├── project │ └── sample_util.ts │ ├── seed.utils.ts │ └── seed │ ├── clean.ts │ ├── code_change_tools.ts │ ├── karma.start.ts │ ├── server.ts │ ├── tasks_tools.ts │ ├── template_locals.ts │ ├── tsproject.ts │ └── watch.ts ├── truffle.js ├── tsconfig.json ├── tslint.json ├── typings.json └── typings ├── globals ├── Q │ ├── index.d.ts │ └── typings.json ├── angular-protractor │ ├── index.d.ts │ └── typings.json ├── async │ ├── index.d.ts │ └── typings.json ├── browser-sync │ ├── index.d.ts │ └── typings.json ├── chalk │ ├── index.d.ts │ └── typings.json ├── chokidar │ ├── index.d.ts │ └── typings.json ├── core-js │ ├── index.d.ts │ └── typings.json ├── express │ ├── index.d.ts │ └── typings.json ├── glob │ ├── index.d.ts │ └── typings.json ├── gulp-load-plugins │ ├── index.d.ts │ └── typings.json ├── gulp-protractor │ ├── index.d.ts │ └── typings.json ├── gulp-sass │ ├── index.d.ts │ └── typings.json ├── gulp-shell │ ├── index.d.ts │ └── typings.json ├── gulp-util │ ├── index.d.ts │ └── typings.json ├── gulp │ ├── index.d.ts │ └── typings.json ├── jasmine │ ├── index.d.ts │ └── typings.json ├── micromatch │ ├── index.d.ts │ └── typings.json ├── mime │ ├── index.d.ts │ └── typings.json ├── minimatch │ ├── index.d.ts │ └── typings.json ├── ng2 │ ├── index.d.ts │ └── typings.json ├── node │ ├── index.d.ts │ └── typings.json ├── orchestrator │ ├── index.d.ts │ └── typings.json ├── parse-glob │ ├── index.d.ts │ └── typings.json ├── rimraf │ ├── index.d.ts │ └── typings.json ├── run-sequence │ ├── index.d.ts │ └── typings.json ├── selenium-webdriver │ ├── index.d.ts │ └── typings.json ├── serve-static │ ├── index.d.ts │ └── typings.json ├── systemjs │ ├── index.d.ts │ └── typings.json ├── through2 │ ├── index.d.ts │ └── typings.json ├── vinyl-source-stream │ ├── index.d.ts │ └── typings.json ├── vinyl │ ├── index.d.ts │ └── typings.json ├── yargs │ ├── index.d.ts │ └── typings.json └── zone.js │ ├── index.d.ts │ └── typings.json ├── index.d.ts └── modules └── xhr2 ├── index.d.ts └── typings.json /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2016 Oraclize 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## StackExchange Bounty ÐApp 2 | 3 | The StackExchange ÐApp is composed of an Angular 2 (CSS/HTML/TypeScript) front-end and the StackExchangeBounty.sol, an Ethereum smart contract written in solidity. 4 | 5 | The StackExchange Bounty ÐApp enables users to set bounties on StackExchange 6 | questions. Oraclize will then query StackExchange API sonce a day and update the contract data. When the question creator selects an answer as correct, the contract will pay the bounty to the owner of the selected answer (called *winner* in the contract code). 7 | 8 | The bounty can be send only if the *winner* has an Ethereum address in the location field of his StackExchange subsite profile. If no address is found, Oraclize will keep 9 | querying for an address once a day until the question's expiration date. After that date, 10 | if there is no selected answer nor a destination address, the bounty or bounties will be returned to their respective owners. 11 | -------------------------------------------------------------------------------- /web-ui/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Minko Gechev, Oraclize 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /web-ui/appveyor.yml: -------------------------------------------------------------------------------- 1 | # AppVeyor file 2 | # http://www.appveyor.com/docs/appveyor-yml 3 | # This file: cloned from https://github.com/gruntjs/grunt/blob/master/appveyor.yml 4 | 5 | # Build version format 6 | version: "{build}" 7 | 8 | # Test against this version of Node.js 9 | environment: 10 | nodejs_version: "Stable" 11 | # https://github.com/DefinitelyTyped/tsd#tsdrc 12 | # Token has no scope (read-only access to public information) 13 | TSD_GITHUB_TOKEN: "9b18c72997769f3867ef2ec470e626d39661795d" 14 | 15 | build: off 16 | 17 | clone_depth: 10 18 | 19 | # Fix line endings on Windows 20 | init: 21 | - git config --global core.autocrlf true 22 | 23 | install: 24 | - ps: Install-Product node $env:nodejs_version 25 | - npm install -g npm 26 | - ps: $env:path = $env:appdata + "\npm;" + $env:path 27 | - npm install && npm install karma-ie-launcher 28 | 29 | test_script: 30 | # Output useful info for debugging. 31 | - node --version && npm --version 32 | # We test multiple Windows shells because of prior stdout buffering issues 33 | # filed against Grunt. https://github.com/joyent/node/issues/3584 34 | - ps: "npm --version # PowerShell" # Pass comment to PS for easier debugging 35 | - npm run tests.all 36 | 37 | notifications: 38 | - provider: Webhook 39 | url: https://webhooks.gitter.im/e/cfd8ce5ddee6f3a0b0c9 40 | on_build_success: false 41 | on_build_failure: true 42 | on_build_status_changed: true 43 | 44 | cache: node_modules 45 | -------------------------------------------------------------------------------- /web-ui/contracts/Migrations.sol: -------------------------------------------------------------------------------- 1 | contract Migrations { 2 | address public owner; 3 | uint public last_completed_migration; 4 | 5 | modifier restricted() { 6 | if (msg.sender == owner) _ 7 | } 8 | 9 | function Migrations() { 10 | owner = msg.sender; 11 | } 12 | 13 | function setCompleted(uint completed) restricted { 14 | last_completed_migration = completed; 15 | } 16 | 17 | function upgrade(address new_address) restricted { 18 | Migrations upgraded = Migrations(new_address); 19 | upgraded.setCompleted(last_completed_migration); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /web-ui/dist/dev/app/+home/home.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | padding: 16px 0px; 4 | } 5 | 6 | @media (max-width: 767px) { 7 | .container-fluid { 8 | padding: 0; 9 | } 10 | } 11 | 12 | .dim { 13 | opacity: 0.5; 14 | pointer-events: none; 15 | } 16 | 17 | .question-panel { 18 | padding: 10px; 19 | position: relative; 20 | display: -webkit-flex; 21 | display: -ms-flexbox; 22 | display: flex; 23 | min-height: 120px; 24 | } 25 | 26 | .question-panel:hover { 27 | background: rgba(0,0,0,0.1); 28 | } 29 | 30 | .question-info { 31 | margin-left: 10px; 32 | margin-top: 5px; 33 | width: 75%; 34 | } 35 | 36 | .question-title { 37 | font-size: 20px; 38 | padding-right: 5px; 39 | display: block; 40 | } 41 | 42 | .question-owner { 43 | display: inline-block; 44 | font-size: 14px; 45 | margin-left: 10px; 46 | } 47 | 48 | .site-image { 49 | display: inline-block; 50 | width: 50px; 51 | font-size: 10px; 52 | margin-right: 15px; 53 | text-align: center; 54 | } 55 | 56 | .site-image > img { 57 | margin-top: 15px; 58 | width: 32px; 59 | } 60 | 61 | #sidebar { 62 | display: block; 63 | } 64 | 65 | @media (min-width: 768px) { 66 | #sidebar { 67 | position: fixed; 68 | right: 16px; 69 | } 70 | } 71 | 72 | #wrapper { 73 | padding: 20px; 74 | } 75 | 76 | .sidebar-info { 77 | padding: 20px; 78 | overflow-x: auto; 79 | } 80 | 81 | .sidebar-info > span { 82 | font-size: 14px; 83 | } 84 | 85 | #tutorial { 86 | position: fixed; 87 | z-index: 99999; 88 | opacity: 1; 89 | left: 50%; 90 | top: 25%; 91 | -webkit-transform: translate(-50%, 0); 92 | transform: translate(-50%, 0); 93 | } -------------------------------------------------------------------------------- /web-ui/dist/dev/app/+home/home.routes.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var index_1 = require('./index'); 3 | exports.HomeRoutes = [ 4 | { 5 | path: '', 6 | component: index_1.HomeComponent 7 | } 8 | ]; 9 | 10 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC8raG9tZS9ob21lLnJvdXRlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0Esc0JBQThCLFNBQVMsQ0FBQyxDQUFBO0FBRTNCLGtCQUFVLEdBQVk7SUFDL0I7UUFDSSxJQUFJLEVBQUUsRUFBRTtRQUNSLFNBQVMsRUFBRSxxQkFBYTtLQUMzQjtDQUNKLENBQUMiLCJmaWxlIjoiYXBwLytob21lL2hvbWUucm91dGVzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgUm91dGUgfSBmcm9tICdAYW5ndWxhci9yb3V0ZXInO1xuaW1wb3J0IHsgSG9tZUNvbXBvbmVudCB9IGZyb20gJy4vaW5kZXgnO1xuXG5leHBvcnQgY29uc3QgSG9tZVJvdXRlczogUm91dGVbXSA9IFtcbiAgICB7XG4gICAgICAgIHBhdGg6ICcnLFxuICAgICAgICBjb21wb25lbnQ6IEhvbWVDb21wb25lbnRcbiAgICB9XG5dO1xuIl19 11 | -------------------------------------------------------------------------------- /web-ui/dist/dev/app/+home/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function __export(m) { 3 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; 4 | } 5 | __export(require('./home.component')); 6 | __export(require('./home.routes')); 7 | 8 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC8raG9tZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBR0EsaUJBQWMsa0JBQWtCLENBQUMsRUFBQTtBQUNqQyxpQkFBYyxlQUFlLENBQUMsRUFBQSIsImZpbGUiOiJhcHAvK2hvbWUvaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIFRoaXMgYmFycmVsIGZpbGUgcHJvdmlkZXMgdGhlIGV4cG9ydCBmb3IgdGhlIGxhenkgbG9hZGVkIEhvbWVDb21wb25lbnQuXG4gKi9cbmV4cG9ydCAqIGZyb20gJy4vaG9tZS5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9ob21lLnJvdXRlcyc7XG5cbiJdfQ== 9 | -------------------------------------------------------------------------------- /web-ui/dist/dev/app/+question/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function __export(m) { 3 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; 4 | } 5 | __export(require('./question.component')); 6 | __export(require('./question.routes')); 7 | 8 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC8rcXVlc3Rpb24vaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLGlCQUFjLHNCQUFzQixDQUFDLEVBQUE7QUFDckMsaUJBQWMsbUJBQW1CLENBQUMsRUFBQSIsImZpbGUiOiJhcHAvK3F1ZXN0aW9uL2luZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9xdWVzdGlvbi5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9xdWVzdGlvbi5yb3V0ZXMnO1xuIl19 9 | -------------------------------------------------------------------------------- /web-ui/dist/dev/app/+question/question.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | padding: 16px 0; 4 | } 5 | 6 | @media (max-width: 767px) { 7 | .container-fluid { 8 | padding: 0; 9 | } 10 | } 11 | 12 | #panel-site { 13 | font-size: 14px; 14 | } 15 | 16 | .button-sponsor { 17 | width: 100%; 18 | margin-bottom: 15px; 19 | } 20 | 21 | #answers { 22 | cursor: pointer; 23 | padding: 15px; 24 | text-align: center; 25 | } 26 | 27 | #answers:hover { 28 | background: rgba(0,0,0,0.1); 29 | } 30 | 31 | #owner { 32 | padding: 10px; 33 | } 34 | 35 | #owner > a { 36 | cursor: pointer; 37 | } 38 | 39 | #profile-image { 40 | width: 20px; 41 | } 42 | 43 | #sponsors { 44 | overflow: auto; 45 | } 46 | 47 | #contractAddrInput { 48 | display: inline-block; 49 | right: 0; 50 | left: 0; 51 | text-align: center; 52 | border-radius: 5px; 53 | -moz-border-radius:5px; 54 | border: 1px dashed #B5B5B5; 55 | background-color: #F5F5F5; 56 | } 57 | 58 | #addrModal .modal-body { 59 | text-align: center; 60 | } 61 | 62 | #question-body { 63 | overflow-x: auto; 64 | } -------------------------------------------------------------------------------- /web-ui/dist/dev/app/+question/question.routes.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var index_1 = require('./index'); 3 | exports.QuestionRoutes = [ 4 | { 5 | path: 'questions/:site/:id', 6 | component: index_1.QuestionComponent 7 | } 8 | ]; 9 | 10 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC8rcXVlc3Rpb24vcXVlc3Rpb24ucm91dGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFDQSxzQkFBa0MsU0FBUyxDQUFDLENBQUE7QUFFL0Isc0JBQWMsR0FBWTtJQUNyQztRQUNFLElBQUksRUFBRSxxQkFBcUI7UUFDM0IsU0FBUyxFQUFFLHlCQUFpQjtLQUM3QjtDQUNGLENBQUMiLCJmaWxlIjoiYXBwLytxdWVzdGlvbi9xdWVzdGlvbi5yb3V0ZXMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBSb3V0ZSB9IGZyb20gJ0Bhbmd1bGFyL3JvdXRlcic7XG5pbXBvcnQgeyBRdWVzdGlvbkNvbXBvbmVudCB9IGZyb20gJy4vaW5kZXgnO1xuXG5leHBvcnQgY29uc3QgUXVlc3Rpb25Sb3V0ZXM6IFJvdXRlW10gPSBbXG4gIHtcbiAgICBwYXRoOiAncXVlc3Rpb25zLzpzaXRlLzppZCcsXG4gICAgY29tcG9uZW50OiBRdWVzdGlvbkNvbXBvbmVudFxuICB9XG5dO1xuIl19 11 | -------------------------------------------------------------------------------- /web-ui/dist/dev/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /web-ui/dist/dev/app/app.routes.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var index_1 = require('./+home/index'); 3 | var index_2 = require('./+question/index'); 4 | exports.routes = index_1.HomeRoutes.concat(index_2.QuestionRoutes); 5 | 6 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9hcHAucm91dGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFFQSxzQkFBMkIsZUFBZSxDQUFDLENBQUE7QUFDM0Msc0JBQStCLG1CQUFtQixDQUFDLENBQUE7QUFFdEMsY0FBTSxHQUNkLGtCQUFVLFFBQ1Ysc0JBQWMsQ0FDbEIsQ0FBQyIsImZpbGUiOiJhcHAvYXBwLnJvdXRlcy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFJvdXRlcyB9IGZyb20gJ0Bhbmd1bGFyL3JvdXRlcic7XG5cbmltcG9ydCB7IEhvbWVSb3V0ZXMgfSBmcm9tICcuLytob21lL2luZGV4JztcbmltcG9ydCB7IFF1ZXN0aW9uUm91dGVzIH0gZnJvbSAnLi8rcXVlc3Rpb24vaW5kZXgnO1xuXG5leHBvcnQgY29uc3Qgcm91dGVzOiBSb3V0ZXMgPSBbXG4gIC4uLkhvbWVSb3V0ZXMsXG4gIC4uLlF1ZXN0aW9uUm91dGVzXG5dO1xuIl19 7 | -------------------------------------------------------------------------------- /web-ui/dist/dev/app/hot_loader_main.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJhcHAvaG90X2xvYWRlcl9tYWluLmpzIiwic291cmNlc0NvbnRlbnQiOltdfQ== 4 | -------------------------------------------------------------------------------- /web-ui/dist/dev/app/main.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var platform_browser_dynamic_1 = require('@angular/platform-browser-dynamic'); 3 | var app_module_1 = require('./app.module'); 4 | platform_browser_dynamic_1.platformBrowserDynamic().bootstrapModule(app_module_1.AppModule); 5 | 6 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9tYWluLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFNQSx5Q0FBdUMsbUNBQW1DLENBQUMsQ0FBQTtBQUczRSwyQkFBMEIsY0FBYyxDQUFDLENBQUE7QUFHekMsaURBQXNCLEVBQUUsQ0FBQyxlQUFlLENBQUMsc0JBQVMsQ0FBQyxDQUFDIiwiZmlsZSI6ImFwcC9tYWluLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBCb290c3RyYXBzIHRoZSBhcHBsaWNhdGlvbiBhbmQgbWFrZXMgdGhlIFJPVVRFUl9QUk9WSURFUlMgYW5kIHRoZSBBUFBfQkFTRV9IUkVGIGF2YWlsYWJsZSB0byBpdC5cbiAqIEBzZWUgaHR0cHM6Ly9hbmd1bGFyLmlvL2RvY3MvdHMvbGF0ZXN0L2FwaS9wbGF0Zm9ybS1icm93c2VyLWR5bmFtaWMvaW5kZXgvYm9vdHN0cmFwLWZ1bmN0aW9uLmh0bWxcbiAqL1xuXG4vLyBUaGUgYnJvd3NlciBwbGF0Zm9ybSB3aXRoIGEgY29tcGlsZXJcbmltcG9ydCB7IHBsYXRmb3JtQnJvd3NlckR5bmFtaWMgfSBmcm9tICdAYW5ndWxhci9wbGF0Zm9ybS1icm93c2VyLWR5bmFtaWMnO1xuXG4vLyBUaGUgYXBwIG1vZHVsZVxuaW1wb3J0IHsgQXBwTW9kdWxlIH0gZnJvbSAnLi9hcHAubW9kdWxlJztcblxuLy8gQ29tcGlsZSBhbmQgbGF1bmNoIHRoZSBtb2R1bGVcbnBsYXRmb3JtQnJvd3NlckR5bmFtaWMoKS5ib290c3RyYXBNb2R1bGUoQXBwTW9kdWxlKTtcblxuLy8gSW4gb3JkZXIgdG8gc3RhcnQgdGhlIFNlcnZpY2UgV29ya2VyIGxvY2F0ZWQgYXQgXCIuL3dvcmtlci5qc1wiXG4vLyB1bmNvbW1lbnQgdGhpcyBsaW5lLiBNb3JlIGFib3V0IFNlcnZpY2UgV29ya2VycyBoZXJlXG4vLyBodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZy9lbi1VUy9kb2NzL1dlYi9BUEkvU2VydmljZV9Xb3JrZXJfQVBJL1VzaW5nX1NlcnZpY2VfV29ya2Vyc1xuLy9cbi8vIGlmICgnc2VydmljZVdvcmtlcicgaW4gbmF2aWdhdG9yKSB7XG4vLyAgICg8YW55Pm5hdmlnYXRvcikuc2VydmljZVdvcmtlci5yZWdpc3RlcignLi93b3JrZXIuanMnKS50aGVuKChyZWdpc3RyYXRpb246IGFueSkgPT5cbi8vICAgICAgIGNvbnNvbGUubG9nKCdTZXJ2aWNlV29ya2VyIHJlZ2lzdHJhdGlvbiBzdWNjZXNzZnVsIHdpdGggc2NvcGU6ICcsIHJlZ2lzdHJhdGlvbi5zY29wZSkpXG4vLyAgICAgLmNhdGNoKChlcnI6IGFueSkgPT5cbi8vICAgICAgIGNvbnNvbGUubG9nKCdTZXJ2aWNlV29ya2VyIHJlZ2lzdHJhdGlvbiBmYWlsZWQ6ICcsIGVycikpO1xuLy8gfVxuIl19 7 | -------------------------------------------------------------------------------- /web-ui/dist/dev/app/shared/config/env.config.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | exports.Config = JSON.parse('{"API":"https://demo.com","ENV":"DEV"}'); 3 | 4 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9zaGFyZWQvY29uZmlnL2Vudi5jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQU9hLGNBQU0sR0FBYyxJQUFJLENBQUMsS0FBSyxDQUFDLG1CQUFtQixDQUFDLENBQUMiLCJmaWxlIjoiYXBwL3NoYXJlZC9jb25maWcvZW52LmNvbmZpZy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIEZlZWwgZnJlZSB0byBleHRlbmQgdGhpcyBpbnRlcmZhY2Vcbi8vIGRlcGVuZGluZyBvbiB5b3VyIGFwcCBzcGVjaWZpYyBjb25maWcuXG5leHBvcnQgaW50ZXJmYWNlIEVudkNvbmZpZyB7XG4gIEFQST86IHN0cmluZztcbiAgRU5WPzogc3RyaW5nO1xufVxuXG5leHBvcnQgY29uc3QgQ29uZmlnOiBFbnZDb25maWcgPSBKU09OLnBhcnNlKCc8JT0gRU5WX0NPTkZJRyAlPicpO1xuXG4iXX0= 5 | -------------------------------------------------------------------------------- /web-ui/dist/dev/app/shared/constants/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function __export(m) { 3 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; 4 | } 5 | __export(require('./tutorial')); 6 | 7 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9zaGFyZWQvY29uc3RhbnRzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxpQkFBYyxZQUFZLENBQUMsRUFBQSIsImZpbGUiOiJhcHAvc2hhcmVkL2NvbnN0YW50cy9pbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vdHV0b3JpYWwnO1xuIl19 8 | -------------------------------------------------------------------------------- /web-ui/dist/dev/app/shared/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function __export(m) { 3 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; 4 | } 5 | __export(require('./navbar/index')); 6 | __export(require('./config/env.config')); 7 | __export(require('./question/index')); 8 | __export(require('./questions/index')); 9 | __export(require('./web3/index')); 10 | __export(require('./mathjax/index')); 11 | __export(require('./constants/index')); 12 | 13 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9zaGFyZWQvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUdBLGlCQUFjLGdCQUFnQixDQUFDLEVBQUE7QUFDL0IsaUJBQWMscUJBQXFCLENBQUMsRUFBQTtBQUNwQyxpQkFBYyxrQkFBa0IsQ0FBQyxFQUFBO0FBQ2pDLGlCQUFjLG1CQUFtQixDQUFDLEVBQUE7QUFDbEMsaUJBQWMsY0FBYyxDQUFDLEVBQUE7QUFDN0IsaUJBQWMsaUJBQWlCLENBQUMsRUFBQTtBQUNoQyxpQkFBYyxtQkFBbUIsQ0FBQyxFQUFBIiwiZmlsZSI6ImFwcC9zaGFyZWQvaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIFRoaXMgYmFycmVsIGZpbGUgcHJvdmlkZXMgdGhlIGV4cG9ydHMgZm9yIHRoZSBzaGFyZWQgcmVzb3VyY2VzIChzZXJ2aWNlcywgY29tcG9uZW50cykuXG4gKi9cbmV4cG9ydCAqIGZyb20gJy4vbmF2YmFyL2luZGV4JztcbmV4cG9ydCAqIGZyb20gJy4vY29uZmlnL2Vudi5jb25maWcnO1xuZXhwb3J0ICogZnJvbSAnLi9xdWVzdGlvbi9pbmRleCc7XG5leHBvcnQgKiBmcm9tICcuL3F1ZXN0aW9ucy9pbmRleCc7XG5leHBvcnQgKiBmcm9tICcuL3dlYjMvaW5kZXgnO1xuZXhwb3J0ICogZnJvbSAnLi9tYXRoamF4L2luZGV4JztcbmV4cG9ydCAqIGZyb20gJy4vY29uc3RhbnRzL2luZGV4JztcbiJdfQ== 14 | -------------------------------------------------------------------------------- /web-ui/dist/dev/app/shared/mathjax/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function __export(m) { 3 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; 4 | } 5 | __export(require('./mathjax.directive')); 6 | 7 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9zaGFyZWQvbWF0aGpheC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsaUJBQWMscUJBQXFCLENBQUMsRUFBQSIsImZpbGUiOiJhcHAvc2hhcmVkL21hdGhqYXgvaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL21hdGhqYXguZGlyZWN0aXZlJztcbiJdfQ== 8 | -------------------------------------------------------------------------------- /web-ui/dist/dev/app/shared/navbar/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function __export(m) { 3 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; 4 | } 5 | __export(require('./navbar.component')); 6 | 7 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9zaGFyZWQvbmF2YmFyL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFHQSxpQkFBYyxvQkFBb0IsQ0FBQyxFQUFBIiwiZmlsZSI6ImFwcC9zaGFyZWQvbmF2YmFyL2luZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBUaGlzIGJhcnJlbCBmaWxlIHByb3ZpZGVzIHRoZSBleHBvcnQgZm9yIHRoZSBzaGFyZWQgTmF2YmFyQ29tcG9uZW50LlxuICovXG5leHBvcnQgKiBmcm9tICcuL25hdmJhci5jb21wb25lbnQnO1xuIl19 8 | -------------------------------------------------------------------------------- /web-ui/dist/dev/app/shared/navbar/navbar.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | padding: 0; 4 | border-color: #e1e1e1; 5 | border-style: solid; 6 | border-width: 0 0 1px; 7 | } 8 | 9 | .dim { 10 | opacity: 0.5; 11 | overflow-y: hidden; 12 | pointer-events: none; 13 | } 14 | 15 | #app-title { 16 | line-height: 48px; 17 | padding: 15px; 18 | display: inline-block; 19 | } 20 | 21 | #app-title > div { 22 | font-size: 25px; 23 | } 24 | 25 | #app-title > div:hover { 26 | background: rgba(0,0,0,0.3); 27 | } 28 | 29 | #app-title > p { 30 | margin-top: 5px; 31 | margin-bottom: 0; 32 | font-size: 13px; 33 | } 34 | 35 | #app-title a { 36 | float: none; 37 | color: #106cc8; 38 | margin: 0; 39 | } 40 | 41 | @media (max-width: 479px) { 42 | #app-title { 43 | text-align: center; 44 | display: block; 45 | width: 100%; 46 | } 47 | } 48 | 49 | @media (max-width: 767px) { 50 | .navbar-button { 51 | width: 100%; 52 | float: none !important; 53 | margin-bottom: 10px; 54 | } 55 | } 56 | 57 | .navbar-button { 58 | float: right; 59 | text-align: center; 60 | padding: 15px; 61 | margin-top: 10px; 62 | margin-right: 10px; 63 | box-shadow: 0 1px 4px rgba(0,0,0,0.3); 64 | } 65 | 66 | .navbar-button:hover { 67 | background: rgba(0,0,0,0.3); 68 | } 69 | 70 | #newQ:hover { 71 | background: rgba(192,216,144,0.3); 72 | } 73 | 74 | #settingsModal input { 75 | width: 100%; 76 | margin-bottom: 10px; 77 | } 78 | 79 | #settingsModal button { 80 | float: right; 81 | width: 30%; 82 | } 83 | 84 | .modal-body > div { 85 | margin-bottom: 20px; 86 | } 87 | 88 | .modal-body input { 89 | margin-bottom: 15px; 90 | } 91 | 92 | #submit-warning { 93 | text-align: center; 94 | } 95 | 96 | #question-status > div { 97 | padding: 10px; 98 | } 99 | 100 | #exrate { 101 | float: right; 102 | } -------------------------------------------------------------------------------- /web-ui/dist/dev/app/shared/question/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function __export(m) { 3 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; 4 | } 5 | __export(require('./question')); 6 | 7 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9zaGFyZWQvcXVlc3Rpb24vaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLGlCQUFjLFlBQVksQ0FBQyxFQUFBIiwiZmlsZSI6ImFwcC9zaGFyZWQvcXVlc3Rpb24vaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3F1ZXN0aW9uJztcbiJdfQ== 8 | -------------------------------------------------------------------------------- /web-ui/dist/dev/app/shared/questions/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function __export(m) { 3 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; 4 | } 5 | __export(require('./questions.service')); 6 | 7 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9zaGFyZWQvcXVlc3Rpb25zL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxpQkFBYyxxQkFBcUIsQ0FBQyxFQUFBIiwiZmlsZSI6ImFwcC9zaGFyZWQvcXVlc3Rpb25zL2luZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9xdWVzdGlvbnMuc2VydmljZSc7XG4iXX0= 8 | -------------------------------------------------------------------------------- /web-ui/dist/dev/app/shared/web3/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function __export(m) { 3 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; 4 | } 5 | __export(require('./web3.service')); 6 | 7 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9zaGFyZWQvd2ViMy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsaUJBQWMsZ0JBQWdCLENBQUMsRUFBQSIsImZpbGUiOiJhcHAvc2hhcmVkL3dlYjMvaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3dlYjMuc2VydmljZSc7XG4iXX0= 8 | -------------------------------------------------------------------------------- /web-ui/dist/dev/assets/data.json: -------------------------------------------------------------------------------- 1 | [ 2 | "Edsger Dijkstra", 3 | "Donald Knuth", 4 | "Alan Turing", 5 | "Grace Hopper" 6 | ] 7 | -------------------------------------------------------------------------------- /web-ui/dist/dev/assets/svg/more.svg: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /web-ui/dist/dev/css/main.css: -------------------------------------------------------------------------------- 1 | /* Reset */ 2 | html, 3 | body, 4 | div { 5 | border: 0; 6 | margin: 0; 7 | padding: 0; 8 | } 9 | 10 | /* Box-sizing border-box */ 11 | * { 12 | box-sizing: border-box; 13 | } 14 | 15 | /* Set up a default font and some padding to provide breathing room */ 16 | body { 17 | font-family: Roboto, "Helvetica Neue", sans-serif; 18 | font-size: 16px; 19 | -webkit-font-smoothing: antialiased; 20 | -moz-osx-font-smoothing: grayscale; 21 | } 22 | 23 | p { 24 | font-weight: 400; 25 | letter-spacing: 0.01em; 26 | line-height: 20px; 27 | margin-bottom: 1em; 28 | margin-top: 1em; 29 | } 30 | 31 | ul { 32 | margin: 10px 0 0; 33 | padding: 0 0 0 20px; 34 | } 35 | 36 | li { 37 | font-weight: 400; 38 | margin-top: 4px; 39 | } 40 | 41 | input { 42 | border: 1px solid #106cc8; 43 | font-size: 14px; 44 | height: 40px; 45 | outline: none; 46 | padding: 8px; 47 | } 48 | 49 | button { 50 | background-color: #106cc8; 51 | border-style: none; 52 | color: rgba(255, 255, 255, 0.87); 53 | cursor: pointer; 54 | display: inline-block; 55 | font-size: 14px; 56 | height: 40px; 57 | padding: 8px 18px; 58 | text-decoration: none; 59 | } 60 | 61 | button:hover { 62 | background-color: #28739e; 63 | } 64 | 65 | .clickme { 66 | cursor: pointer; 67 | } 68 | 69 | .noselect { 70 | -webkit-touch-callout: none; 71 | -webkit-user-select: none; 72 | -moz-user-select: none; 73 | -ms-user-select: none; 74 | user-select: none; 75 | } 76 | 77 | .noclick:hover { 78 | cursor: not-allowed !important; 79 | background: rgba(237,67,55,0.3) !important; 80 | } 81 | 82 | .horiz-center-container { 83 | width: 100%; 84 | text-align: center; 85 | } 86 | 87 | .background-ease-300 { 88 | transition: background 300ms ease; 89 | } 90 | 91 | .img-centered { 92 | display: block; 93 | margin-left: auto; 94 | margin-right: auto; 95 | } 96 | 97 | .danger { 98 | background: rgba(237,67,55,0.3); 99 | } 100 | 101 | .success { 102 | background: rgba(192,216,144,0.3); 103 | } 104 | 105 | .price-container .price-eth { 106 | display: none; 107 | } 108 | 109 | .price-container:hover .price-eth { 110 | display: inline-block; 111 | } 112 | 113 | .price-container:hover .price-usd { 114 | display: none; 115 | } -------------------------------------------------------------------------------- /web-ui/dist/dev/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "commonjs", 5 | "declaration": false, 6 | "removeComments": true, 7 | "noLib": false, 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "sourceMap": true, 11 | "pretty": true, 12 | "allowUnreachableCode": false, 13 | "allowUnusedLabels": false, 14 | "noImplicitAny": false, 15 | "noImplicitReturns": true, 16 | "noImplicitUseStrict": false, 17 | "noFallthroughCasesInSwitch": true 18 | }, 19 | "compileOnSave": false 20 | } 21 | -------------------------------------------------------------------------------- /web-ui/dist/prod/assets/data.json: -------------------------------------------------------------------------------- 1 | [ 2 | "Edsger Dijkstra", 3 | "Donald Knuth", 4 | "Alan Turing", 5 | "Grace Hopper" 6 | ] 7 | -------------------------------------------------------------------------------- /web-ui/dist/prod/assets/svg/more.svg: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /web-ui/dist/prod/css/main.css: -------------------------------------------------------------------------------- 1 | li,p{font-weight:400}.clickme,button{cursor:pointer}body,div,html{border:0;margin:0;padding:0}*{box-sizing:border-box}body{font-family:Roboto,"Helvetica Neue",sans-serif;font-size:16px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}button,input{font-size:14px;height:40px}p{letter-spacing:.01em;line-height:20px;margin-bottom:1em;margin-top:1em}ul{margin:10px 0 0;padding:0 0 0 20px}li{margin-top:4px}input{border:1px solid #106cc8;outline:0;padding:8px}button{background-color:#106cc8;border-style:none;color:rgba(255,255,255,.87);display:inline-block;padding:8px 18px;text-decoration:none}button:hover{background-color:#28739e}.noselect{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.noclick:hover{cursor:not-allowed!important;background:rgba(237,67,55,.3)!important}.horiz-center-container{width:100%;text-align:center}.background-ease-300{transition:background .3s ease}.img-centered{display:block;margin-left:auto;margin-right:auto}.danger{background:rgba(237,67,55,.3)}.success{background:rgba(192,216,144,.3)}.price-container .price-eth{display:none}.price-container:hover .price-eth{display:inline-block}.price-container:hover .price-usd{display:none} -------------------------------------------------------------------------------- /web-ui/dist/prod/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | STACKΞXCHANGE BOUNTIES 8 | 9 | 10 | 11 | 12 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | Loading... 28 | 29 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /web-ui/dist/prod/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "commonjs", 5 | "declaration": false, 6 | "removeComments": true, 7 | "noLib": false, 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "sourceMap": true, 11 | "pretty": true, 12 | "allowUnreachableCode": false, 13 | "allowUnusedLabels": false, 14 | "noImplicitAny": false, 15 | "noImplicitReturns": true, 16 | "noImplicitUseStrict": false, 17 | "noFallthroughCasesInSwitch": true 18 | }, 19 | "compileOnSave": false 20 | } 21 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/+home/home.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | padding: 16px 0px; 4 | } 5 | 6 | @media (max-width: 767px) { 7 | .container-fluid { 8 | padding: 0; 9 | } 10 | } 11 | 12 | .dim { 13 | opacity: 0.5; 14 | pointer-events: none; 15 | } 16 | 17 | .question-panel { 18 | padding: 10px; 19 | position: relative; 20 | display: -webkit-flex; 21 | display: -ms-flexbox; 22 | display: flex; 23 | min-height: 120px; 24 | } 25 | 26 | .question-panel:hover { 27 | background: rgba(0,0,0,0.1); 28 | } 29 | 30 | .question-info { 31 | margin-left: 10px; 32 | margin-top: 5px; 33 | width: 75%; 34 | } 35 | 36 | .question-title { 37 | font-size: 20px; 38 | padding-right: 5px; 39 | display: block; 40 | } 41 | 42 | .question-owner { 43 | display: inline-block; 44 | font-size: 14px; 45 | margin-left: 10px; 46 | } 47 | 48 | .site-image { 49 | display: inline-block; 50 | width: 50px; 51 | font-size: 10px; 52 | margin-right: 15px; 53 | text-align: center; 54 | } 55 | 56 | .site-image > img { 57 | margin-top: 15px; 58 | width: 32px; 59 | } 60 | 61 | #sidebar { 62 | display: block; 63 | } 64 | 65 | @media (min-width: 768px) { 66 | #sidebar { 67 | position: fixed; 68 | right: 16px; 69 | } 70 | } 71 | 72 | #wrapper { 73 | padding: 20px; 74 | } 75 | 76 | .sidebar-info { 77 | padding: 20px; 78 | overflow-x: auto; 79 | } 80 | 81 | .sidebar-info > span { 82 | font-size: 14px; 83 | } 84 | 85 | #tutorial { 86 | position: fixed; 87 | z-index: 99999; 88 | opacity: 1; 89 | left: 50%; 90 | top: 25%; 91 | -webkit-transform: translate(-50%, 0); 92 | transform: translate(-50%, 0); 93 | } -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/+home/home.module.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | var core_1 = require('@angular/core'); 12 | var common_1 = require('@angular/common'); 13 | var shared_module_1 = require('../shared/shared.module'); 14 | var home_component_1 = require('./home.component'); 15 | var HomeModule = (function () { 16 | function HomeModule() { 17 | } 18 | HomeModule = __decorate([ 19 | core_1.NgModule({ 20 | imports: [common_1.CommonModule, shared_module_1.SharedModule], 21 | declarations: [home_component_1.HomeComponent], 22 | exports: [home_component_1.HomeComponent], 23 | providers: [] 24 | }), 25 | __metadata('design:paramtypes', []) 26 | ], HomeModule); 27 | return HomeModule; 28 | }()); 29 | exports.HomeModule = HomeModule; 30 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/+home/home.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { SharedModule } from '../shared/shared.module'; 4 | import { HomeComponent } from './home.component'; 5 | 6 | @NgModule({ 7 | imports: [CommonModule, SharedModule], 8 | declarations: [HomeComponent], 9 | exports: [HomeComponent], 10 | providers: [] // services go here 11 | }) 12 | 13 | export class HomeModule { } 14 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/+home/home.routes.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var index_1 = require('./index'); 3 | exports.HomeRoutes = [ 4 | { 5 | path: '', 6 | component: index_1.HomeComponent 7 | } 8 | ]; 9 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/+home/home.routes.ts: -------------------------------------------------------------------------------- 1 | import { Route } from '@angular/router'; 2 | import { HomeComponent } from './index'; 3 | 4 | export const HomeRoutes: Route[] = [ 5 | { 6 | path: '', 7 | component: HomeComponent 8 | } 9 | ]; 10 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/+home/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function __export(m) { 3 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; 4 | } 5 | __export(require('./home.component')); 6 | __export(require('./home.routes')); 7 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/+home/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This barrel file provides the export for the lazy loaded HomeComponent. 3 | */ 4 | export * from './home.component'; 5 | export * from './home.routes'; 6 | 7 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/+question/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function __export(m) { 3 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; 4 | } 5 | __export(require('./question.component')); 6 | __export(require('./question.routes')); 7 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/+question/index.ts: -------------------------------------------------------------------------------- 1 | export * from './question.component'; 2 | export * from './question.routes'; 3 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/+question/question.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | padding: 16px 0; 4 | } 5 | 6 | @media (max-width: 767px) { 7 | .container-fluid { 8 | padding: 0; 9 | } 10 | } 11 | 12 | #panel-site { 13 | font-size: 14px; 14 | } 15 | 16 | .button-sponsor { 17 | width: 100%; 18 | margin-bottom: 15px; 19 | } 20 | 21 | #answers { 22 | cursor: pointer; 23 | padding: 15px; 24 | text-align: center; 25 | } 26 | 27 | #answers:hover { 28 | background: rgba(0,0,0,0.1); 29 | } 30 | 31 | #owner { 32 | padding: 10px; 33 | } 34 | 35 | #owner > a { 36 | cursor: pointer; 37 | } 38 | 39 | #profile-image { 40 | width: 20px; 41 | } 42 | 43 | #sponsors { 44 | overflow: auto; 45 | } 46 | 47 | #contractAddrInput { 48 | display: inline-block; 49 | right: 0; 50 | left: 0; 51 | text-align: center; 52 | border-radius: 5px; 53 | -moz-border-radius:5px; 54 | border: 1px dashed #B5B5B5; 55 | background-color: #F5F5F5; 56 | } 57 | 58 | #addrModal .modal-body { 59 | text-align: center; 60 | } 61 | 62 | #question-body { 63 | overflow-x: auto; 64 | } -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/+question/question.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core'; 2 | import { QuestionsService, Web3Service, Question, MathJaxDirective } from '../shared/index'; 3 | import { Subscription } from 'rxjs/Rx'; 4 | import { ActivatedRoute } from '@angular/router'; 5 | 6 | @Component({ 7 | moduleId: module.id, 8 | selector: 'sd-question', 9 | templateUrl: 'question.component.html', 10 | styleUrls: ['question.component.css'], 11 | directives: [MathJaxDirective] 12 | }) 13 | 14 | export class QuestionComponent implements OnInit, OnDestroy { 15 | private sub: Subscription; // Subscription to get the route params 16 | private question: Question; // Question object being displayed 17 | 18 | constructor(private route: ActivatedRoute, 19 | private questionsService: QuestionsService, 20 | private web3Service: Web3Service, 21 | private ref: ChangeDetectorRef) {} 22 | 23 | ngOnInit(): void { 24 | this.sub = this.route.params.subscribe(params => { // Get the right question 25 | let id = params['id']; 26 | let site = params['site']; 27 | this.question = this.questionsService.getQuestionFromCache(id, site); 28 | if (!this.question) { 29 | this.questionsService.getQuestionBySiteId(id, site).then((question) => { 30 | this.question = question; 31 | this.ref.detectChanges(); 32 | }); 33 | } 34 | }); 35 | } 36 | 37 | ngOnDestroy(): void { 38 | this.sub.unsubscribe(); 39 | } 40 | 41 | parseDate(unixDate: number): Date { 42 | let date; 43 | if (unixDate) { 44 | date = new Date(unixDate*1000).toLocaleString(); 45 | } 46 | return date; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/+question/question.module.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | var core_1 = require('@angular/core'); 12 | var common_1 = require('@angular/common'); 13 | var shared_module_1 = require('../shared/shared.module'); 14 | var question_component_1 = require('./question.component'); 15 | var QuestionModule = (function () { 16 | function QuestionModule() { 17 | } 18 | QuestionModule = __decorate([ 19 | core_1.NgModule({ 20 | imports: [common_1.CommonModule, shared_module_1.SharedModule], 21 | declarations: [question_component_1.QuestionComponent], 22 | exports: [question_component_1.QuestionComponent], 23 | providers: [] 24 | }), 25 | __metadata('design:paramtypes', []) 26 | ], QuestionModule); 27 | return QuestionModule; 28 | }()); 29 | exports.QuestionModule = QuestionModule; 30 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/+question/question.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { SharedModule } from '../shared/shared.module'; 4 | import { QuestionComponent } from './question.component'; 5 | 6 | @NgModule({ 7 | imports: [CommonModule, SharedModule], 8 | declarations: [QuestionComponent], 9 | exports: [QuestionComponent], 10 | providers: [] // services go here 11 | }) 12 | 13 | export class QuestionModule { } 14 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/+question/question.routes.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var index_1 = require('./index'); 3 | exports.QuestionRoutes = [ 4 | { 5 | path: 'questions/:site/:id', 6 | component: index_1.QuestionComponent 7 | } 8 | ]; 9 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/+question/question.routes.ts: -------------------------------------------------------------------------------- 1 | import { Route } from '@angular/router'; 2 | import { QuestionComponent } from './index'; 3 | 4 | export const QuestionRoutes: Route[] = [ 5 | { 6 | path: 'questions/:site/:id', 7 | component: QuestionComponent 8 | } 9 | ]; 10 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/app.component.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | var core_1 = require('@angular/core'); 12 | var router_1 = require('@angular/router'); 13 | var index_1 = require('./shared/index'); 14 | var AppComponent = (function () { 15 | function AppComponent() { 16 | console.log('Environment config', index_1.Config); 17 | } 18 | AppComponent = __decorate([ 19 | core_1.Component({ 20 | moduleId: module.id, 21 | selector: 'sd-app', 22 | template: " ", 23 | directives: [router_1.ROUTER_DIRECTIVES, index_1.NavbarComponent] 24 | }), 25 | __metadata('design:paramtypes', []) 26 | ], AppComponent); 27 | return AppComponent; 28 | }()); 29 | exports.AppComponent = AppComponent; 30 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { ROUTER_DIRECTIVES } from '@angular/router'; 3 | import { Config, NavbarComponent } from './shared/index'; 4 | 5 | /** 6 | * This class represents the main application component. Within the @Routes annotation is the configuration of the 7 | * applications routes, configuring the paths for the lazy loaded components (HomeComponent, AboutComponent). 8 | */ 9 | @Component({ 10 | moduleId: module.id, 11 | selector: 'sd-app', 12 | templateUrl: 'app.component.html', 13 | directives: [ROUTER_DIRECTIVES, NavbarComponent] 14 | }) 15 | 16 | export class AppComponent { 17 | constructor() { 18 | console.log('Environment config', Config); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/app.module.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | var core_1 = require('@angular/core'); 12 | var platform_browser_1 = require('@angular/platform-browser'); 13 | var common_1 = require('@angular/common'); 14 | var router_1 = require('@angular/router'); 15 | var http_1 = require('@angular/http'); 16 | var app_component_1 = require('./app.component'); 17 | var app_routes_1 = require('./app.routes'); 18 | var home_module_1 = require('./+home/home.module'); 19 | var shared_module_1 = require('./shared/shared.module'); 20 | var AppModule = (function () { 21 | function AppModule() { 22 | } 23 | AppModule = __decorate([ 24 | core_1.NgModule({ 25 | imports: [platform_browser_1.BrowserModule, http_1.HttpModule, router_1.RouterModule.forRoot(app_routes_1.routes), home_module_1.HomeModule, shared_module_1.SharedModule.forRoot()], 26 | declarations: [app_component_1.AppComponent], 27 | providers: [{ 28 | provide: common_1.APP_BASE_HREF, 29 | useValue: '/stackexchange-v2/' 30 | }, 31 | { 32 | provide: common_1.LocationStrategy, 33 | useClass: common_1.HashLocationStrategy 34 | }], 35 | bootstrap: [app_component_1.AppComponent] 36 | }), 37 | __metadata('design:paramtypes', []) 38 | ], AppModule); 39 | return AppModule; 40 | }()); 41 | exports.AppModule = AppModule; 42 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { BrowserModule } from '@angular/platform-browser'; 3 | import { APP_BASE_HREF, LocationStrategy, HashLocationStrategy } from '@angular/common'; 4 | import { RouterModule } from '@angular/router'; 5 | import { HttpModule } from '@angular/http'; 6 | import { AppComponent } from './app.component'; 7 | import { routes } from './app.routes'; 8 | 9 | import { HomeModule } from './+home/home.module'; 10 | import { SharedModule } from './shared/shared.module'; 11 | 12 | @NgModule({ 13 | imports: [BrowserModule, HttpModule, RouterModule.forRoot(routes), HomeModule, SharedModule.forRoot()], 14 | declarations: [AppComponent], 15 | providers: [{ 16 | provide: APP_BASE_HREF, 17 | useValue: '<%= APP_BASE %>' 18 | }, 19 | { 20 | provide: LocationStrategy, 21 | useClass: HashLocationStrategy 22 | }], 23 | bootstrap: [AppComponent] 24 | 25 | }) 26 | 27 | export class AppModule { } 28 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/app.routes.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var index_1 = require('./+home/index'); 3 | var index_2 = require('./+question/index'); 4 | exports.routes = index_1.HomeRoutes.concat(index_2.QuestionRoutes); 5 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/app.routes.ts: -------------------------------------------------------------------------------- 1 | import { Routes } from '@angular/router'; 2 | 3 | import { HomeRoutes } from './+home/index'; 4 | import { QuestionRoutes } from './+question/index'; 5 | 6 | export const routes: Routes = [ 7 | ...HomeRoutes, 8 | ...QuestionRoutes 9 | ]; 10 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/hot_loader_main.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/hot_loader_main.ts: -------------------------------------------------------------------------------- 1 | // Hot loading is temporary disabled 2 | // 3 | // import { HashLocationStrategy, HashLocationStrategy } from '@angular/common'; 4 | // import { provide } from '@angular/core'; 5 | // import { ROUTER_PROVIDERS } from '@angular/router'; 6 | // import { AppComponent } from './app.component'; 7 | 8 | // System.import('//localhost:<%= HOT_LOADER_PORT %>/ng2-hot-loader') 9 | // .then(loader => { 10 | // loader.ng2HotLoaderBootstrap(AppComponent, [ 11 | // ROUTER_PROVIDERS, 12 | // provide(LocationStrategy, { useClass: HashLocationStrategy }) 13 | // ]); 14 | // }); 15 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/main.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var platform_browser_dynamic_1 = require('@angular/platform-browser-dynamic'); 3 | var app_module_1 = require('./app.module'); 4 | platform_browser_dynamic_1.platformBrowserDynamic().bootstrapModule(app_module_1.AppModule); 5 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/main.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Bootstraps the application and makes the ROUTER_PROVIDERS and the APP_BASE_HREF available to it. 3 | * @see https://angular.io/docs/ts/latest/api/platform-browser-dynamic/index/bootstrap-function.html 4 | */ 5 | 6 | // The browser platform with a compiler 7 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 8 | 9 | // The app module 10 | import { AppModule } from './app.module'; 11 | 12 | // Compile and launch the module 13 | platformBrowserDynamic().bootstrapModule(AppModule); 14 | 15 | // In order to start the Service Worker located at "./worker.js" 16 | // uncomment this line. More about Service Workers here 17 | // https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers 18 | // 19 | // if ('serviceWorker' in navigator) { 20 | // (navigator).serviceWorker.register('./worker.js').then((registration: any) => 21 | // console.log('ServiceWorker registration successful with scope: ', registration.scope)) 22 | // .catch((err: any) => 23 | // console.log('ServiceWorker registration failed: ', err)); 24 | // } 25 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/config/env.config.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | exports.Config = JSON.parse('{"API":"https://demo.com","ENV":"PROD"}'); 3 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/config/env.config.ts: -------------------------------------------------------------------------------- 1 | // Feel free to extend this interface 2 | // depending on your app specific config. 3 | export interface EnvConfig { 4 | API?: string; 5 | ENV?: string; 6 | } 7 | 8 | export const Config: EnvConfig = JSON.parse('<%= ENV_CONFIG %>'); 9 | 10 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/constants/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function __export(m) { 3 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; 4 | } 5 | __export(require('./tutorial')); 6 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/constants/index.ts: -------------------------------------------------------------------------------- 1 | export * from './tutorial'; 2 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/constants/tutorial.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | exports.TUTORIAL_TEXT = [ 3 | "Welcome to StackExchange Bounties, a decentralized application (dapp)\n powered by Ethereum \n and Oraclize.\n This dapp allows you to sponsor questions located on \n StackExchange with real\n money. Press next to view a tutorial or close this window to begin viewing bounties.", 4 | "StackExchange Bounties runs on Ethereum. \n In order to sponsor or submit questions, you need a way to access the network. \n For beginners, we recommend installing the chrome extension \n MetaMask. \n More advanced users can connect to a specific node in Advanced Settings.", 5 | "You don't need to connect to Ethereum to view questions. However, you will need to\n do this in order to sponsor or submit questions. Connect to Ethereum with \n MetaMask by simply creating a new\n vault and signing in. Refresh the page once you've signed in.\n This page should say \"Found an unlocked account\" when you're connected.", 6 | "Once you're connected, you can submit a new question with a bounty by clicking\n \"Submit a new question\", located at the top of the web page. You can sponsor questions\n by clicking on them and then clicking \"Sponsor this question\" on the detail page.", 7 | "That's all! Happy bounty hunting!" 8 | ]; 9 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/constants/tutorial.ts: -------------------------------------------------------------------------------- 1 | export const TUTORIAL_TEXT: string[] = [ 2 | `Welcome to StackExchange Bounties, a decentralized application (dapp) 3 | powered by Ethereum 4 | and Oraclize. 5 | This dapp allows you to sponsor questions located on 6 | StackExchange with real 7 | money. Press next to view a tutorial or close this window to begin viewing bounties.`, 8 | 9 | `StackExchange Bounties runs on Ethereum. 10 | In order to sponsor or submit questions, you need a way to access the network. 11 | For beginners, we recommend installing the chrome extension 12 | MetaMask. 13 | More advanced users can connect to a specific node in Advanced Settings.`, 14 | 15 | `You don't need to connect to Ethereum to view questions. However, you will need to 16 | do this in order to sponsor or submit questions. Connect to Ethereum with 17 | MetaMask by simply creating a new 18 | vault and signing in. Refresh the page once you've signed in. 19 | This page should say "Found an unlocked account" when you're connected.`, 20 | 21 | `Once you're connected, you can submit a new question with a bounty by clicking 22 | "Submit a new question", located at the top of the web page. You can sponsor questions 23 | by clicking on them and then clicking "Sponsor this question" on the detail page.`, 24 | 25 | `That's all! Happy bounty hunting!` 26 | ]; 27 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function __export(m) { 3 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; 4 | } 5 | __export(require('./navbar/index')); 6 | __export(require('./config/env.config')); 7 | __export(require('./question/index')); 8 | __export(require('./questions/index')); 9 | __export(require('./web3/index')); 10 | __export(require('./mathjax/index')); 11 | __export(require('./constants/index')); 12 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This barrel file provides the exports for the shared resources (services, components). 3 | */ 4 | export * from './navbar/index'; 5 | export * from './config/env.config'; 6 | export * from './question/index'; 7 | export * from './questions/index'; 8 | export * from './web3/index'; 9 | export * from './mathjax/index'; 10 | export * from './constants/index'; 11 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/mathjax/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function __export(m) { 3 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; 4 | } 5 | __export(require('./mathjax.directive')); 6 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/mathjax/index.ts: -------------------------------------------------------------------------------- 1 | export * from './mathjax.directive'; 2 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/mathjax/mathjax.directive.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | var core_1 = require('@angular/core'); 12 | var MathJaxDirective = (function () { 13 | function MathJaxDirective(elementRef) { 14 | this.elementRef = elementRef; 15 | } 16 | MathJaxDirective.prototype.ngOnChanges = function () { 17 | var MathJax = window['MathJax']; 18 | this.elementRef.nativeElement.innerHTML = this.MathJax; 19 | MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.elementRef.nativeElement]); 20 | }; 21 | __decorate([ 22 | core_1.Input(), 23 | __metadata('design:type', String) 24 | ], MathJaxDirective.prototype, "MathJax", void 0); 25 | MathJaxDirective = __decorate([ 26 | core_1.Directive({ 27 | selector: '[MathJax]' 28 | }), 29 | __metadata('design:paramtypes', [core_1.ElementRef]) 30 | ], MathJaxDirective); 31 | return MathJaxDirective; 32 | }()); 33 | exports.MathJaxDirective = MathJaxDirective; 34 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/mathjax/mathjax.directive.ts: -------------------------------------------------------------------------------- 1 | import {Directive, ElementRef, Input, OnChanges} from '@angular/core'; 2 | 3 | @Directive({ 4 | selector: '[MathJax]' 5 | }) 6 | 7 | export class MathJaxDirective implements OnChanges { 8 | @Input() MathJax: string; 9 | 10 | constructor(private elementRef: ElementRef) { } 11 | 12 | ngOnChanges() { 13 | let MathJax = window['MathJax']; 14 | this.elementRef.nativeElement.innerHTML = this.MathJax; 15 | MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.elementRef.nativeElement]); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/navbar/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function __export(m) { 3 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; 4 | } 5 | __export(require('./navbar.component')); 6 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/navbar/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This barrel file provides the export for the shared NavbarComponent. 3 | */ 4 | export * from './navbar.component'; 5 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/navbar/navbar.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | padding: 0; 4 | border-color: #e1e1e1; 5 | border-style: solid; 6 | border-width: 0 0 1px; 7 | } 8 | 9 | .dim { 10 | opacity: 0.5; 11 | overflow-y: hidden; 12 | pointer-events: none; 13 | } 14 | 15 | #app-title { 16 | line-height: 48px; 17 | padding: 15px; 18 | display: inline-block; 19 | } 20 | 21 | #app-title > div { 22 | font-size: 25px; 23 | } 24 | 25 | #app-title > div:hover { 26 | background: rgba(0,0,0,0.3); 27 | } 28 | 29 | #app-title > p { 30 | margin-top: 5px; 31 | margin-bottom: 0; 32 | font-size: 13px; 33 | } 34 | 35 | #app-title a { 36 | float: none; 37 | color: #106cc8; 38 | margin: 0; 39 | } 40 | 41 | @media (max-width: 479px) { 42 | #app-title { 43 | text-align: center; 44 | display: block; 45 | width: 100%; 46 | } 47 | } 48 | 49 | @media (max-width: 767px) { 50 | .navbar-button { 51 | width: 100%; 52 | float: none !important; 53 | margin-bottom: 10px; 54 | } 55 | } 56 | 57 | .navbar-button { 58 | float: right; 59 | text-align: center; 60 | padding: 15px; 61 | margin-top: 10px; 62 | margin-right: 10px; 63 | box-shadow: 0 1px 4px rgba(0,0,0,0.3); 64 | } 65 | 66 | .navbar-button:hover { 67 | background: rgba(0,0,0,0.3); 68 | } 69 | 70 | #newQ:hover { 71 | background: rgba(192,216,144,0.3); 72 | } 73 | 74 | #settingsModal input { 75 | width: 100%; 76 | margin-bottom: 10px; 77 | } 78 | 79 | #settingsModal button { 80 | float: right; 81 | width: 30%; 82 | } 83 | 84 | .modal-body > div { 85 | margin-bottom: 20px; 86 | } 87 | 88 | .modal-body input { 89 | margin-bottom: 15px; 90 | } 91 | 92 | #submit-warning { 93 | text-align: center; 94 | } 95 | 96 | #question-status > div { 97 | padding: 10px; 98 | } 99 | 100 | #exrate { 101 | float: right; 102 | } -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/navbar/navbar.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core'; 2 | import { Web3Service } from '../web3/index'; 3 | import { QuestionsService } from '../questions/index'; 4 | import { Router } from '@angular/router'; 5 | 6 | @Component({ 7 | moduleId: module.id, 8 | selector: 'sd-navbar', 9 | templateUrl: 'navbar.component.html', 10 | styleUrls: ['navbar.component.css'], 11 | }) 12 | 13 | export class NavbarComponent implements OnInit, OnDestroy { 14 | private accountSubscription: any; // When the web3Service detects an unlocked account 15 | private url: string; 16 | private amount: string; 17 | private questionSuccess: boolean = true; 18 | 19 | constructor(private web3Service: Web3Service, 20 | private questionsService: QuestionsService, 21 | private router: Router, 22 | private ref: ChangeDetectorRef) {} 23 | 24 | ngOnInit(): void { 25 | this.accountSubscription = this.web3Service.update.subscribe(() => { 26 | this.ref.detectChanges(); 27 | }); 28 | } 29 | 30 | ngOnDestroy(): void { 31 | this.accountSubscription.unsubscribe(); 32 | } 33 | 34 | home(): void { 35 | this.router.navigate(['/']); 36 | } 37 | 38 | addQuestion(url: string, amount: number): void { 39 | this.questionSuccess = false; 40 | if (this.web3Service.currentAcc && url !== '' && !isNaN(amount) && amount !== 0) { 41 | this.questionsService.addQuestion(url, amount); 42 | this.url = ''; 43 | this.amount = undefined; 44 | this.questionSuccess = true; 45 | } 46 | } 47 | 48 | showTutorial(): boolean { 49 | return (typeof localStorage['SEDappTutoral'] === 'undefined'); 50 | } 51 | 52 | amountIsNumber(): boolean { 53 | return (!isNaN(+this.amount) 54 | && this.amount !== ''); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/question/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function __export(m) { 3 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; 4 | } 5 | __export(require('./question')); 6 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/question/index.ts: -------------------------------------------------------------------------------- 1 | export * from './question'; 2 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/question/question.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var Question = (function () { 3 | function Question(oraclizeQuestion, seQuestion, sponsors, totalBounty, index) { 4 | this.contractAddr = oraclizeQuestion[0]; 5 | this.site = oraclizeQuestion[1]; 6 | this.questionID = oraclizeQuestion[2]; 7 | this.winnerAddr = oraclizeQuestion[3]; 8 | this.winnerID = oraclizeQuestion[4]; 9 | this.acceptedAnswerID = oraclizeQuestion[5]; 10 | this.updateDelay = oraclizeQuestion[6]; 11 | this.expiryDate = parseInt(oraclizeQuestion[7]); 12 | this.ownedFee = oraclizeQuestion[8]; 13 | this.exists = seQuestion.items.length > 0; 14 | var items = seQuestion.items[0]; 15 | this.title = items.title; 16 | this.body = items.body; 17 | this.link = items.link; 18 | this.owner = items.owner; 19 | var _a = this.setQuestionText(this.winnerAddr, this.expiryDate), text = _a[0], info = _a[1]; 20 | this.text = text; 21 | this.info = info; 22 | this.sponsors = sponsors; 23 | this.totalBounty = totalBounty; 24 | this.index = index; 25 | } 26 | Question.prototype.setQuestionText = function (winnerAddr, expiryDate) { 27 | var now = new Date().getTime() / 1000; 28 | var text; 29 | var info; 30 | if (this.addressIsNone(winnerAddr) && now < expiryDate) { 31 | text = 'Expires:'; 32 | info = new Date(expiryDate * 1000).toLocaleDateString(); 33 | } 34 | else if (!this.addressIsNone(winnerAddr)) { 35 | text = 'Status:'; 36 | info = 'Completed'; 37 | } 38 | else { 39 | text = 'Status:'; 40 | info = 'Expired'; 41 | } 42 | return [text, info]; 43 | }; 44 | Question.prototype.addressIsNone = function (address) { 45 | return address === '0x0000000000000000000000000000000000000000'; 46 | }; 47 | return Question; 48 | }()); 49 | exports.Question = Question; 50 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/question/question.ts: -------------------------------------------------------------------------------- 1 | export class Question { 2 | contractAddr: string; 3 | site: string; 4 | questionID: string; 5 | winnerAddr: string; 6 | winnerID: string; 7 | acceptedAnswerID: string; 8 | updateDelay: string; 9 | expiryDate: number; 10 | ownedFee: string; 11 | exists: boolean; 12 | title: string; 13 | body: string; 14 | link: string; 15 | info: string; 16 | text: string; 17 | owner: any; 18 | sponsors: any[]; 19 | totalBounty: number; 20 | index: number; 21 | 22 | constructor(oraclizeQuestion: any, seQuestion: any, sponsors: any[], totalBounty: number, index: number) { 23 | this.contractAddr = oraclizeQuestion[0]; 24 | this.site = oraclizeQuestion[1]; 25 | this.questionID = oraclizeQuestion[2]; 26 | this.winnerAddr = oraclizeQuestion[3]; 27 | this.winnerID = oraclizeQuestion[4]; 28 | this.acceptedAnswerID = oraclizeQuestion[5]; 29 | this.updateDelay = oraclizeQuestion[6]; 30 | this.expiryDate = parseInt(oraclizeQuestion[7]); 31 | this.ownedFee = oraclizeQuestion[8]; 32 | this.exists = seQuestion.items.length > 0; 33 | let items = seQuestion.items[0]; 34 | this.title = items.title; 35 | this.body = items.body; 36 | this.link = items.link; 37 | this.owner = items.owner; 38 | let [text, info] = this.setQuestionText(this.winnerAddr, this.expiryDate); 39 | this.text = text; 40 | this.info = info; 41 | this.sponsors = sponsors; 42 | this.totalBounty = totalBounty; 43 | this.index = index; 44 | } 45 | 46 | setQuestionText(winnerAddr: string, expiryDate: number): string[] { 47 | let now = new Date().getTime()/1000; 48 | let text; 49 | let info; 50 | if (this.addressIsNone(winnerAddr) && now < expiryDate) { 51 | text = 'Expires:'; 52 | info = new Date(expiryDate*1000).toLocaleDateString(); 53 | } else if (!this.addressIsNone(winnerAddr)) { 54 | text = 'Status:'; 55 | info = 'Completed'; 56 | } else { 57 | text = 'Status:'; 58 | info = 'Expired'; 59 | } 60 | return [text, info]; 61 | } 62 | 63 | addressIsNone(address: string): boolean { 64 | return address === '0x0000000000000000000000000000000000000000'; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/questions/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function __export(m) { 3 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; 4 | } 5 | __export(require('./questions.service')); 6 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/questions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './questions.service'; 2 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/shared.module.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | var core_1 = require('@angular/core'); 12 | var common_1 = require('@angular/common'); 13 | var forms_1 = require('@angular/forms'); 14 | var router_1 = require('@angular/router'); 15 | var index_1 = require('./navbar/index'); 16 | var index_2 = require('./questions/index'); 17 | var index_3 = require('./web3/index'); 18 | var index_4 = require('./mathjax/index'); 19 | var SharedModule = (function () { 20 | function SharedModule() { 21 | } 22 | SharedModule.forRoot = function () { 23 | return { 24 | ngModule: SharedModule, 25 | providers: [index_2.QuestionsService, index_3.Web3Service] 26 | }; 27 | }; 28 | SharedModule = __decorate([ 29 | core_1.NgModule({ 30 | imports: [common_1.CommonModule, router_1.RouterModule, forms_1.FormsModule], 31 | declarations: [index_1.NavbarComponent, index_4.MathJaxDirective], 32 | exports: [index_1.NavbarComponent, index_4.MathJaxDirective, 33 | common_1.CommonModule, forms_1.FormsModule, router_1.RouterModule] 34 | }), 35 | __metadata('design:paramtypes', []) 36 | ], SharedModule); 37 | return SharedModule; 38 | }()); 39 | exports.SharedModule = SharedModule; 40 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/shared.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule, ModuleWithProviders } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { FormsModule } from '@angular/forms'; 4 | import { RouterModule } from '@angular/router'; 5 | 6 | import { NavbarComponent } from './navbar/index'; 7 | import { QuestionsService } from './questions/index'; 8 | import { Web3Service } from './web3/index'; 9 | import { MathJaxDirective } from './mathjax/index'; 10 | 11 | /** 12 | * Do not specify providers for modules that might be imported by a lazy loaded module. 13 | */ 14 | 15 | @NgModule({ 16 | imports: [CommonModule, RouterModule, FormsModule], 17 | declarations: [NavbarComponent, MathJaxDirective], 18 | exports: [NavbarComponent, MathJaxDirective, 19 | CommonModule, FormsModule, RouterModule] 20 | }) 21 | export class SharedModule { 22 | static forRoot(): ModuleWithProviders { 23 | return { 24 | ngModule: SharedModule, 25 | providers: [QuestionsService, Web3Service] // services go here 26 | }; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/web3/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function __export(m) { 3 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; 4 | } 5 | __export(require('./web3.service')); 6 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/app/shared/web3/index.ts: -------------------------------------------------------------------------------- 1 | export * from './web3.service'; 2 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/css/main.css: -------------------------------------------------------------------------------- 1 | /* Reset */ 2 | html, 3 | body, 4 | div { 5 | border: 0; 6 | margin: 0; 7 | padding: 0; 8 | } 9 | 10 | /* Box-sizing border-box */ 11 | * { 12 | box-sizing: border-box; 13 | } 14 | 15 | /* Set up a default font and some padding to provide breathing room */ 16 | body { 17 | font-family: Roboto, "Helvetica Neue", sans-serif; 18 | font-size: 16px; 19 | -webkit-font-smoothing: antialiased; 20 | -moz-osx-font-smoothing: grayscale; 21 | } 22 | 23 | p { 24 | font-weight: 400; 25 | letter-spacing: 0.01em; 26 | line-height: 20px; 27 | margin-bottom: 1em; 28 | margin-top: 1em; 29 | } 30 | 31 | ul { 32 | margin: 10px 0 0; 33 | padding: 0 0 0 20px; 34 | } 35 | 36 | li { 37 | font-weight: 400; 38 | margin-top: 4px; 39 | } 40 | 41 | input { 42 | border: 1px solid #106cc8; 43 | font-size: 14px; 44 | height: 40px; 45 | outline: none; 46 | padding: 8px; 47 | } 48 | 49 | button { 50 | background-color: #106cc8; 51 | border-style: none; 52 | color: rgba(255, 255, 255, 0.87); 53 | cursor: pointer; 54 | display: inline-block; 55 | font-size: 14px; 56 | height: 40px; 57 | padding: 8px 18px; 58 | text-decoration: none; 59 | } 60 | 61 | button:hover { 62 | background-color: #28739e; 63 | } 64 | 65 | .clickme { 66 | cursor: pointer; 67 | } 68 | 69 | .noselect { 70 | -webkit-touch-callout: none; 71 | -webkit-user-select: none; 72 | -moz-user-select: none; 73 | -ms-user-select: none; 74 | user-select: none; 75 | } 76 | 77 | .noclick:hover { 78 | cursor: not-allowed !important; 79 | background: rgba(237,67,55,0.3) !important; 80 | } 81 | 82 | .horiz-center-container { 83 | width: 100%; 84 | text-align: center; 85 | } 86 | 87 | .background-ease-300 { 88 | transition: background 300ms ease; 89 | } 90 | 91 | .img-centered { 92 | display: block; 93 | margin-left: auto; 94 | margin-right: auto; 95 | } 96 | 97 | .danger { 98 | background: rgba(237,67,55,0.3); 99 | } 100 | 101 | .success { 102 | background: rgba(192,216,144,0.3); 103 | } 104 | 105 | .price-container .price-eth { 106 | display: none; 107 | } 108 | 109 | .price-container:hover .price-eth { 110 | display: inline-block; 111 | } 112 | 113 | .price-container:hover .price-usd { 114 | display: none; 115 | } -------------------------------------------------------------------------------- /web-ui/dist/tmp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | <%= APP_TITLE %> 8 | 9 | 10 | 11 | 12 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | Loading... 27 | 28 | 32 | 33 | 34 | 35 | 36 | <% if (ENV === 'dev') { %> 37 | 42 | <% } %> 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | <% if (ENV === 'dev') { %> 51 | 58 | <% } %> 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/testing/router/router-testing-providers.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var common_1 = require('@angular/common'); 3 | var router_1 = require('@angular/router'); 4 | var testing_1 = require('@angular/common/testing'); 5 | var router_testing_module_1 = require('@angular/router/testing/router_testing_module'); 6 | var core_1 = require('@angular/core'); 7 | var mock_location_strategy_1 = require('./mock-location-strategy'); 8 | exports.provideFakeRouter = function (rootComponentType, config) { 9 | if (config === void 0) { config = []; } 10 | return [ 11 | router_1.RouterOutletMap, 12 | { provide: router_1.UrlSerializer, useClass: router_1.DefaultUrlSerializer }, 13 | { provide: common_1.Location, useClass: testing_1.SpyLocation }, 14 | { provide: core_1.NgModuleFactoryLoader, useClass: router_testing_module_1.SpyNgModuleFactoryLoader }, 15 | { provide: common_1.LocationStrategy, useClass: mock_location_strategy_1.MockLocationStrategy }, 16 | { 17 | provide: router_1.Router, 18 | useFactory: function (resolver, urlSerializer, outletMap, location, injector, ngModuleFactoryLoader) { 19 | return new router_1.Router(rootComponentType, resolver, urlSerializer, outletMap, location, injector, ngModuleFactoryLoader, config); 20 | }, 21 | deps: [core_1.ComponentResolver, router_1.UrlSerializer, router_1.RouterOutletMap, common_1.Location, core_1.Injector] 22 | }, 23 | { 24 | provide: router_1.ActivatedRoute, 25 | useFactory: function (r) { return r.routerState.root; }, 26 | deps: [router_1.Router] 27 | }, 28 | ]; 29 | }; 30 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/testing/router/router-testing-providers.ts: -------------------------------------------------------------------------------- 1 | /* 2 | temporary mock router provider until @angular provides one (currently not exported / experimental) 3 | copied from https://raw.githubusercontent.com/springboot-angular2-tutorial/angular2-app/master/src/shared/routes/router-testing-providers.ts 4 | */ 5 | 6 | 7 | import {Location, LocationStrategy} from '@angular/common'; 8 | import { 9 | RouterOutletMap, 10 | UrlSerializer, 11 | DefaultUrlSerializer, 12 | Router, 13 | ActivatedRoute, 14 | RouterConfig 15 | } from '@angular/router'; 16 | import {SpyLocation} from '@angular/common/testing'; 17 | import {SpyNgModuleFactoryLoader} from '@angular/router/testing/router_testing_module'; 18 | import {ComponentResolver, Injector, Type, NgModuleFactoryLoader} from '@angular/core'; 19 | import {MockLocationStrategy} from './mock-location-strategy'; 20 | 21 | export const provideFakeRouter = (rootComponentType: Type, config: RouterConfig = []) => { 22 | return [ 23 | RouterOutletMap, 24 | { provide: UrlSerializer, useClass: DefaultUrlSerializer }, 25 | { provide: Location, useClass: SpyLocation }, 26 | { provide: NgModuleFactoryLoader, useClass: SpyNgModuleFactoryLoader }, 27 | { provide: LocationStrategy, useClass: MockLocationStrategy }, 28 | { 29 | provide: Router, 30 | useFactory: (resolver: ComponentResolver, urlSerializer: UrlSerializer, 31 | outletMap: RouterOutletMap, location: Location, injector: Injector, ngModuleFactoryLoader: NgModuleFactoryLoader) => { 32 | return new Router( 33 | rootComponentType, resolver, urlSerializer, outletMap, location, injector, ngModuleFactoryLoader, config); 34 | }, 35 | deps: [ComponentResolver, UrlSerializer, RouterOutletMap, Location, Injector] 36 | }, 37 | { 38 | provide: ActivatedRoute, 39 | useFactory: (r: Router) => r.routerState.root, 40 | deps: [Router] 41 | }, 42 | ]; 43 | }; 44 | 45 | -------------------------------------------------------------------------------- /web-ui/dist/tmp/typings.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /web-ui/migrations/1_initial_migration.js: -------------------------------------------------------------------------------- 1 | module.exports = function(deployer) { 2 | deployer.deploy(Migrations); 3 | }; 4 | -------------------------------------------------------------------------------- /web-ui/migrations/2_deploy_contracts.js: -------------------------------------------------------------------------------- 1 | module.exports = function(deployer) { 2 | deployer.deploy(StackExchangeBounty); 3 | deployer.deploy(usingOraclize); 4 | deployer.deploy(Test); 5 | }; 6 | -------------------------------------------------------------------------------- /web-ui/protractor.conf.js: -------------------------------------------------------------------------------- 1 | const config = { 2 | baseUrl: 'http://localhost:5555/', 3 | 4 | specs: [ 5 | './dist/dev/**/*.e2e-spec.js' 6 | ], 7 | 8 | exclude: [], 9 | 10 | // 'jasmine' by default will use the latest jasmine framework 11 | framework: 'jasmine', 12 | 13 | // allScriptsTimeout: 110000, 14 | 15 | jasmineNodeOpts: { 16 | // showTiming: true, 17 | showColors: true, 18 | isVerbose: false, 19 | includeStackTrace: false, 20 | // defaultTimeoutInterval: 400000 21 | }, 22 | 23 | directConnect: true, 24 | 25 | capabilities: { 26 | browserName: 'chrome' 27 | }, 28 | 29 | onPrepare: function() { 30 | const SpecReporter = require('jasmine-spec-reporter'); 31 | // add jasmine spec reporter 32 | jasmine.getEnv().addReporter(new SpecReporter({ displayStacktrace: true })); 33 | 34 | browser.ignoreSynchronization = false; 35 | }, 36 | 37 | 38 | /** 39 | * Angular 2 configuration 40 | * 41 | * useAllAngular2AppRoots: tells Protractor to wait for any angular2 apps on the page instead of just the one matching 42 | * `rootEl` 43 | */ 44 | useAllAngular2AppRoots: true 45 | }; 46 | 47 | if (process.env.TRAVIS) { 48 | config.capabilities = { 49 | browserName: 'firefox' 50 | }; 51 | } 52 | 53 | exports.config = config; 54 | -------------------------------------------------------------------------------- /web-ui/src/client/.node-xmlhttprequest-sync-16636: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/provable-things/dapp-stackexchange-bounty/840045456da569cc30e6a0f823915c1ca521047b/web-ui/src/client/.node-xmlhttprequest-sync-16636 -------------------------------------------------------------------------------- /web-ui/src/client/app/+home/home.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | padding: 16px 0px; 4 | } 5 | 6 | @media (max-width: 767px) { 7 | .container-fluid { 8 | padding: 0; 9 | } 10 | } 11 | 12 | .dim { 13 | opacity: 0.5; 14 | pointer-events: none; 15 | } 16 | 17 | .question-panel { 18 | padding: 10px; 19 | position: relative; 20 | display: flex; 21 | min-height: 120px; 22 | } 23 | 24 | .question-panel:hover { 25 | background: rgba(0,0,0,0.1); 26 | } 27 | 28 | .question-info { 29 | margin-left: 10px; 30 | margin-top: 5px; 31 | width: 75%; 32 | } 33 | 34 | .question-title { 35 | font-size: 20px; 36 | padding-right: 5px; 37 | display: block; 38 | } 39 | 40 | .question-owner { 41 | display: inline-block; 42 | font-size: 14px; 43 | margin-left: 10px; 44 | } 45 | 46 | .site-image { 47 | display: inline-block; 48 | width: 50px; 49 | font-size: 10px; 50 | margin-right: 15px; 51 | text-align: center; 52 | } 53 | 54 | .site-image > img { 55 | margin-top: 15px; 56 | width: 32px; 57 | } 58 | 59 | #sidebar { 60 | display: block; 61 | } 62 | 63 | @media (min-width: 768px) { 64 | #sidebar { 65 | position: fixed; 66 | right: 16px; 67 | } 68 | } 69 | 70 | #wrapper { 71 | padding: 20px; 72 | } 73 | 74 | .sidebar-info { 75 | padding: 20px; 76 | overflow-x: auto; 77 | } 78 | 79 | .sidebar-info > span { 80 | font-size: 14px; 81 | } 82 | 83 | #tutorial { 84 | position: fixed; 85 | z-index: 99999; 86 | opacity: 1; 87 | left: 50%; 88 | top: 25%; 89 | transform: translate(-50%, 0); 90 | } -------------------------------------------------------------------------------- /web-ui/src/client/app/+home/home.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { SharedModule } from '../shared/shared.module'; 4 | import { HomeComponent } from './home.component'; 5 | 6 | @NgModule({ 7 | imports: [CommonModule, SharedModule], 8 | declarations: [HomeComponent], 9 | exports: [HomeComponent], 10 | providers: [] // services go here 11 | }) 12 | 13 | export class HomeModule { } 14 | -------------------------------------------------------------------------------- /web-ui/src/client/app/+home/home.routes.ts: -------------------------------------------------------------------------------- 1 | import { Route } from '@angular/router'; 2 | import { HomeComponent } from './index'; 3 | 4 | export const HomeRoutes: Route[] = [ 5 | { 6 | path: '', 7 | component: HomeComponent 8 | } 9 | ]; 10 | -------------------------------------------------------------------------------- /web-ui/src/client/app/+home/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This barrel file provides the export for the lazy loaded HomeComponent. 3 | */ 4 | export * from './home.component'; 5 | export * from './home.routes'; 6 | 7 | -------------------------------------------------------------------------------- /web-ui/src/client/app/+question/index.ts: -------------------------------------------------------------------------------- 1 | export * from './question.component'; 2 | export * from './question.routes'; 3 | -------------------------------------------------------------------------------- /web-ui/src/client/app/+question/question.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | padding: 16px 0; 4 | } 5 | 6 | @media (max-width: 767px) { 7 | .container-fluid { 8 | padding: 0; 9 | } 10 | } 11 | 12 | #panel-site { 13 | font-size: 14px; 14 | } 15 | 16 | .button-sponsor { 17 | width: 100%; 18 | margin-bottom: 15px; 19 | } 20 | 21 | #answers { 22 | cursor: pointer; 23 | padding: 15px; 24 | text-align: center; 25 | } 26 | 27 | #answers:hover { 28 | background: rgba(0,0,0,0.1); 29 | } 30 | 31 | #owner { 32 | padding: 10px; 33 | } 34 | 35 | #owner > a { 36 | cursor: pointer; 37 | } 38 | 39 | #profile-image { 40 | width: 20px; 41 | } 42 | 43 | #sponsors { 44 | overflow: auto; 45 | } 46 | 47 | #contractAddrInput { 48 | display: inline-block; 49 | right: 0; 50 | left: 0; 51 | text-align: center; 52 | border-radius: 5px; 53 | -moz-border-radius:5px; 54 | border: 1px dashed #B5B5B5; 55 | background-color: #F5F5F5; 56 | } 57 | 58 | #addrModal .modal-body { 59 | text-align: center; 60 | } 61 | 62 | #question-body { 63 | overflow-x: auto; 64 | } -------------------------------------------------------------------------------- /web-ui/src/client/app/+question/question.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core'; 2 | import { QuestionsService, Web3Service, Question, MathJaxDirective } from '../shared/index'; 3 | import { Subscription } from 'rxjs/Rx'; 4 | import { ActivatedRoute } from '@angular/router'; 5 | 6 | @Component({ 7 | moduleId: module.id, 8 | selector: 'sd-question', 9 | templateUrl: 'question.component.html', 10 | styleUrls: ['question.component.css'], 11 | directives: [MathJaxDirective] 12 | }) 13 | 14 | export class QuestionComponent implements OnInit, OnDestroy { 15 | private sub: Subscription; // Subscription to get the route params 16 | private question: Question; // Question object being displayed 17 | 18 | constructor(private route: ActivatedRoute, 19 | private questionsService: QuestionsService, 20 | private web3Service: Web3Service, 21 | private ref: ChangeDetectorRef) {} 22 | 23 | ngOnInit(): void { 24 | this.sub = this.route.params.subscribe(params => { // Get the right question 25 | let id = params['id']; 26 | let site = params['site']; 27 | this.question = this.questionsService.getQuestionFromCache(id, site); 28 | if (!this.question) { 29 | this.questionsService.getQuestionBySiteId(id, site).then((question) => { 30 | this.question = question; 31 | this.ref.detectChanges(); 32 | }); 33 | } 34 | }); 35 | } 36 | 37 | ngOnDestroy(): void { 38 | this.sub.unsubscribe(); 39 | } 40 | 41 | parseDate(unixDate: number): Date { 42 | let date; 43 | if (unixDate) { 44 | date = new Date(unixDate*1000).toLocaleString(); 45 | } 46 | return date; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /web-ui/src/client/app/+question/question.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { SharedModule } from '../shared/shared.module'; 4 | import { QuestionComponent } from './question.component'; 5 | 6 | @NgModule({ 7 | imports: [CommonModule, SharedModule], 8 | declarations: [QuestionComponent], 9 | exports: [QuestionComponent], 10 | providers: [] // services go here 11 | }) 12 | 13 | export class QuestionModule { } 14 | -------------------------------------------------------------------------------- /web-ui/src/client/app/+question/question.routes.ts: -------------------------------------------------------------------------------- 1 | import { Route } from '@angular/router'; 2 | import { QuestionComponent } from './index'; 3 | 4 | export const QuestionRoutes: Route[] = [ 5 | { 6 | path: 'questions/:site/:id', 7 | component: QuestionComponent 8 | } 9 | ]; 10 | -------------------------------------------------------------------------------- /web-ui/src/client/app/app.component.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | describe('App', () => { 2 | 3 | beforeEach( () => { 4 | browser.get('/'); 5 | }); 6 | 7 | it('should have a title', () => { 8 | expect(browser.getTitle()).toEqual('Welcome to angular2-seed!'); 9 | }); 10 | 11 | it('should have