Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

create tests for solidity special functions #1354

Open
mayconamaroCW opened this issue Jul 4, 2024 · 0 comments
Open

create tests for solidity special functions #1354

mayconamaroCW opened this issue Jul 4, 2024 · 0 comments

Comments

@mayconamaroCW
Copy link
Contributor

mayconamaroCW commented Jul 4, 2024

Implement testes for some or all of the Solidity functions/properties below:

  • blockhash(uint blockNumber) returns (bytes32): hash of the given block - only works for 256 most recent blocks

  • block.basefee (uint): current block’s base fee (EIP-3198 and EIP-1559)

  • block.chainid (uint): current chain id

  • block.coinbase (address payable): current block miner’s address

  • block.difficulty (uint): current block difficulty (EVM < Paris). For other EVM versions it behaves as a deprecated alias for block.prevrandao that will be removed in the next breaking release

  • block.gaslimit (uint): current block gaslimit

  • block.number (uint): current block number

  • block.timestamp (uint): current block timestamp in seconds since Unix epoch

  • gasleft() returns (uint256): remaining gas

  • msg.data (bytes): complete calldata

  • msg.sender (address): sender of the message (current call)

  • msg.sig (bytes4): first four bytes of the calldata (i.e. function identifier)

  • msg.value (uint): number of wei sent with the message

  • tx.gasprice (uint): gas price of the transaction

  • tx.origin (address): sender of the transaction (full call chain)

Eventually some of them might be missing implementation, which needs to be addresses as a new enhacement issue

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant