This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 676
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix:
eth_call
should use the same baseFee as given block num (#1980)
- Loading branch information
1 parent
f76e431
commit eba1077
Showing
20 changed files
with
95 additions
and
63 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 6 additions & 2 deletions
8
src/chains/ethereum/ethereum/tests/api/eth/contracts/EthCall.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.7.4; | ||
pragma solidity ^0.8.11; | ||
|
||
contract EthCall { | ||
uint public value; | ||
|
||
constructor() public payable { | ||
constructor() payable { | ||
value = 5; | ||
} | ||
|
||
function getBaseFee() public view virtual returns (uint256) { | ||
return block.basefee; | ||
} | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
src/chains/ethereum/ethereum/tests/api/eth/contracts/GetCode.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.7.4; | ||
pragma solidity ^0.8.11; | ||
|
||
import "./NoOp.sol"; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
src/chains/ethereum/ethereum/tests/api/eth/contracts/GetStorageAt.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/chains/ethereum/ethereum/tests/api/eth/contracts/Reverts.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/chains/ethereum/ethereum/tests/forking/contracts/Call.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.11; | ||
|
||
contract Call { | ||
uint256 public value = 0; | ||
function setValue (uint256 newValue) public returns (uint256 oldValue) { | ||
oldValue = value; | ||
value = newValue; | ||
} | ||
|
||
function setValueForAddress(address target, uint256 newValue) public returns (bytes memory oldValue) { | ||
bytes memory data = abi.encodeWithSignature("setValue(uint256)", newValue); | ||
(bool success, bytes memory _oldValue) = target.call(data); | ||
require(success); | ||
oldValue = _oldValue; | ||
} | ||
|
||
function setValueForAddressAddress(address target1, address target2, uint256 newValue) public returns (bytes memory oldValue) { | ||
bytes memory data1 = abi.encodeWithSignature("setValueForAddress(address,uint256)", target2, newValue-1); | ||
(bool success1, ) = address(this).call(data1); | ||
require(success1); | ||
bytes memory data = abi.encodeWithSignature("setValueForAddress(address,uint256)", target2, newValue); | ||
(bool success, bytes memory _oldValue) = target1.call(data); | ||
require(success); | ||
oldValue = _oldValue; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters