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
// https://codeakk.medium.com/hex-development-data-a1b1822446fa | |
// https://togosh.medium.com/hex-developer-guide-3b018a943a55 | |
// https://en.wikipedia.org/wiki/Weighted_arithmetic_mean#Mathematical_definition | |
test(); | |
async function test(){ | |
var { averageStakeLength, currentStakerCount } = await get_stakeStartData(); | |
console.log("Weighted Average Stake Length: " + averageStakeLength); | |
console.log("Current Staker Count: " + currentStakerCount); |
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
// https://codeakk.medium.com/hex-development-data-a1b1822446fa | |
// https://togosh.medium.com/hex-developer-guide-3b018a943a55 | |
test(); | |
async function test(){ | |
var { stakedSupply } = await get_stakeStartData(); | |
console.log("Staked Supply: " + Number(stakedSupply).toLocaleString(undefined, {minimumFractionDigits:0, maximumFractionDigits: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
// https://codeakk.medium.com/hex-development-data-a1b1822446fa | |
// https://togosh.medium.com/hex-developer-guide-3b018a943a55 | |
test(); | |
async function test(){ | |
var { circulatingSupply, currentHolders } = await get_tokenHoldersData(); | |
console.log("Circulating Supply: " + Number(circulatingSupply).toLocaleString(undefined, {minimumFractionDigits:0, maximumFractionDigits:0})); | |
console.log("Current Holders: " + Number(currentHolders).toLocaleString(undefined)); | |
} |
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
// https://codeakk.medium.com/hex-development-data-a1b1822446fa | |
// https://togosh.medium.com/hex-developer-guide-3b018a943a55 | |
// https://thegraph.com/legacy-explorer/subgraph/uniswap/uniswap-v2 | |
// https://thegraph.com/legacy-explorer/subgraph/uniswap/uniswap-v3 | |
test(); | |
async function test(){ | |
var priceUV2 = await getUniswapV2HEXDailyPrice(); | |
var priceUV3 = await getUniswapV3HEXDailyPrice(); |
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
// https://codeakk.medium.com/hex-development-data-a1b1822446fa | |
// https://togosh.medium.com/hex-developer-guide-3b018a943a55 | |
test(); | |
async function test(){ | |
var blockNumber = await getEthereumBlock(622); | |
console.log("Ethereum Block Number: " + Number(blockNumber).toLocaleString(undefined, {minimumFractionDigits:0, maximumFractionDigits: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
// https://codeakk.medium.com/hex-development-data-a1b1822446fa | |
// https://togosh.medium.com/hex-developer-guide-3b018a943a55 | |
test(); | |
async function test(){ | |
var day = 622; | |
var { dailyPayoutHEX, totalTshares, success } = await get_dailyDataUpdate(day); | |
if (success) { | |
console.log("Total Tshares: " + Number(totalTshares).toLocaleString(undefined, {minimumFractionDigits:0, maximumFractionDigits: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
// https://codeakk.medium.com/hex-development-data-a1b1822446fa | |
// https://togosh.medium.com/hex-developer-guide-3b018a943a55 | |
test(); | |
async function test(){ | |
var numberOfHolders = await get_numberOfHolders(); | |
console.log("Total Holders: " + Number(numberOfHolders).toLocaleString(undefined, {minimumFractionDigits:0, maximumFractionDigits: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
// https://developer.twitter.com/en/apply-for-access | |
const twitterAPI = require('twitter-api-client'); | |
const imageToBase64 = require('image-to-base64'); | |
var twitterClient = new twitterAPI.TwitterClient({ | |
apiKey: "XXXXXXXXXXXXXXXX", | |
apiSecret: "XXXXXXXXXXXXXXXX", | |
accessToken: "XXXXXXXXXXXXXXXX", | |
accessTokenSecret: "XXXXXXXXXXXXXXXX", |
OlderNewer