├── src ├── assets │ ├── .gitkeep │ ├── img │ │ ├── logo-simple.png │ │ ├── logo-small.png │ │ ├── e11-logo-dark.png │ │ ├── metamask-e11.png │ │ ├── metamask-fox.png │ │ ├── metamask-lock.png │ │ ├── metamask-oops.png │ │ ├── bg_resource_e11.png │ │ ├── bg_resource_gold.png │ │ ├── bg_resource_crystal.png │ │ ├── bg_resource_quantum.png │ │ ├── units │ │ │ └── thumbnails │ │ │ │ ├── archer.png │ │ │ │ ├── guardian.png │ │ │ │ └── tiny_warrior.png │ │ └── buildings │ │ │ └── thumbnails │ │ │ ├── barracks_1.png │ │ │ ├── barracks_2.png │ │ │ ├── barracks_3.png │ │ │ ├── portal_1.png │ │ │ ├── portal_2.png │ │ │ ├── portal_3.png │ │ │ ├── experiment_1.png │ │ │ ├── gold_mine_1.png │ │ │ ├── gold_mine_2.png │ │ │ ├── gold_mine_3.png │ │ │ ├── gold_mine_4.png │ │ │ ├── gold_mine_5.png │ │ │ ├── city_center_1.png │ │ │ ├── city_center_2.png │ │ │ ├── city_center_3.png │ │ │ ├── crystal_mine_1.png │ │ │ ├── crystal_mine_2.png │ │ │ ├── crystal_mine_3.png │ │ │ ├── crystal_mine_4.png │ │ │ ├── crystal_mine_5.png │ │ │ ├── gold_factory_1.png │ │ │ ├── gold_factory_2.png │ │ │ ├── gold_factory_3.png │ │ │ ├── gold_factory_4.png │ │ │ ├── gold_factory_5.png │ │ │ ├── gold_storage_1.png │ │ │ ├── gold_storage_2.png │ │ │ ├── gold_storage_3.png │ │ │ ├── crystal_factory_1.png │ │ │ ├── crystal_factory_2.png │ │ │ ├── crystal_factory_3.png │ │ │ ├── crystal_factory_4.png │ │ │ ├── crystal_factory_5.png │ │ │ ├── crystal_storage_1.png │ │ │ ├── crystal_storage_2.png │ │ │ └── crystal_storage_3.png │ └── e11-theme │ │ ├── components │ │ ├── _icon.scss │ │ ├── _progress-bar.scss │ │ ├── _avatar.scss │ │ ├── _input.scss │ │ ├── _button.scss │ │ ├── _badge.scss │ │ └── _segments.scss │ │ ├── fonts │ │ ├── e11-font.eot │ │ ├── e11-font.ttf │ │ └── e11-font.woff │ │ ├── _mixins.scss │ │ ├── theme.scss │ │ └── _variables.scss ├── app │ ├── app.component.css │ ├── +admin │ │ ├── admin.component.scss │ │ └── admin.module.ts │ ├── +trades │ │ ├── trades.component.scss │ │ ├── trades.component.html │ │ ├── trades.component.ts │ │ └── trades.module.ts │ ├── +assets │ │ ├── +defense │ │ │ ├── defense.component.scss │ │ │ ├── defense.component.html │ │ │ └── defense.component.ts │ │ ├── +units │ │ │ └── units.component.scss │ │ ├── +research │ │ │ ├── research.component.scss │ │ │ ├── research.component.html │ │ │ └── research.component.ts │ │ ├── +buildings │ │ │ └── buildings.component.scss │ │ ├── assets.component.ts │ │ ├── assets.component.html │ │ ├── assets.component.scss │ │ ├── queue-navbar │ │ │ ├── queue-navbar.component.ts │ │ │ ├── queue-navbar.component.scss │ │ │ └── queue-navbar.component.html │ │ └── assets.module.ts │ ├── shared │ │ ├── components │ │ │ ├── index.ts │ │ │ ├── mobile-screen │ │ │ │ ├── mobile-screen.component.html │ │ │ │ ├── mobile-screen.component.ts │ │ │ │ └── mobile-screen.component.scss │ │ │ ├── loading │ │ │ │ ├── loading.component.html │ │ │ │ ├── loading.component.ts │ │ │ │ └── loading.component.scss │ │ │ ├── errors │ │ │ │ ├── errors.component.ts │ │ │ │ └── errors.component.scss │ │ │ ├── navbar │ │ │ │ └── navbar.component.ts │ │ │ └── abstract-container.component.ts │ │ ├── pipes │ │ │ ├── round.pipe.ts │ │ │ ├── pipes.module.ts │ │ │ ├── large-number.pipe.ts │ │ │ ├── block-time.pipe.ts │ │ │ └── past-block-time.pipe.ts │ │ ├── guards │ │ │ └── bootstrap.guard.ts │ │ └── models │ │ │ ├── unit.model.ts │ │ │ └── building.model.ts │ ├── +battle │ │ ├── +target │ │ │ ├── target.component.scss │ │ │ └── target.component.html │ │ ├── +history │ │ │ ├── history.component.scss │ │ │ └── history.component.html │ │ ├── army-stats │ │ │ ├── army-stats.component.html │ │ │ ├── army-stats.component.scss │ │ │ └── army-stats.component.ts │ │ ├── battle.component.html │ │ ├── army-selection │ │ │ ├── army-selection.component.scss │ │ │ └── army-selection.component.html │ │ ├── battle.module.ts │ │ ├── battle.component.scss │ │ ├── targets-list │ │ │ └── targets-list.component.ts │ │ └── battle.component.ts │ ├── +dashboard │ │ ├── village-extras │ │ │ ├── village-extras.component.scss │ │ │ ├── village-extras.component.ts │ │ │ └── village-extras.component.html │ │ ├── dashboard.component.scss │ │ ├── village-queues │ │ │ ├── village-queues.component.scss │ │ │ └── village-queues.component.ts │ │ ├── dashboard.component.html │ │ ├── village-logs │ │ │ ├── village-logs.component.scss │ │ │ └── village-logs.component.ts │ │ ├── dashboard.module.ts │ │ └── village-info │ │ │ └── village-info.component.ts │ ├── +onboarding │ │ ├── onboarding.component.scss │ │ ├── onboarding.component.html │ │ ├── private-beta │ │ │ ├── private-beta.component.ts │ │ │ └── private-beta.component.html │ │ ├── onboarding.module.ts │ │ └── new-user │ │ │ ├── new-user.component.ts │ │ │ └── new-user.component.scss │ ├── app.actions.ts │ ├── app.component.html │ ├── app.selectors.ts │ ├── app.state.ts │ └── app.effects.ts ├── favicon.ico ├── styles.scss ├── core │ ├── web3 │ │ ├── transaction.model.ts │ │ ├── web3.state.ts │ │ └── web3.module.ts │ ├── player │ │ ├── army │ │ │ ├── player-army.state.ts │ │ │ ├── player-army.actions.ts │ │ │ └── player-army.reducer.ts │ │ ├── assets │ │ │ ├── units │ │ │ │ ├── player-unit.model.ts │ │ │ │ ├── player-units.state.ts │ │ │ │ ├── player-units.reducer.ts │ │ │ │ ├── player-units.actions.ts │ │ │ │ └── player-units.service.ts │ │ │ └── buildings │ │ │ │ ├── player-building.model.ts │ │ │ │ ├── player-buildings.state.ts │ │ │ │ ├── player-buildings.reducer.ts │ │ │ │ ├── player-buildings.service.ts │ │ │ │ └── player-buildings.actions.ts │ │ ├── resources │ │ │ ├── player-resources.model.ts │ │ │ ├── player-resources.state.ts │ │ │ └── player-resources.actions.ts │ │ ├── targets │ │ │ ├── player-target.model.ts │ │ │ ├── player-targets.state.ts │ │ │ ├── player-targets.reducer.ts │ │ │ └── player-targets.service.ts │ │ ├── tokens │ │ │ ├── player-tokens.state.ts │ │ │ ├── player-tokens.reducer.ts │ │ │ └── player-tokens.actions.ts │ │ ├── village │ │ │ ├── player-village.state.ts │ │ │ ├── village-info.model.ts │ │ │ └── player-village.reducer.ts │ │ └── battle │ │ │ ├── player-battle.model.ts │ │ │ └── player-battle.state.ts │ ├── shared │ │ ├── util │ │ │ ├── helpers.ts │ │ │ ├── type.ts │ │ │ └── get-web3.ts │ │ └── status.model.ts │ └── assets │ │ ├── buildings │ │ ├── queue │ │ │ ├── queue-building.model.ts │ │ │ └── buildings-queue.state.ts │ │ └── data │ │ │ ├── buildings-data.state.ts │ │ │ ├── buildings-data.service.ts │ │ │ ├── buildings-data.reducer.ts │ │ │ ├── buildings-data.actions.ts │ │ │ └── data-building.model.ts │ │ ├── units │ │ ├── queue │ │ │ ├── queue-unit.model.ts │ │ │ ├── units-queue.state.ts │ │ │ ├── units-queue.reducer.ts │ │ │ └── units-queue.actions.ts │ │ └── data │ │ │ ├── units-data.state.ts │ │ │ ├── data-unit.model.ts │ │ │ ├── units-data.reducer.ts │ │ │ ├── units-data.actions.ts │ │ │ ├── units-data.service.ts │ │ │ └── units-data.effects.ts │ │ ├── requirements │ │ ├── assets-requirements.state.ts │ │ ├── assets-requirements.service.ts │ │ ├── assets-requirements.actions.ts │ │ ├── assets-requirements.reducer.ts │ │ └── assets-requirements.effects.ts │ │ └── assets.module.ts ├── typings.d.ts ├── tsconfig.app.json ├── main.ts ├── tsconfig.spec.json ├── environments │ ├── environment.poa.ts │ ├── environment.prod.ts │ ├── environment.ts │ └── environment.private.ts ├── index.html ├── test.ts ├── redirect-cryptowars-jp.html └── redirect-alpha-cryptowars-jp.html ├── data ├── test │ ├── buildings │ │ ├── barracks.json │ │ ├── portal.json │ │ ├── crystal_mine.json │ │ ├── gold_factory.json │ │ ├── gold_mine.json │ │ ├── gold_storage.json │ │ ├── crystal_factory.json │ │ ├── crystal_storage.json │ │ └── city_center.json │ ├── points.json │ ├── battle.json │ ├── resources.json │ └── units.json ├── preICO.json ├── production │ ├── points.json │ ├── battle.json │ ├── resources.json │ ├── buildings │ │ ├── gold_mine.json │ │ ├── portal.json │ │ ├── crystal_mine.json │ │ ├── gold_storage.json │ │ ├── crystal_storage.json │ │ ├── barracks.json │ │ ├── gold_factory.json │ │ ├── crystal_factory.json │ │ └── city_center.json │ └── units.json ├── contributors.sample.json └── contracts.json ├── .gitattributes ├── box-img-lg.png ├── box-img-sm.png ├── migrations └── 1_initial_migration.js ├── test ├── helpers │ ├── evmMine.js │ ├── initializeContracts.js │ ├── assertThrow.js │ ├── isVersioned.js │ ├── setContractsTest.js │ └── getParams.js └── VersionedTest.js ├── .solcover.js ├── .editorconfig ├── e2e ├── tsconfig.e2e.json ├── app.po.ts └── app.e2e-spec.ts ├── mocks ├── deploy-config.sample.json └── populate-poa-environment.sample.json ├── patch.js ├── scripts ├── full-node-private.sh ├── full-node.sh └── update-buildings.js ├── tsconfig.json ├── contracts ├── Migrations.sol ├── token │ └── ExperimentalToken.sol └── Versioned.sol ├── .travis.yml ├── protractor.conf.js ├── .gitignore ├── karma.conf.js ├── truffle.js └── CHANGELOG.md /src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/test/buildings/barracks.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/test/buildings/portal.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/test/buildings/crystal_mine.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/test/buildings/gold_factory.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/test/buildings/gold_mine.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/test/buildings/gold_storage.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/test/buildings/crystal_factory.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/test/buildings/crystal_storage.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.sol linguist-language=Solidity 2 | -------------------------------------------------------------------------------- /src/app/+admin/admin.component.scss: -------------------------------------------------------------------------------- 1 | .admin-container { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /src/app/+trades/trades.component.scss: -------------------------------------------------------------------------------- 1 | .trades-container { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /src/app/+assets/+defense/defense.component.scss: -------------------------------------------------------------------------------- 1 | .defense-container { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /src/app/+assets/+units/units.component.scss: -------------------------------------------------------------------------------- 1 | .units-container { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /src/app/+assets/+research/research.component.scss: -------------------------------------------------------------------------------- 1 | .research-container { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /src/app/shared/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from './abstract-container.component'; 2 | -------------------------------------------------------------------------------- /box-img-lg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/e11-io/crypto-wars-solidity/HEAD/box-img-lg.png -------------------------------------------------------------------------------- /box-img-sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/e11-io/crypto-wars-solidity/HEAD/box-img-sm.png -------------------------------------------------------------------------------- /src/app/+assets/+buildings/buildings.component.scss: -------------------------------------------------------------------------------- 1 | .buildings-container { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/e11-io/crypto-wars-solidity/HEAD/src/favicon.ico -------------------------------------------------------------------------------- /src/styles.scss: -------------------------------------------------------------------------------- 1 | @import 'assets/e11-theme/theme'; 2 | 3 | @include e11-default-theme(); 4 | -------------------------------------------------------------------------------- /src/app/+trades/trades.component.html: -------------------------------------------------------------------------------- 1 |
8 | {{'APPWIDE.MOBILE.text' | translate}} 9 |
10 |8 | {{'APPWIDE.TAKING-TO-LONG.text' | translate}}{{'APPWIDE.TAKING-TO-LONG.guide' | translate}} 9 |
10 |
4 |
5 | 33 | If you are not redirected automatically, follow this link to cryptowars.jp. 34 |
35 | 36 | 37 | -------------------------------------------------------------------------------- /src/app/+dashboard/village-logs/village-logs.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, EventEmitter, Output } from '@angular/core'; 2 | import { Router } from "@angular/router"; 3 | import { Store } from '@ngrx/store'; 4 | import { BattleDetail } from '../../../core/player/battle/battle-detail.model'; 5 | import { PlayerBattleActions } from '../../../core/player/battle/player-battle.actions'; 6 | 7 | import { getCurrentBlockFromStore } from '../../shared/util/helpers'; 8 | 9 | @Component({ 10 | selector: 'e11-village-logs', 11 | templateUrl: './village-logs.component.html', 12 | styleUrls: ['./village-logs.component.scss'] 13 | }) 14 | 15 | export class VillageLogsComponent { 16 | 17 | @Input() battleDetails: BattleDetail[] = []; 18 | @Output() logClicked: EventEmitter33 | If you are not redirected automatically, follow this link to alpha.cryptowars.jp. 34 |
35 | 36 | 37 | -------------------------------------------------------------------------------- /src/app/+assets/assets.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; 3 | import { FormsModule } from '@angular/forms'; 4 | import { RouterModule } from "@angular/router"; 5 | import { TranslateModule } from "@ngx-translate/core"; 6 | 7 | import { AssetsComponent } from './assets.component'; 8 | import { BuildingsComponent } from './+buildings/buildings.component'; 9 | import { DefenseComponent } from './+defense/defense.component'; 10 | import { QueueNavbarComponent } from './queue-navbar/queue-navbar.component'; 11 | import { ResearchComponent } from './+research/research.component'; 12 | import { UnitsComponent } from './+units/units.component'; 13 | 14 | import { PipesModule } from '../shared/pipes/pipes.module'; 15 | 16 | @NgModule({ 17 | imports: [ 18 | CommonModule, 19 | FormsModule, 20 | RouterModule, 21 | TranslateModule, 22 | PipesModule 23 | ], 24 | declarations: [ 25 | AssetsComponent, 26 | BuildingsComponent, 27 | DefenseComponent, 28 | QueueNavbarComponent, 29 | ResearchComponent, 30 | UnitsComponent, 31 | ], 32 | exports: [ 33 | ], 34 | schemas: [CUSTOM_ELEMENTS_SCHEMA] 35 | }) 36 | export class AssetsModule { 37 | } 38 | -------------------------------------------------------------------------------- /src/core/shared/util/get-web3.ts: -------------------------------------------------------------------------------- 1 | import Web3 from 'web3'; 2 | 3 | let getWeb3 = new Promise((resolve, reject) => { 4 | // Wait for loading completion to avoid race conditions with web3 injection timing. 5 | window.addEventListener('load', () => { 6 | var results; 7 | var web3 = window['web3']; 8 | 9 | // Checking if Web3 has been injected by the browser (Mist/MetaMask) 10 | if (typeof web3 !== 'undefined') { 11 | // Use Mist/MetaMask's provider.; 12 | web3 = new Web3(web3.currentProvider); 13 | 14 | results = { 15 | web3: web3 16 | }; 17 | 18 | console.log('Injected web3 detected.'); 19 | 20 | resolve(results); 21 | } else { 22 | // TODO Remove force direct web3 provider 23 | resolve('no_web3_provider'); 24 | /* 25 | // Fallback to localhost if no web3 injection. 26 | // We've configured this to use the development console's port by default. 27 | var provider = new Web3.providers.HttpProvider('http://localhost:9545'); 28 | 29 | web3 = new Web3(provider); 30 | 31 | results = { 32 | web3: web3 33 | }; 34 | 35 | console.log('No web3 instance injected, using Local web3.'); 36 | 37 | resolve(results); 38 | */ 39 | } 40 | }) 41 | }) 42 | 43 | export default getWeb3; 44 | -------------------------------------------------------------------------------- /src/app/+dashboard/village-info/village-info.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core'; 2 | import { Router } from '@angular/router'; 3 | 4 | import { PlayerResourcesState } from '../../../core/player/resources/player-resources.state'; 5 | 6 | import { Building } from '../../shared/models/building.model'; 7 | import { UnitMap } from '../../shared/models/unit.model'; 8 | 9 | @Component({ 10 | selector: 'e11-village-info', 11 | templateUrl: './village-info.component.html', 12 | styleUrls: ['./village-info.component.scss'] 13 | }) 14 | 15 | export class VillageInfoComponent implements OnChanges { 16 | @Input() unitsMap: UnitMap = {}; 17 | @Input() playerResources: PlayerResourcesState; 18 | @Input() ownedBuildings: Building[] = []; 19 | @Input() playerBalance: number; 20 | @Input() villageName: string; 21 | 22 | @Output() navigateTo: EventEmitter