diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 523844872..d57cbb924 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,7 @@ variables: DOCKER_DRIVER: overlay2 DEFAULT_CLI_BRANCH: dev DEFAULT_EASYDEXGUI_BRANCH: dev - AGAMA_VERSION: 0.3.13c + AGAMA_VERSION: 0.4.0 EASYDEX_GUI_BUILD: build.tar.gz ELECTRON_BUILD_LINUX: Agama-linux-x64 ELECTRON_BUILD_WINDOWS: Agama-win32-x64 @@ -15,7 +15,13 @@ variables: AGAMA_WINDOWS: ${ELECTRON_BUILD_WINDOWS}-v${AGAMA_VERSION}-beta.zip AGAMA_MACOS: Agama-MacOS-v${AGAMA_VERSION}-beta GIT_SUBMODULE_STRATEGY: recursive - POST_COMMENT: "$\n Agama Branch and Commit: ${CI_COMMIT_REF_NAME} $\n${CI_COMMIT_SHA} $\nMD5: " + POST_COMMENT: "Source: ${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}\n + Pipeline Trigger: ${CI_PIPELINE_SOURCE}\n + Commit: ${CI_COMMIT_SHA}$\n + Author: ${GITLAB_USER_NAME} <${GITLAB_USER_EMAIL}>\n + ${CI_COMMIT_MESSAGE}" + + build:linux: image: asherd/agama-builder stage: build @@ -45,6 +51,11 @@ build:linux: - npm run package-linux - cd build - tar -czf $AGAMA_LINUX $ELECTRON_BUILD_LINUX + - curl -F file=@"$AGAMA_LINUX" + -F channels="$AGAMA_POST_CHANNEL" + -F initial_comment="${POST_COMMENT}" + -H "${SLACK_BOT_AUTH}" + "https://slack.com/api/files.upload" - mv $AGAMA_LINUX .. artifacts: paths: [$AGAMA_LINUX] @@ -80,6 +91,11 @@ build:windows: - npm run package-win - cd build - zip -r $AGAMA_WINDOWS $ELECTRON_BUILD_WINDOWS + - curl -F file=@"$AGAMA_WINDOWS" + -F channels="$AGAMA_POST_CHANNEL" + -F initial_comment="${POST_COMMENT}" + -H "${SLACK_BOT_AUTH}" + "https://slack.com/api/files.upload" - mv $AGAMA_WINDOWS .. artifacts: paths: [$AGAMA_WINDOWS] @@ -108,6 +124,11 @@ build:mac: - npm install electron-packager -g - npm run package-mac - npm run create-installer-mac + - curl -F file=@"$AGAMA_MACOS.dmg" + -F channels="$AGAMA_POST_CHANNEL" + -F initial_comment="${POST_COMMENT}" + -H "${SLACK_BOT_AUTH}" + "https://slack.com/api/files.upload" artifacts: paths: [$AGAMA_MACOS.dmg] expire_in: 1 week @@ -120,26 +141,7 @@ deploy: - build:linux - build:windows - build:mac - before_script: - - export AGAMA_LINUX_MD5=$(md5sum $AGAMA_LINUX | cut -d " " -f 1) - - export AGAMA_WINDOWS_MD5=$(md5sum $AGAMA_WINDOWS | cut -d " " -f 1) - - export AGAMA_MACOS_MD5=$(md5sum $AGAMA_MACOS.dmg | cut -d " " -f 1) script: - - curl -F file=@"$AGAMA_LINUX" - -F channels="$AGAMA_POST_CHANNEL" - -F initial_comment="${POST_COMMENT} $AGAMA_LINUX_MD5" - -H "${SLACK_BOT_AUTH}" - "https://slack.com/api/files.upload" - - curl -F file=@"$AGAMA_WINDOWS" - -F channels="$AGAMA_POST_CHANNEL" - -F initial_comment="${POST_COMMENT} $AGAMA_WINDOWS_MD5" - -H "${SLACK_BOT_AUTH}" - "https://slack.com/api/files.upload" - - curl -F file=@"$AGAMA_MACOS.dmg" - -F channels="$AGAMA_POST_CHANNEL" - -F initial_comment="${POST_COMMENT} $AGAMA_MACOS_MD5" - -H "${SLACK_BOT_AUTH}" - "https://slack.com/api/files.upload" - mkdir -p $CI_COMMIT_REF_NAME/Windows - mkdir -p $CI_COMMIT_REF_NAME/Linux - mkdir -p $CI_COMMIT_REF_NAME/MacOS diff --git a/package-lock.json b/package-lock.json index 402462f6a..b3aabe549 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "agama-app", - "version": "0.3.13", + "version": "0.3.19", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ddb2706a8..e4eda4b05 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "agama-app", "productName": "Agama", - "version": "0.3.13", + "version": "0.4.0", "description": "Agama Wallet Desktop App", "main": "main.js", "scripts": { diff --git a/routes/appConfig.js b/routes/appConfig.js index cb2445ac0..78f1eb0b1 100644 --- a/routes/appConfig.js +++ b/routes/appConfig.js @@ -12,6 +12,8 @@ const appConfig = { experimentalFeatures: false, dataDir: '', autoStartVRSC: false, + autoStakeVRSC: false, + cheatCatcher: '', dex: { walletUnlockTimeout: 3600, }, @@ -91,6 +93,18 @@ const appConfig = { displayName: 'Automatically start VerusCoin on launch in native mode', type: 'boolean', }, + autoStakeVRSC: { + display: true, + initDisplay: true, + displayName: 'Automatically start staking VerusCoin when it is launched in native mode', + type: 'boolean', + }, + cheatCatcher: { + display: true, + info: 'As part of the VerusCoin Something at Stake solution, you can enter a Verus sapling address in this field, so when you catch them, you get their staking reward. Dont forget to thank them ;)', + displayName: 'Your VRSC sapling address for receiving funds cheaters attempt to steal', + type: 'string', + }, dataDir: { display: true, initDisplay: true, diff --git a/routes/shepherd/addCoinShortcuts.js b/routes/shepherd/addCoinShortcuts.js index a3364f993..a22cfd1d2 100644 --- a/routes/shepherd/addCoinShortcuts.js +++ b/routes/shepherd/addCoinShortcuts.js @@ -102,7 +102,7 @@ module.exports = (shepherd) => { httpRequest(); } else if (selection === 'VRSC') { - herdData = { + herdData = { 'ac_name': 'VRSC', 'ac_options': [ '-ac_algo=verushash', @@ -117,13 +117,22 @@ module.exports = (shepherd) => { '-ac_timeunlockfrom=129600', '-ac_timeunlockto=1180800', '-ac_veruspos=50', - '-gen', - '-genproclimit=0' ] - }; + }; + + //Checking for VRSC specific config commands + if(shepherd.appConfig.autoStakeVRSC) { + herdData['ac_options'].push('-mint'); + console.log('VRSC Staking set to default'); + } + if(shepherd.appConfig.cheatCatcher.length === 78) { + herdData['ac_options'].push('-cheatcatcher=' + shepherd.appConfig.cheatCatcher); + console.log('Cheatcatching enabled at address ' + shepherd.appConfig.cheatCatcher); + } + httpRequest(); - } else { + } else { const herdData = [{ 'ac_name': 'komodod', 'ac_options': [ diff --git a/routes/shepherd/dashboardUpdate.js b/routes/shepherd/dashboardUpdate.js index 2b298e357..cd60eb7ec 100644 --- a/routes/shepherd/dashboardUpdate.js +++ b/routes/shepherd/dashboardUpdate.js @@ -100,7 +100,8 @@ module.exports = (shepherd) => { if (isNewAddr && (allAddrArray[a].substring(0, 2) === 'zc' || - allAddrArray[a].substring(0, 2) === 'zt')) { + allAddrArray[a].substring(0, 2) === 'zt' || + allAddrArray[a].substring(0, 2) === 'zs')) { result[1][result[1].length] = allAddrArray[a]; } else { result[0][result[0].length] = allAddrArray[a]; diff --git a/routes/shepherd/downloadZcparams.js b/routes/shepherd/downloadZcparams.js index 4236952e5..dd6ef0555 100644 --- a/routes/shepherd/downloadZcparams.js +++ b/routes/shepherd/downloadZcparams.js @@ -4,17 +4,12 @@ const Promise = require('bluebird'); module.exports = (shepherd) => { shepherd.zcashParamsDownloadLinks = { - 'agama.komodoplatform.com': { - proving: 'https://agama.komodoplatform.com/file/supernet/sprout-proving.key', - verifying: 'https://agama.komodoplatform.com/file/supernet/sprout-verifying.key', - }, - 'agama-yq0ysrdtr.stackpathdns.com': { - proving: 'http://agama-yq0ysrdtr.stackpathdns.com/file/supernet/sprout-proving.key', - verifying: 'http://agama-yq0ysrdtr.stackpathdns.com/file/supernet/sprout-verifying.key', - }, - 'zcash.dl.mercerweiss.com': { - proving: 'https://zcash.dl.mercerweiss.com/sprout-proving.key', - verifying: 'https://zcash.dl.mercerweiss.com/sprout-verifying.key', + 'z.cash': { + proving: 'https://z.cash/downloads/sprout-proving.key', + verifying: 'https://z.cash/downloads/sprout-verifying.key', + spend: 'https://z.cash/downloads/sapling-spend.params', + output: 'https://z.cash/downloads/sapling-output.params', + groth16: 'https://z.cash/downloads/sprout-groth16.params' }, }; @@ -25,12 +20,18 @@ module.exports = (shepherd) => { provingKeySize: false, verifyingKey: _fs.existsSync(`${shepherd.zcashParamsDir}/sprout-verifying.key`), verifyingKeySize: false, + spend: _fs.existsSync(`${shepherd.zcashParamsDir}/sapling-spend.params`), + output: _fs.existsSync(`${shepherd.zcashParamsDir}/sapling-output.params`), + groth16: _fs.existsSync(`${shepherd.zcashParamsDir}/sprout-groth16.params`), errors: false, }; if (_checkList.rootDir && - _checkList.provingKey || - _checkList.verifyingKey) { + _checkList.provingKey && + _checkList.verifyingKey && + _checkList.spend && + _checkList.output && + _checkList.groth16) { // verify each key size const _provingKeySize = _checkList.provingKey ? fs.lstatSync(`${shepherd.zcashParamsDir}/sprout-proving.key`) : 0; const _verifyingKeySize = _checkList.verifyingKey ? fs.lstatSync(`${shepherd.zcashParamsDir}/sprout-verifying.key`) : 0; @@ -51,7 +52,10 @@ module.exports = (shepherd) => { !_checkList.provingKey || !_checkList.verifyingKey || !_checkList.provingKeySize || - !_checkList.verifyingKeySize) { + !_checkList.verifyingKeySize || + !_checkList.spend || + !_checkList.output || + !_checkList.groth16) { _checkList.errors = true; } @@ -86,7 +90,9 @@ module.exports = (shepherd) => { for (let key in shepherd.zcashParamsDownloadLinks[dlOption]) { shepherd.downloadFile({ remoteFile: shepherd.zcashParamsDownloadLinks[dlOption][key], - localFile: `${dlLocation}/sprout-${key}.key`, + localFile: key === 'spend' || key === 'output' ? + `${dlLocation}/sapling-${key}.params` : + (key === 'groth16' ? `${dlLocation}/sprout-${key}.params` : `${dlLocation}/sprout-${key}.key`), onProgress: (received, total) => { const percentage = (received * 100) / total; diff --git a/routes/shepherd/electrum/keys.js b/routes/shepherd/electrum/keys.js index 10ebbf3b4..f7247fe51 100644 --- a/routes/shepherd/electrum/keys.js +++ b/routes/shepherd/electrum/keys.js @@ -151,6 +151,9 @@ module.exports = (shepherd) => { if (network === 'VRSC'){ return true; } + if (network === 'VERUSTEST'){ + return true; + } else { try { const _b58check = shepherd.isZcash(network.toLowerCase()) ? bitcoinZcash.address.fromBase58Check(address) : bitcoin.address.fromBase58Check(address); diff --git a/version b/version index feaf9d408..4b76564a5 100644 --- a/version +++ b/version @@ -1,5 +1,5 @@ -version=0.3.13c +version=0.4.0 type=beta -minversion=0.3.13c +minversion=0.4.0 diff --git a/version_build b/version_build index 154add88c..67c334ebf 100644 --- a/version_build +++ b/version_build @@ -1,3 +1,3 @@ -0.3.13c-beta +0.4.0-beta