Skip to content

Commit

Permalink
Merge pull request #254 from zelcash/development
Browse files Browse the repository at this point in the history
v1.13.3
  • Loading branch information
TheTrunk authored Apr 5, 2021
2 parents f6498ce + 9ed1f85 commit 5f5c962
Show file tree
Hide file tree
Showing 10 changed files with 142 additions and 33 deletions.
8 changes: 4 additions & 4 deletions ZelFront/src/components/Admin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ export default {
.then((daemonResponse) => {
console.log(daemonResponse);
const daemonVersion = daemonResponse.data.data.version;
axios.get('https://zelcore.io/flux/daemoninfo.php')
axios.get('https://raw.githubusercontent.com/zelcash/zelflux/master/helpers/daemoninfo.json')
.then((response) => {
console.log(response);
if (response.data.version !== daemonVersion) {
Expand Down Expand Up @@ -939,7 +939,7 @@ export default {
.then((benchmarkResponse) => {
console.log(benchmarkResponse);
const benchmarkVersion = benchmarkResponse.data.data.version;
axios.get('https://zelcore.io/flux/benchmarkinfo.php')
axios.get('https://raw.githubusercontent.com/zelcash/zelflux/master/helpers/benchmarkinfo.json')
.then((response) => {
console.log(response);
if (response.data.version !== benchmarkVersion) {
Expand Down Expand Up @@ -1182,7 +1182,7 @@ export default {
.then((daemonResponse) => {
console.log(daemonResponse);
const daemonVersion = daemonResponse.data.data.version;
axios.get('https://zelcore.io/flux/daemoninfo.php')
axios.get('https://raw.githubusercontent.com/zelcash/zelflux/master/helpers/daemoninfo.json')
.then((response) => {
console.log(response);
if (response.data.version !== daemonVersion) {
Expand All @@ -1206,7 +1206,7 @@ export default {
.then((benchmarkResponse) => {
console.log(benchmarkResponse);
const benchmarkVersion = benchmarkResponse.data.data.version;
axios.get('https://zelcore.io/flux/benchmarkinfo.php')
axios.get('https://raw.githubusercontent.com/zelcash/zelflux/master/helpers/benchmarkinfo.json')
.then((response) => {
console.log(response);
if (response.data.version !== benchmarkVersion) {
Expand Down
2 changes: 1 addition & 1 deletion ZelFront/src/components/Benchmark.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
Benchmarking: {{ callResponse.data.benchmarking }}
</p>
<p>
Flux: {{ callResponse.data.zelback }}
Flux: {{ callResponse.data.zelback || callResponse.data.flux }}
</p>
</div>
</div>
Expand Down
130 changes: 120 additions & 10 deletions ZelFront/src/components/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@
>
<div id="priceChart" />
<br><br>
<h2>Rewards After April 10th(Miners 50%/50% Flux Nodes)</h2>
<br><br>
<div class="gridThree">
<div>
<h2>Cumulus Rewards</h2>
Expand All @@ -159,8 +161,8 @@
<h4>{{ beautifyValue(basicUSDRewardWeek * 4.34812141) }} USD</h4>
<h4 style="visibility: hidden">No KDA available</h4>
<br><br>
<h3>Profitability per month - Node Cost 6 USD</h3>
<h4>Node only: {{ beautifyValue(superUSDRewardWeek * 4.34812141 - 6) }} USD</h4>
<h3>Profitability per month - Node Cost 4.70 USD</h3>
<h4>Node only: {{ beautifyValue(basicUSDRewardWeek * 4.34812141 - 4.70) }} USD</h4>
<h4 style="visibility: hidden">No KDA available</h4>
<br>
</div>
Expand Down Expand Up @@ -211,6 +213,80 @@
<br>
</div>
</div>
<br><br>
<h2>Rewards Until April 10th (Miners 75%/25% Flux Nodes)</h2>
<br><br>
<div class="gridThree">
<div>
<h2>Cumulus Rewards</h2>
<br><br>
<h3>per day</h3>
<h4>{{ beautifyValue(beforeForkbasicWeek / 7 ) }} FLUX</h4>
<h4>{{ beautifyValue(beforeForkbasicUSDRewardWeek / 7) }} USD</h4>
<h4 style="visibility: hidden">No KDA available</h4>
<br><br>
<h3>per week</h3>
<h4>{{ beautifyValue(beforeForkbasicWeek) }} FLUX</h4>
<h4>{{ beautifyValue(beforeForkbasicUSDRewardWeek) }} USD</h4>
<h4 style="visibility: hidden">No KDA available</h4>
<br><br>
<h3>per month</h3>
<h4>{{ beautifyValue(beforeForkbasicWeek * 4.34812141) }} FLUX</h4>
<h4>{{ beautifyValue(beforeForkbasicUSDRewardWeek * 4.34812141) }} USD</h4>
<h4 style="visibility: hidden">No KDA available</h4>
<br><br>
<h3>Profitability per month - Node Cost 4.70 USD</h3>
<h4>Node only: {{ beautifyValue(beforeForkbasicUSDRewardWeek * 4.34812141 - 4.70) }} USD</h4>
<h4 style="visibility: hidden">No KDA available</h4>
<br>
</div>
<div>
<h2>Nimbus Rewards</h2>
<br><br>
<h3>per day</h3>
<h4>{{ beautifyValue(beforeForksuperWeek / 7) }} FLUX ~ {{ beautifyValue(beforeForksuperUSDRewardWeek / 7) }} USD</h4>
<h4>{{ beautifyValue(kdaNimbusWeek / 7) }} KDA ~ {{ beautifyValue(superUSDKDARewardWeek / 7) }} USD</h4>
<h4>{{ beautifyValue((beforeForksuperUSDRewardWeek / 7) + (superUSDKDARewardWeek / 7)) }} USD</h4>
<br><br>
<h3>per week</h3>
<h4>{{ beautifyValue(beforeForksuperWeek) }} FLUX ~ {{ beautifyValue(beforeForksuperUSDRewardWeek) }} USD</h4>
<h4>{{ beautifyValue(kdaNimbusWeek) }} KDA ~ {{ beautifyValue(superUSDKDARewardWeek) }} USD</h4>
<h4>{{ beautifyValue((beforeForksuperUSDRewardWeek) + (superUSDKDARewardWeek)) }} USD</h4>
<br><br>
<h3>per month</h3>
<h4>{{ beautifyValue(beforeForksuperWeek * 4.34812141) }} FLUX ~ {{ beautifyValue(beforeForksuperUSDRewardWeek * 4.34812141) }} USD</h4>
<h4>{{ beautifyValue(kdaNimbusWeek * 4.34812141) }} KDA ~ {{ beautifyValue(superUSDKDARewardWeek * 4.34812141) }} USD</h4>
<h4>{{ beautifyValue((beforeForksuperUSDRewardWeek * 4.34812141) + (superUSDKDARewardWeek * 4.34812141)) }} USD</h4>
<br><br>
<h3>Profitability per month - Node Cost 6 USD</h3>
<h4>Node only: {{ beautifyValue(beforeForksuperUSDRewardWeek * 4.34812141 - 6) }} USD</h4>
<h4>With KDA: {{ beautifyValue((beforeForksuperUSDRewardWeek * 4.34812141) + (superUSDKDARewardWeek * 4.34812141) - 6) }} USD</h4>
<br>
</div>
<div>
<h2>Stratus Rewards</h2>
<br><br>
<h3>per day</h3>
<h4>{{ beautifyValue(beforeForkbamfWeek / 7 ) }} FLUX ~ {{ beautifyValue(beforeForkbamfUSDRewardWeek / 7) }} USD</h4>
<h4>{{ beautifyValue(kdaStratusWeek / 7 ) }} KDA ~ {{ beautifyValue(bamfUSDKDARewardWeek / 7) }} USD</h4>
<h4>{{ beautifyValue((beforeForkbamfUSDRewardWeek / 7) + (bamfUSDKDARewardWeek / 7)) }} USD</h4>
<br><br>
<h3>per week</h3>
<h4>{{ beautifyValue(beforeForkbamfWeek) }} FLUX ~ {{ beautifyValue(beforeForkbamfUSDRewardWeek) }} USD</h4>
<h4>{{ beautifyValue(kdaStratusWeek ) }} KDA ~ {{ beautifyValue(bamfUSDKDARewardWeek) }} USD</h4>
<h4>{{ beautifyValue((beforeForkbamfUSDRewardWeek) + (bamfUSDKDARewardWeek)) }} USD</h4>
<br><br>
<h3>per month</h3>
<h4>{{ beautifyValue(beforeForkbamfWeek * 4.34812141) }} FLUX ~ {{ beautifyValue(beforeForkbamfUSDRewardWeek * 4.34812141) }} USD</h4>
<h4>{{ beautifyValue(kdaStratusWeek * 4.34812141) }} KDA ~ {{ beautifyValue(bamfUSDKDARewardWeek * 4.34812141) }} USD</h4>
<h4>{{ beautifyValue((beforeForkbamfUSDRewardWeek * 4.34812141) + (bamfUSDKDARewardWeek * 4.34812141)) }} USD</h4>
<br><br>
<h3>Profitability per month - Node Cost 32 USD</h3>
<h4>Node only: {{ beautifyValue(beforeForkbamfUSDRewardWeek * 4.34812141 - 32) }} USD</h4>
<h4>With KDA: {{ beautifyValue((beforeForkbamfUSDRewardWeek * 4.34812141) + (bamfUSDKDARewardWeek * 4.34812141) - 18.1) }} USD</h4>
<br>
</div>
</div>
</el-tab-pane>
<el-tab-pane
label="List"
Expand Down Expand Up @@ -387,6 +463,14 @@ export default {
bamfUSDKDARewardWeek: 0,
kdaNimbusWeek: 0,
kdaStratusWeek: 0,
beforeForkbasicWeek: 0,
beforeForksuperWeek: 0,
beforeForkbamfWeek: 0,
beforeForkbasicUSDRewardWeek: 0,
beforeForksuperUSDRewardWeek: 0,
beforeForkbamfUSDRewardWeek: 0,
beforForkkdaNimbusWeek: 0,
beforForkkdaStratusWeek: 0,
};
},
computed: {
Expand Down Expand Up @@ -428,10 +512,10 @@ export default {
},
async getCircSupply() {
this.circSupplyLoading = true;
const result = await axios.get('https://explorer.zel.network/api/supply');
const result = await axios.get('https://explorer.runonflux.io/api/statistics/circulating-supply'); // we want just one chain
this.circulatingSupply = result.data;
this.circSupplyLoading = false;
this.circulatingSupplyPerc = Number(((this.circulatingSupply / 210000000) * 100).toFixed(2));
this.circulatingSupplyPerc = Number(((this.circulatingSupply / 440000000) * 100).toFixed(2));
this.ratesLoading = true;
const resultB = await axios.get('https://vipdrates.zelcore.io/rates');
this.rates = resultB.data;
Expand All @@ -441,7 +525,7 @@ export default {
async getHistoryStats() {
try {
this.historyStatsLoading = true;
const result = await axios.get('https://api.flux.zel.network/fluxhistorystats');
const result = await axios.get('https://stats.runonflux.io/fluxhistorystats');
this.fluxHistoryStats = result.data.data;
this.historyStatsLoading = false;
this.generateCPUHistory();
Expand Down Expand Up @@ -476,7 +560,7 @@ export default {
const bamfs = zelnodecounts['bamf-enabled'] || zelnodecounts['stratus-enabled'];
const supers = zelnodecounts['super-enabled'] || zelnodecounts['nimbus-enabled'];
const basics = zelnodecounts['basic-enabled'] || zelnodecounts['cumulus-enabled'];
const resKDAEligible = await axios.get('https://api.flux.zel.network/kadena/eligible/7');
const resKDAEligible = await axios.get('https://stats.runonflux.io/kadena/eligible/7');
const kdaData = resKDAEligible.data.data;
const kdaCoins = 5749.77;
const supersS = kdaData.filter((result) => (result.tier === 'SUPER' || result.tier === 'NIMBUS'));
Expand All @@ -486,9 +570,9 @@ export default {
const overallTotal = totalNimbuss + (4 * totalStratuss);
const perNimbusWeek = Number((kdaCoins / overallTotal).toFixed(4)); // KDA
const perStratusWeek = Number(((kdaCoins / overallTotal) * 4).toFixed(4)); // KDA
const perCumulusNode = 2.8125;
const perNimbusNode = 4.6875;
const perStratusNode = 11.25;
const perCumulusNode = 5.625;
const perNimbusNode = 9.375;
const perStratusNode = 22.5;
// eslint-disable-next-line no-mixed-operators
const basicWeek = perCumulusNode * 720 * 7 / basics;
// eslint-disable-next-line no-mixed-operators
Expand Down Expand Up @@ -518,6 +602,32 @@ export default {
this.kdaNimbusWeek = perNimbusWeek;
this.kdaStratusWeek = perStratusWeek;
const beforeForkperCumulusNode = 2.8125;
const beforeForkperNimbusNode = 4.6875;
const beforeForkperStratusNode = 11.25;
// eslint-disable-next-line no-mixed-operators
const beforeForkbasicWeek = beforeForkperCumulusNode * 720 * 7 / basics;
// eslint-disable-next-line no-mixed-operators
const beforeForksuperWeek = beforeForkperNimbusNode * 720 * 7 / supers;
// eslint-disable-next-line no-mixed-operators
const beforeForkbamfWeek = beforeForkperStratusNode * 720 * 7 / bamfs;
const beforeForkbasicUSDReward = this.getFiatRate('ZEL') * beforeForkperCumulusNode; // per one go
const beforeForksuperUSDReward = this.getFiatRate('ZEL') * beforeForkperNimbusNode; // per one go
const beforeForkbamfUSDReward = this.getFiatRate('ZEL') * beforeForkperStratusNode; // per one go
// 720 blocks per day.
// eslint-disable-next-line no-mixed-operators
const beforeForkbasicUSDRewardWeek = 7 * 720 * beforeForkbasicUSDReward / basics;
// eslint-disable-next-line no-mixed-operators
const beforeForksuperUSDRewardWeek = 7 * 720 * beforeForksuperUSDReward / supers;
// eslint-disable-next-line no-mixed-operators
const beforeForkbamfUSDRewardWeek = 7 * 720 * beforeForkbamfUSDReward / bamfs;
this.beforeForkbasicWeek = beforeForkbasicWeek;
this.beforeForksuperWeek = beforeForksuperWeek;
this.beforeForkbamfWeek = beforeForkbamfWeek;
this.beforeForkbasicUSDRewardWeek = beforeForkbasicUSDRewardWeek;
this.beforeForksuperUSDRewardWeek = beforeForksuperUSDRewardWeek;
this.beforeForkbamfUSDRewardWeek = beforeForkbamfUSDRewardWeek;
const self = this;
axios.get('https://api.coingecko.com/api/v3/coins/zelcash/market_chart?vs_currency=USD&days=30').then((res2) => {
self.historicalPrices = res2.data.prices.filter((a) => a[0] > 1483232400000); // min date from January 1, 2017 1:00:00 AM
Expand All @@ -530,7 +640,7 @@ export default {
async getFluxList() {
try {
this.fluxListLoading = true;
const resLoc = await axios.get('https://api.flux.zel.network/fluxlocations');
const resLoc = await axios.get('https://stats.runonflux.io/fluxlocations');
const locations = resLoc.data.data;
const resList = await DashboardService.listZelNodes();
const fluxList = resList.data.data;
Expand Down
10 changes: 5 additions & 5 deletions ZelFront/src/components/Node.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,39 +27,39 @@
<h4>
Added Height: <ElLink
type="primary"
:href="'https://explorer.zel.network/block-index/' + getNodeStatusResponse.data.added_height"
:href="'https://explorer.runonflux.io/block-index/' + getNodeStatusResponse.data.added_height"
target="_blank"
rel="noopener noreferrer"
>{{ getNodeStatusResponse.data.added_height }}</ElLink>
</h4>
<h4>
Confirmed Height: <ElLink
type="primary"
:href="'https://explorer.zel.network/block-index/' + getNodeStatusResponse.data.confirmed_height"
:href="'https://explorer.runonflux.io/block-index/' + getNodeStatusResponse.data.confirmed_height"
target="_blank"
rel="noopener noreferrer"
>{{ getNodeStatusResponse.data.confirmed_height }}</ElLink>
</h4>
<h4>
Last Confirmed Height: <ElLink
type="primary"
:href="'https://explorer.zel.network/block-index/' + getNodeStatusResponse.data.last_confirmed_height"
:href="'https://explorer.runonflux.io/block-index/' + getNodeStatusResponse.data.last_confirmed_height"
target="_blank"
rel="noopener noreferrer"
>{{ getNodeStatusResponse.data.last_confirmed_height }}</ElLink>
</h4>
<h4>
Last Paid Height: <ElLink
type="primary"
:href="'https://explorer.zel.network/block-index/' + getNodeStatusResponse.data.last_paid_height"
:href="'https://explorer.runonflux.io/block-index/' + getNodeStatusResponse.data.last_paid_height"
target="_blank"
rel="noopener noreferrer"
>{{ getNodeStatusResponse.data.last_paid_height }}</ElLink>
</h4>
<h4>
<ElLink
type="primary"
:href="'https://explorer.zel.network/tx/' + getNodeStatusResponse.data.txhash"
:href="'https://explorer.runonflux.io/tx/' + getNodeStatusResponse.data.txhash"
target="_blank"
rel="noopener noreferrer"
>Show Locked transaction</ElLink>
Expand Down
4 changes: 4 additions & 0 deletions helpers/benchmarkinfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"version": "2.0.0",
"rpcport": 16224
}
5 changes: 0 additions & 5 deletions helpers/benchmarkinfo.php

This file was deleted.

6 changes: 6 additions & 0 deletions helpers/daemoninfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"version": 5000050,
"protocolversion": 170017,
"walletversion": 60000
}

6 changes: 0 additions & 6 deletions helpers/daemoninfo.php

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flux",
"version": "1.13.2",
"version": "1.13.3",
"description": "Flux, Your Gateway to a Decentralized World",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion sampleDaemonConfig.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ logtimestamps=1
maxconnections=512
externalip=127.0.0.1
bind=127.0.0.1
addnode=explorer.zel.network
addnode=explorer.runonflux.io
addnode=explorer.flux.zelcore.io
addnode=explorer.zelcash.online

0 comments on commit 5f5c962

Please sign in to comment.