Skip to content

Instantly share code, notes, and snippets.

@0xLGG
0xLGG / BasicUtilities.js
Created September 28, 2021 17:15 — 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){