forked from ethereum-optimism/optimism
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
71391c2
commit 95e57d1
Showing
2 changed files
with
37 additions
and
9 deletions.
There are no files selected for viewing
21 changes: 16 additions & 5 deletions
21
...ntracts-bedrock/contracts/test/invariants/balance-claimer/properties/BalanceClaimer.t.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,22 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity 0.8.15; | ||
|
||
import {BalanceClaimerSetup} from '../setup/BalanceClaimer.t.sol'; | ||
import {BalanceClaimerSetup} from "../setup/BalanceClaimer.t.sol"; | ||
|
||
contract BalanceClaimerProperties is BalanceClaimerSetup { | ||
/// @custom:property-id 1 | ||
/// @custom:property foo | ||
function property_foo() external view { | ||
} | ||
/// @custom:property-id 5 | ||
/// @custom:property for each token, token.balanceOf(L1StandardBridge) == initialBalance - sum of claims | ||
function property_tokenBalancesSum() external view { | ||
for (uint256 i = 0; i < supportedTokens.length; i++) { | ||
// TODO: subtract claimed balances | ||
assert(supportedTokens[i].balanceOf(address(l1StandardBridge)) == INITIAL_BALANCE); | ||
} | ||
} | ||
|
||
/// @custom:property-id 6 | ||
/// @custom:property OptimismPortal.balance == initialBalance - sum of claims | ||
function property_ethBalancesSum() external view { | ||
// TODO: subtract claimed balances | ||
assert(address(optimismPortal).balance == INITIAL_BALANCE); | ||
} | ||
} |
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