forked from solana-labs/solminer
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
4,027 additions
and
506 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
platform: | ||
- x64 | ||
|
||
environment: | ||
nodejs_version: "lts" | ||
GITHUB_TOKEN: | ||
secure: vRv9dttH4O8vr09RzhUdKxjM0v69auQc/oXG4/V9O6p+gr09D69Ochoa1pa/2+/I | ||
|
||
cache: | ||
- '%APPDATA%\npm-cache' | ||
- '%USERPROFILE%\.electron' | ||
- node_modules | ||
|
||
branches: | ||
only: | ||
- master | ||
- /^v\d+\.\d+\.\d+/ | ||
|
||
install: | ||
- ps: Install-Product node $env:nodejs_version $env:platform | ||
- set PATH=%APPDATA%\npm;%PATH% | ||
- npm install | ||
- npm update | ||
|
||
test_script: | ||
- node --version | ||
- npm --version | ||
- npm run lint | ||
- if %APPVEYOR_REPO_TAG% EQU false npm run make | ||
|
||
build_script: | ||
- IF %APPVEYOR_REPO_TAG% EQU true npm version %APPVEYOR_REPO_TAG_NAME% --no-git-tag-version | ||
- IF %APPVEYOR_REPO_TAG% EQU true npm run publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
extends: 'eslint-config-airbnb', | ||
rules: { | ||
'import/extensions': 0, | ||
'import/no-extraneous-dependencies': 0, | ||
'import/no-unresolved': [2, {ignore: ['electron']}], | ||
'linebreak-style': ['error', 'unix'], | ||
'object-curly-spacing': ['error', 'never'], | ||
'import/prefer-default-export': 0, | ||
'react/prefer-stateless-function': 0, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
node_modules | ||
out | ||
.eslintcache | ||
.eslintcache | ||
.DS_Store | ||
yarn-error.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
arrowParens: "avoid" | ||
bracketSpacing: false | ||
jsxBracketSameLine: false | ||
semi: true | ||
singleQuote: true | ||
tabWidth: 2 | ||
trailingComma: "all" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
language: node_js | ||
node_js: | ||
- node | ||
|
||
os: | ||
- linux | ||
- osx | ||
|
||
dist: trusty | ||
osx_image: xcode8.3 | ||
sudo: false | ||
|
||
notifications: | ||
email: false | ||
|
||
cache: | ||
yarn: true | ||
directories: | ||
- node_modules | ||
- $HOME/.cache/electron | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- fakeroot | ||
- rpm | ||
|
||
branches: | ||
only: | ||
- master | ||
- /^v\d+\.\d+\.\d+/ | ||
|
||
install: | ||
- npm install | ||
- npm update | ||
|
||
script: | ||
- npm run lint | ||
- if [ -z $TRAVIS_TAG ]; then | ||
if [ $TRAVIS_OS_NAME = linux ]; then | ||
npx semantic-release; | ||
fi; | ||
npm run make; | ||
else | ||
npm version $TRAVIS_TAG --no-git-tag-version; | ||
npm run publish; | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[![Travis build status][travis-image]][travis-url] | ||
[![Appveyor build status][appveyor-image]][appveyor-url] | ||
|
||
[travis-image]: https://travis-ci.org/solana-labs/solminer.svg?branch=master | ||
[travis-url]: https://travis-ci.org/solana-labs/solminer | ||
[appveyor-image]: https://ci.appveyor.com/api/projects/status/tcu6rndl1cf8klqn/branch/master?svg=true | ||
[appveyor-url]: https://ci.appveyor.com/project/solana-labs/solminer/history | ||
|
||
## Solminer | ||
Cross-platform Solana Replicator UI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module.exports = { | ||
make_targets: { | ||
win32: ['squirrel'], | ||
darwin: ['dmg'], | ||
linux: ['deb', 'rpm'], | ||
}, | ||
electronPackagerConfig: { | ||
packageManager: 'yarn', | ||
icon: 'src/images/icon/solminer', | ||
}, | ||
electronWinstallerConfig: { | ||
name: 'solminer', | ||
}, | ||
electronInstallerDMG: { | ||
icon: 'src/images/icon/solminer.icns', | ||
}, | ||
electronInstallerDebian: {}, | ||
electronInstallerRedhat: {}, | ||
github_repository: { | ||
owner: 'solana-labs', | ||
name: 'solminer', | ||
}, | ||
windowsStoreConfig: { | ||
packageName: '', | ||
name: 'solminer', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,53 @@ | ||
{ | ||
"name": "solminer", | ||
"productName": "solminer", | ||
"version": "1.0.0", | ||
"description": "My Electron application description", | ||
"version": "0.0.0-development", | ||
"description": "Solana Replicator Miner", | ||
"repository": "solana-labs/solminer", | ||
"main": "src/index.js", | ||
"scripts": { | ||
"start": "electron-forge start", | ||
"package": "electron-forge package", | ||
"make": "electron-forge make", | ||
"publish": "electron-forge publish", | ||
"lint": "eslint --cache --color --ext .jsx,.js src" | ||
"eslint": "eslint --cache --color --ext .jsx,.js .", | ||
"lint": "npm-run-all --serial pretty eslint", | ||
"pretty": "prettier --write **/*.jsx **/*.js *.js .*.js" | ||
}, | ||
"keywords": [], | ||
"author": "mvines", | ||
"author": "Solana Maintainers <[email protected]>", | ||
"license": "MIT", | ||
"config": { | ||
"forge": { | ||
"make_targets": { | ||
"win32": [ | ||
"squirrel" | ||
], | ||
"darwin": [ | ||
"zip" | ||
], | ||
"linux": [ | ||
"deb", | ||
"rpm" | ||
] | ||
}, | ||
"electronPackagerConfig": { | ||
"packageManager": "yarn" | ||
}, | ||
"electronWinstallerConfig": { | ||
"name": "solminer" | ||
}, | ||
"electronInstallerDebian": {}, | ||
"electronInstallerRedhat": {}, | ||
"github_repository": { | ||
"owner": "", | ||
"name": "" | ||
}, | ||
"windowsStoreConfig": { | ||
"packageName": "", | ||
"name": "solminer" | ||
} | ||
} | ||
"forge": "./forge.config.js" | ||
}, | ||
"dependencies": { | ||
"@solana/web3.js": "^0.16.2", | ||
"electron-compile": "^6.4.4", | ||
"electron-devtools-installer": "^2.1.0", | ||
"electron-squirrel-startup": "^1.0.0", | ||
"react": "^15.4.1", | ||
"react-dom": "^15.4.1", | ||
"react-hot-loader": "^3.0.0-beta.6" | ||
"npm-run-all": "^4.1.5", | ||
"react": "^16.8.6", | ||
"react-dom": "^16.8.6", | ||
"react-hot-loader": "^4.11.0", | ||
"update-electron-app": "^1.4.2" | ||
}, | ||
"devDependencies": { | ||
"@semantic-release/github": "^5.4.0", | ||
"babel-plugin-transform-async-to-generator": "^6.24.1", | ||
"babel-plugin-transform-es2015-classes": "^6.24.1", | ||
"babel-preset-env": "^1.7.0", | ||
"babel-preset-react": "^6.24.1", | ||
"electron-forge": "^5.2.4", | ||
"electron-prebuilt-compile": "4.0.0", | ||
"eslint": "^3", | ||
"eslint": "^4", | ||
"eslint-config-airbnb": "^15", | ||
"eslint-plugin-import": "^2", | ||
"eslint-plugin-jsx-a11y": "^5", | ||
"eslint-plugin-react": "^7" | ||
"eslint-plugin-react": "^7", | ||
"prettier": "^1.18.2", | ||
"semantic-release": "^15.13.16" | ||
}, | ||
"optionalDependencies": { | ||
"appdmg": "^0.6.0" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
plugins: [ | ||
'@semantic-release/commit-analyzer', | ||
'@semantic-release/release-notes-generator', | ||
[ | ||
'@semantic-release/github', | ||
{ | ||
assets: [], | ||
}, | ||
], | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,44 @@ | ||
/* eslint no-console: "off" */ | ||
import React from 'react'; | ||
import {Connection} from '@solana/web3.js'; | ||
import {url} from './url'; | ||
|
||
const connection = new Connection(url); | ||
console.log('connection:', url); | ||
|
||
export default class App extends React.Component { | ||
constructor() { | ||
super(); | ||
this.state = { | ||
transactionCount: null, | ||
}; | ||
} | ||
|
||
componentDidMount() { | ||
this.id = setInterval(() => this.updateTransactionCount(), 1000); | ||
} | ||
|
||
componentWillUnmount() { | ||
clearInterval(this.id); | ||
} | ||
|
||
async updateTransactionCount() { | ||
try { | ||
const transactionCount = await connection.getTransactionCount(); | ||
this.setState({transactionCount}); | ||
} catch (err) { | ||
console.log('updateTransactionCount failed', err); | ||
} | ||
} | ||
|
||
render() { | ||
return (<div> | ||
<h2>Welcome to React!</h2> | ||
</div>); | ||
return ( | ||
<div style={{textAlign: 'center'}}> | ||
<br /> | ||
<h2>Coming soon...</h2> | ||
<p /> | ||
Transaction count: {this.state.transactionCount} | ||
</div> | ||
); | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// @noflow | ||
|
||
import {testnetChannelEndpoint} from '@solana/web3.js'; | ||
|
||
export const url = !process.env.LOCAL | ||
? testnetChannelEndpoint(process.env.CHANNEL || 'stable') | ||
: 'http://localhost:8899'; |
Oops, something went wrong.