hedera-smart-contracts icon indicating copy to clipboard operation
hedera-smart-contracts copied to clipboard

Block properties behavior

Open ebadiere opened this issue 2 years ago • 0 comments

Description

When retrieving in smart contracts, not all block properties match what's returned to hardhat.

  • Retrieving a blockhash through hardhat returns an actual hash value, but returning it from within a smart contract returns 0x0000000000000000000000000000000000000000000000000000000000000000.
  • Retrieving the block's coinbase returns a different value when called in the smart contract.

Steps to reproduce

  • The test should be able to get the hash of a given block when the block number is one of the 256 most recent blocks in BlockInfo reproduces the hash value issue.
  • The test should get the current block miners address using block.coinbase reproduces the coinbase issue.

Additional context

No response

Hedera network

other

Version

v0.5.0

Operating system

macOS

ebadiere avatar Oct 06 '23 21:10 ebadiere