is-block-winner
and can-claim-mining-reward
functions to see if their address can claim a given block before submitting the claim transaction.minerBlockHeight as uint
(ok true)
ERR_USER_NOT_FOUND u1002
ERR_USER_ID_NOT_FOUND u1003
ERR_USER_DID_NOT_MINE_IN_BLOCK u1009
ERR_CLAIMED_BEFORE_MATURITY u1010
ERR_NO_MINERS_AT_BLOCK u1011
ERR_REWARD_ALREADY_CLAIMED u1012
ERR_MINER_DID_NOT_WIN u1013
ERR_NO_VRF_SEED_FOUND u1014
ERR_CLAIM_IN_WRONG_CONTRACT u1020
claim-mining-reward
function in the contract, which accepts the block height the miner mined in, and checks if the VRF value is between the lowValue
and highValue
for the miner.user as principal
and minerBlockHeight as uint
true
or false
user as principal
and minerBlockHeight as uint
true
or false