0

I'd like my smart contract to know if it's running on PoW or (in the future) PoS in Mainnet. Does checking for block.difficulty solve the problem?

If so, what will be the value of block.difficulty after Mainnet moves to PoS?

1 Answer 1

1

Difficulty will be 0 (zero), see https://eips.ethereum.org/EIPS/eip-3675#block-structure.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.