Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
775fe0e7
Commit
775fe0e7
authored
Nov 30, 2022
by
Maurelian
Committed by
Matthew Slipper
Dec 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ctb: Fix names of fuzz and diff test functions
parent
fa6bfbbe
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
34 deletions
+32
-34
.gas-snapshot
packages/contracts-bedrock/.gas-snapshot
+16
-18
AddressAliasHelper.t.sol
...contracts-bedrock/contracts/test/AddressAliasHelper.t.sol
+1
-1
Encoding.t.sol
packages/contracts-bedrock/contracts/test/Encoding.t.sol
+4
-4
Hashing.t.sol
packages/contracts-bedrock/contracts/test/Hashing.t.sol
+5
-5
L2ToL1MessagePasser.t.sol
...ontracts-bedrock/contracts/test/L2ToL1MessagePasser.t.sol
+4
-4
OptimismPortal.t.sol
...ges/contracts-bedrock/contracts/test/OptimismPortal.t.sol
+1
-1
package.json
packages/contracts-bedrock/package.json
+1
-1
No files found.
packages/contracts-bedrock/.gas-snapshot
View file @
775fe0e7
...
...
@@ -8,7 +8,6 @@ GasBenchMark_L1StandardBridge_Finalize:test_finalizeETHWithdrawal_benchmark() (g
GasBenchMark_L2OutputOracle:test_proposeL2Output_benchmark() (gas: 88513)
GasBenchMark_OptimismPortal:test_depositTransaction_benchmark() (gas: 74953)
GasBenchMark_OptimismPortal:test_depositTransaction_benchmark_1() (gas: 36044)
CrossDomainMessenger_Test:testFuzz_baseGas(uint32) (runs: 256, μ: 20196, ~: 20196)
CrossDomainMessenger_Test:test_baseGas() (gas: 20054)
CrossDomainOwnableThroughPortal_Test:test_depositTransaction_crossDomainOwner() (gas: 61806)
CrossDomainOwnable_Test:test_onlyOwner() (gas: 34861)
...
...
@@ -19,7 +18,6 @@ CrossDomainOwnable2_Test:test_revertNotSetOnlyOwner2() (gas: 14565)
CrossDomainOwnable2_Test:test_revertOnlyOwner() (gas: 61712)
DeployerWhitelist_Test:test_owner() (gas: 7516)
DeployerWhitelist_Test:test_storageSlots() (gas: 33395)
Encoding_Test:test_nonceVersioning(uint240,uint16) (runs: 256, μ: 658, ~: 658)
FeeVault_Test:test_constructor() (gas: 10623)
FeeVault_Test:test_minWithdrawalAmount() (gas: 10689)
GasPriceOracle_Test:test_baseFee() (gas: 8281)
...
...
@@ -29,7 +27,7 @@ GasPriceOracle_Test:test_overhead() (gas: 10568)
GasPriceOracle_Test:test_scalar() (gas: 10610)
GasPriceOracle_Test:test_setGasPriceReverts() (gas: 5888)
GasPriceOracle_Test:test_setL1BaseFeeReverts() (gas: 5909)
Hashing_Test:test_hashDepositSource
() (gas: 628
)
Hashing_Test:test_hashDepositSource
_succeeds() (gas: 650
)
L1BlockTest:test_basefee() (gas: 7531)
L1BlockTest:test_hash() (gas: 7553)
L1BlockTest:test_number() (gas: 7608)
...
...
@@ -81,8 +79,8 @@ L2CrossDomainMessenger_Test:test_L2MessengerRelayMessageSucceeds() (gas: 53204)
L2CrossDomainMessenger_Test:test_L2MessengerRelayMessageToSystemContract() (gas: 36172)
L2CrossDomainMessenger_Test:test_L2MessengerRelayMessageV0Fails() (gas: 18870)
L2CrossDomainMessenger_Test:test_L2MessengerRelayShouldRevertIfPaused() (gas: 41596)
L2CrossDomainMessenger_Test:test_L2MessengerSendMessage() (gas: 122
53
3)
L2CrossDomainMessenger_Test:test_L2MessengerTwiceSendMessage() (gas: 134
716
)
L2CrossDomainMessenger_Test:test_L2MessengerSendMessage() (gas: 122
42
3)
L2CrossDomainMessenger_Test:test_L2MessengerTwiceSendMessage() (gas: 134
632
)
L2CrossDomainMessenger_Test:test_L2MessengerXDomainSenderReverts() (gas: 10568)
L2CrossDomainMessenger_Test:test_L2MessengerxDomainMessageSenderResets() (gas: 52615)
L2OutputOracleTest:testCannot_ProposeWithUnmatchedBlockhash() (gas: 29434)
...
...
@@ -118,13 +116,13 @@ L2StandardBridge_Test:test_finalizeBridgeETH_sendToMessengerReverts() (gas: 2396
L2StandardBridge_Test:test_finalizeBridgeETH_sendToSelfReverts() (gas: 23793)
L2StandardBridge_Test:test_finalizeDeposit() (gas: 89363)
L2StandardBridge_Test:test_initialize() (gas: 10536)
L2StandardBridge_Test:test_receive() (gas: 1318
62
)
L2StandardBridge_Test:test_withdraw() (gas: 3439
84
)
L2StandardBridge_Test:test_withdrawTo() (gas: 344
713
)
L2StandardBridge_Test:test_receive() (gas: 1318
20
)
L2StandardBridge_Test:test_withdraw() (gas: 3439
51
)
L2StandardBridge_Test:test_withdrawTo() (gas: 344
680
)
L2StandardBridge_Test:test_withdraw_onlyEOA() (gas: 251816)
L2ToL1MessagePasserTest:test_burn
() (gas: 112594
)
L2ToL1MessagePasserTest:test_initiateWithdrawal_fromContract
() (gas: 70356
)
L2ToL1MessagePasserTest:test_initiateWithdrawal_fromEOA
() (gas: 7587
4)
L2ToL1MessagePasserTest:test_burn
_succeeds() (gas: 112508
)
L2ToL1MessagePasserTest:test_initiateWithdrawal_fromContract
_succeeds() (gas: 70313
)
L2ToL1MessagePasserTest:test_initiateWithdrawal_fromEOA
_succeeds() (gas: 7576
4)
LegacyERC20ETH_Test:test_approve() (gas: 10723)
LegacyERC20ETH_Test:test_burn() (gas: 10615)
LegacyERC20ETH_Test:test_crossDomain() (gas: 6339)
...
...
@@ -153,17 +151,17 @@ OptimismPortalUpgradeable_Test:test_initialize_cannotInitImpl_reverts() (gas: 10
OptimismPortalUpgradeable_Test:test_initialize_cannotInitProxy_reverts() (gas: 15789)
OptimismPortalUpgradeable_Test:test_params_initValuesOnProxy_success() (gas: 16033)
OptimismPortalUpgradeable_Test:test_upgradeToAndCall_upgrading_success() (gas: 180435)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifOutputRootChanges_reverts() (gas: 1997
50
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifOutputRootChanges_reverts() (gas: 1997
06
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifOutputTimestampIsNotFinalized_reverts() (gas: 202003)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifWithdrawalNotProven_reverts() (gas: 39656)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifWithdrawalProofNotOldEnough_reverts() (gas: 197092)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onInsufficientGas_reverts() (gas: 197814)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onRecentWithdrawal_reverts() (gas: 1778
29
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onReentrancy_reverts() (gas: 2361
77
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onReplay_reverts() (gas: 237
785
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_provenWithdrawalHash_success() (gas: 229
511
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onRecentWithdrawal_reverts() (gas: 1778
51
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onReentrancy_reverts() (gas: 2361
56
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onReplay_reverts() (gas: 237
807
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_provenWithdrawalHash_success() (gas: 229
466
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_targetFails_fails() (gas: 332126)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_timestampLessThanL2OracleStart_reverts() (gas: 1937
72
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_timestampLessThanL2OracleStart_reverts() (gas: 1937
94
)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_onInvalidOutputRootProof_reverts() (gas: 83498)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_onSelfCall_reverts() (gas: 50732)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_oninvalidWithdrawalProof_reverts() (gas: 136758)
...
...
@@ -293,4 +291,4 @@ SequencerFeeVault_Test:test_constructor() (gas: 5459)
SequencerFeeVault_Test:test_minWithdrawalAmount() (gas: 5418)
SequencerFeeVault_Test:test_receive() (gas: 17316)
SequencerFeeVault_Test:test_revertWithdraw() (gas: 9343)
SequencerFeeVault_Test:test_withdraw() (gas: 1358
79
)
SequencerFeeVault_Test:test_withdraw() (gas: 1358
37
)
packages/contracts-bedrock/contracts/test/AddressAliasHelper.t.sol
View file @
775fe0e7
...
...
@@ -5,7 +5,7 @@ import { Test } from "forge-std/Test.sol";
import { AddressAliasHelper } from "../vendor/AddressAliasHelper.sol";
contract AddressAliasHelper_Test is Test {
function test
_fuzz_roundtrip
(address _address) external {
function test
Fuzz_roundtrip_succeeds
(address _address) external {
address aliased = AddressAliasHelper.applyL1ToL2Alias(_address);
address unaliased = AddressAliasHelper.undoL1ToL2Alias(aliased);
assertEq(_address, unaliased);
...
...
packages/contracts-bedrock/contracts/test/Encoding.t.sol
View file @
775fe0e7
...
...
@@ -10,7 +10,7 @@ contract Encoding_Test is CommonTest {
_setUp();
}
function test
_nonceVersioning
(uint240 _nonce, uint16 _version) external {
function test
Fuzz_nonceVersioning_succeeds
(uint240 _nonce, uint16 _version) external {
(uint240 nonce, uint16 version) = Encoding.decodeVersionedNonce(
Encoding.encodeVersionedNonce(_nonce, _version)
);
...
...
@@ -18,7 +18,7 @@ contract Encoding_Test is CommonTest {
assertEq(nonce, _nonce);
}
function test
_decodeVersionedNonce_differential
(uint240 _nonce, uint16 _version) external {
function test
Diff_decodeVersionedNonce_succeeds
(uint240 _nonce, uint16 _version) external {
uint256 nonce = uint256(Encoding.encodeVersionedNonce(_nonce, _version));
(uint256 decodedNonce, uint256 decodedVersion) = ffi.decodeVersionedNonce(nonce);
...
...
@@ -27,7 +27,7 @@ contract Encoding_Test is CommonTest {
assertEq(_nonce, uint240(decodedNonce));
}
function test
_encodeCrossDomainMessage_differential
(
function test
Diff_encodeCrossDomainMessage_succeeds
(
uint240 _nonce,
uint8 _version,
address _sender,
...
...
@@ -60,7 +60,7 @@ contract Encoding_Test is CommonTest {
assertEq(encoding, _encoding);
}
function test
_encodeDepositTransaction_differential
(
function test
Diff_encodeDepositTransaction_succeeds
(
address _from,
address _to,
uint256 _mint,
...
...
packages/contracts-bedrock/contracts/test/Hashing.t.sol
View file @
775fe0e7
...
...
@@ -11,7 +11,7 @@ contract Hashing_Test is CommonTest {
_setUp();
}
function test_hashDepositSource() external {
function test_hashDepositSource
_succeeds
() external {
bytes32 sourceHash = Hashing.hashDepositSource(
0xd25df7858efc1778118fb133ac561b138845361626dfb976699c5287ed0f4959,
0x1
...
...
@@ -20,7 +20,7 @@ contract Hashing_Test is CommonTest {
assertEq(sourceHash, 0xf923fb07134d7d287cb52c770cc619e17e82606c21a875c92f4c63b65280a5cc);
}
function test
_hashCrossDomainMessage_differential
(
function test
Diff_hashCrossDomainMessage_succeeds
(
uint240 _nonce,
uint16 _version,
address _sender,
...
...
@@ -54,7 +54,7 @@ contract Hashing_Test is CommonTest {
assertEq(hash, _hash);
}
function test
_hashWithdrawal_differential
(
function test
Diff_hashWithdrawal_succeeds
(
uint256 _nonce,
address _sender,
address _target,
...
...
@@ -71,7 +71,7 @@ contract Hashing_Test is CommonTest {
assertEq(hash, _hash);
}
function test
_hashOutputRootProof_differential
(
function test
Diff_hashOutputRootProof_succeeds
(
bytes32 _version,
bytes32 _stateRoot,
bytes32 _messagePasserStorageRoot,
...
...
@@ -98,7 +98,7 @@ contract Hashing_Test is CommonTest {
// TODO(tynes): foundry bug cannot serialize
// bytes32 as strings with vm.toString
function test
_hashDepositTransaction_differential
(
function test
Diff_hashDepositTransaction_succeeds
(
address _from,
address _to,
uint256 _mint,
...
...
packages/contracts-bedrock/contracts/test/L2ToL1MessagePasser.t.sol
View file @
775fe0e7
...
...
@@ -25,7 +25,7 @@ contract L2ToL1MessagePasserTest is CommonTest {
messagePasser = new L2ToL1MessagePasser();
}
function test
_fuzz_initiateWithdrawal
(
function test
Fuzz_initiateWithdrawal_succeeds
(
address _sender,
address _target,
uint256 _value,
...
...
@@ -60,7 +60,7 @@ contract L2ToL1MessagePasserTest is CommonTest {
}
// Test: initiateWithdrawal should emit the correct log when called by a contract
function test_initiateWithdrawal_fromContract() external {
function test_initiateWithdrawal_fromContract
_succeeds
() external {
bytes32 withdrawalHash = Hashing.hashWithdrawal(
Types.WithdrawalTransaction(
messagePasser.messageNonce(),
...
...
@@ -88,7 +88,7 @@ contract L2ToL1MessagePasserTest is CommonTest {
}
// Test: initiateWithdrawal should emit the correct log when called by an EOA
function test_initiateWithdrawal_fromEOA() external {
function test_initiateWithdrawal_fromEOA
_succeeds
() external {
uint256 gasLimit = 64000;
address target = address(4);
uint256 value = 100;
...
...
@@ -114,7 +114,7 @@ contract L2ToL1MessagePasserTest is CommonTest {
}
// Test: burn should destroy the ETH held in the contract
function test_burn() external {
function test_burn
_succeeds
() external {
messagePasser.initiateWithdrawal{ value: NON_ZERO_VALUE }(
NON_ZERO_ADDRESS,
NON_ZERO_GASLIMIT,
...
...
packages/contracts-bedrock/contracts/test/OptimismPortal.t.sol
View file @
775fe0e7
...
...
@@ -802,7 +802,7 @@ contract OptimismPortal_FinalizeWithdrawal_Test is Portal_Initializer {
assert(address(bob).balance == bobBalanceBefore);
}
function test
_finalizeWithdrawalTransaction_differential_succes
s(
function test
Diff_finalizeWithdrawalTransaction_succeed
s(
address _sender,
address _target,
uint256 _value,
...
...
packages/contracts-bedrock/package.json
View file @
775fe0e7
...
...
@@ -25,7 +25,7 @@
"test"
:
"yarn build:differential && forge test"
,
"coverage"
:
"yarn build:differential && forge coverage"
,
"coverage:lcov"
:
"yarn build:differential && forge coverage --report lcov"
,
"gas-snapshot"
:
"yarn build:differential && forge snapshot --no-match-test '
differential|f
uzz'"
,
"gas-snapshot"
:
"yarn build:differential && forge snapshot --no-match-test '
testDiff|testF
uzz'"
,
"storage-snapshot"
:
"./scripts/storage-snapshot.sh"
,
"validate-spacers"
:
"hardhat validate-spacers"
,
"slither"
:
"./scripts/slither.sh"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment