Read Etica Smart Contract

How to read Etica Smart Contract

Variables

Here is the list of variables from Etica Smart contract that you will need in your system.

epochCount (ETI Block Height):

var epochCount = await tokenContract.methods.epochCount().call();

randomxBlob (current generic randomx blob):

var randomxBlob = await tokenContract.methods.randomxBlob().call();

randomxSeedhash (current seedhash)

var randomxSeedhash = await tokenContract.methods.randomxSeedhash().call();

challengeNumber (current challengeNumber)

var challengeNumber = await tokenContract.methods.getChallengeNumber().call() ;

Difficulty (current ETI difficulty):

 var miningDifficultyString = await tokenContract.methods.getMiningDifficulty().call()  ;
 var miningDifficulty = parseInt(miningDifficultyString)

Target (current ETI target):

var miningTargetString = await tokenContract.methods.getMiningTarget().call()  ;
var miningTarget = web3utils.toBN(miningTargetString)

miningReward (current ETI block reward):

var miningReward = await tokenContract.methods.getMiningReward().call() ;

Last updated