Skip to content

Instantly share code, notes, and snippets.

View Dours-d's full-sized avatar
😘
Community Building

dours_d Dours-d

😘
Community Building
View GitHub Profile
@Dours-d
Dours-d / BasicUtilities.js
Created December 29, 2022 14:40 — forked from kbahr/BasicUtilities.js
HEX pull interest to date
const Web3 = require('web3');
const compiledContractABI = require('./HEX.abi.json');
const hexAddr = "0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39";
const findStakeAndIndex = async (addr, stakeId) => {
let stakes = await hex.stakeList(addr);
for(let i = 0; i < stakes.length; i++){
if(stakes[i].stakeId === stakeId){
@Dours-d
Dours-d / getDailyStatsHEX.js
Created December 29, 2022 14:36 — forked from togosh/getDailyStatsHEX.js
HEXDailyStats API - Full Historical & Live HEX Data --- https://HEXDailyStats.com --- JSON APIs https://hexdailystats.com/fulldata & https://hexdailystats.com/livedata
// JSON API --- https://hexdailystats.com/fulldata
// JSON API --- https://hexdailystats.com/livedata
// https://codeakk.medium.com/hex-development-data-a1b1822446fa
// https://togosh.medium.com/hex-developer-guide-3b018a943a55
// NOTE: New rows of historical full data usually get added into database about 20 minutes after 00:00:00 UTC every day
// NOTE: Live data updates every 1 minute
// TEST: Copy and run code with online javascript compiler --- https://jsfiddle.net/