From 891f00b54017d4c1aa55cfae31eb72a2d8ba7064 Mon Sep 17 00:00:00 2001 From: brock elmore Date: Thu, 8 Aug 2024 16:16:51 -1000 Subject: [PATCH] reenable test --- crates/pyrometer/tests/test_data/env.sol | 86 +++++++++---------- .../tests/test_data/remapping_import.sol | 12 +-- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/crates/pyrometer/tests/test_data/env.sol b/crates/pyrometer/tests/test_data/env.sol index f08168fa..c6ec5efd 100644 --- a/crates/pyrometer/tests/test_data/env.sol +++ b/crates/pyrometer/tests/test_data/env.sol @@ -6,48 +6,48 @@ contract Env { return msg.sender; } - // function msg_data() public pure returns (bytes memory) { - // return msg.data; - // } + function msg_data() public pure returns (bytes memory) { + return msg.data; + } - // function testBlock() public payable { - // /* - // blockhash(uint blockNumber) returns (bytes32): hash of the given block - only works for 256 most recent blocks - // blobhash(uint index) returns (bytes32): versioned hash of the index-th blob associated with the current transaction. A versioned hash consists of a single byte representing the version (currently 0x01), followed by the last 31 bytes of the SHA256 hash of the KZG commitment (EIP-4844). - // block.basefee (uint): current block’s base fee (EIP-3198 and EIP-1559) - // block.blobbasefee (uint): current block’s blob base fee (EIP-7516 and EIP-4844) - // 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.prevrandao (uint): random number provided by the beacon chain (EVM >= Paris) (see EIP-4399 ) - // 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) - // */ - // bytes32 a = blockhash(1); - // uint c = block.basefee; - // uint e = block.chainid; - // address payable f = block.coinbase; - // uint g = block.difficulty; - // uint h = block.gaslimit; - // uint i = block.number; - // uint j = block.prevrandao; - // uint k = block.timestamp; - // uint l = gasleft(); - // bytes memory m = msg.data; - // address n = msg.sender; - // bytes4 o = msg.sig; - // uint p = msg.value; - // uint q = tx.gasprice; - // address r = tx.origin; - // bytes32 b = blobhash(1); - // uint d = block.blobbasefee; - // } + function testBlock() public payable { + /* + blockhash(uint blockNumber) returns (bytes32): hash of the given block - only works for 256 most recent blocks + blobhash(uint index) returns (bytes32): versioned hash of the index-th blob associated with the current transaction. A versioned hash consists of a single byte representing the version (currently 0x01), followed by the last 31 bytes of the SHA256 hash of the KZG commitment (EIP-4844). + block.basefee (uint): current block’s base fee (EIP-3198 and EIP-1559) + block.blobbasefee (uint): current block’s blob base fee (EIP-7516 and EIP-4844) + 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.prevrandao (uint): random number provided by the beacon chain (EVM >= Paris) (see EIP-4399 ) + 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) + */ + bytes32 a = blockhash(1); + uint c = block.basefee; + uint e = block.chainid; + address payable f = block.coinbase; + uint g = block.difficulty; + uint h = block.gaslimit; + uint i = block.number; + uint j = block.prevrandao; + uint k = block.timestamp; + uint l = gasleft(); + bytes memory m = msg.data; + address n = msg.sender; + bytes4 o = msg.sig; + uint p = msg.value; + uint q = tx.gasprice; + address r = tx.origin; + bytes32 b = blobhash(1); + uint d = block.blobbasefee; + } } diff --git a/crates/pyrometer/tests/test_data/remapping_import.sol b/crates/pyrometer/tests/test_data/remapping_import.sol index bc001820..0115658b 100644 --- a/crates/pyrometer/tests/test_data/remapping_import.sol +++ b/crates/pyrometer/tests/test_data/remapping_import.sol @@ -3,9 +3,9 @@ pragma solidity ^0.8.0; import "@relative/relative_import.sol"; -// contract RemappingImport { -// function deploy() public { -// Env env = Env(address(100)); -// env.msg_sender(); -// } -// } +contract RemappingImport { + function deploy() public { + Env env = Env(address(100)); + env.msg_sender(); + } +}