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
12e8d4b1
Unverified
Commit
12e8d4b1
authored
Jan 05, 2023
by
mergify[bot]
Committed by
GitHub
Jan 05, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4573 from ethereum-optimism/clabby/ctb/invariant-tests
feat(ctb): Forge invariant tests
parents
fade339f
6d084ee5
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
307 additions
and
52 deletions
+307
-52
.gas-snapshot
packages/contracts-bedrock/.gas-snapshot
+21
-21
L2OutputOracle.t.sol
...ts-bedrock/contracts/test/invariants/L2OutputOracle.t.sol
+40
-0
OptimismPortal.t.sol
...ts-bedrock/contracts/test/invariants/OptimismPortal.t.sol
+165
-0
SystemConfig.t.sol
...acts-bedrock/contracts/test/invariants/SystemConfig.t.sol
+43
-0
package.json
packages/contracts-bedrock/package.json
+2
-2
.gas-snapshot
packages/contracts-periphery/.gas-snapshot
+32
-25
package.json
packages/contracts-periphery/package.json
+1
-1
yarn.lock
yarn.lock
+3
-3
No files found.
packages/contracts-bedrock/.gas-snapshot
View file @
12e8d4b1
...
...
@@ -17,7 +17,7 @@ Bytes_Test:test_toNibbles_expectedResult128Bytes_works() (gas: 129885)
Bytes_Test:test_toNibbles_expectedResult5Bytes_works() (gas: 6132)
Bytes_Test:test_toNibbles_zeroLengthInput_works() (gas: 966)
CrossDomainMessenger_BaseGas_Test:test_baseGas_succeeds() (gas: 20120)
CrossDomainOwnableThroughPortal_Test:test_depositTransaction_crossDomainOwner_succeeds() (gas: 618
0
6)
CrossDomainOwnableThroughPortal_Test:test_depositTransaction_crossDomainOwner_succeeds() (gas: 618
7
6)
CrossDomainOwnable_Test:test_onlyOwner_notOwner_reverts() (gas: 10530)
CrossDomainOwnable_Test:test_onlyOwner_succeeds() (gas: 34861)
CrossDomainOwnable2_Test:test_onlyOwner_notMessenger_reverts() (gas: 8416)
...
...
@@ -92,10 +92,10 @@ L1ERC721Bridge_Test:test_finalizeBridgeERC721_notFromRemoteMessenger_reverts() (
L1ERC721Bridge_Test:test_finalizeBridgeERC721_notViaLocalMessenger_reverts() (gas: 16093)
L1ERC721Bridge_Test:test_finalizeBridgeERC721_selfToken_reverts() (gas: 17593)
L1ERC721Bridge_Test:test_finalizeBridgeERC721_succeeds() (gas: 323814)
L1StandardBridge_DepositERC20To_Test:test_depositERC20To_succeeds() (gas: 5759
62
)
L1StandardBridge_DepositERC20To_Test:test_depositERC20To_succeeds() (gas: 5759
59
)
L1StandardBridge_DepositERC20_Test:test_depositERC20_succeeds() (gas: 573786)
L1StandardBridge_DepositERC20_TestFail:test_depositERC20_notEoa_reverts() (gas: 22320)
L1StandardBridge_DepositETHTo_Test:test_depositETHTo_succeeds() (gas: 3247
24
)
L1StandardBridge_DepositETHTo_Test:test_depositETHTo_succeeds() (gas: 3247
12
)
L1StandardBridge_DepositETH_Test:test_depositETH_succeeds() (gas: 367539)
L1StandardBridge_DepositETH_TestFail:test_depositETH_notEoa_reverts() (gas: 40780)
L1StandardBridge_FinalizeBridgeETH_TestFail:test_finalizeBridgeETH_incorrectValue_reverts() (gas: 34207)
...
...
@@ -159,7 +159,7 @@ L2OutputOracleTest:test_proposeL2Output_unexpectedBlockNumber_reverts() (gas: 28
L2OutputOracleTest:test_proposeL2Output_unmatchedBlockhash_reverts() (gas: 29446)
L2OutputOracleTest:test_proposeL2Output_wrongFork_reverts() (gas: 29005)
L2OutputOracleTest:test_proposeWithBlockhashAndHeight_succeeds() (gas: 95296)
L2OutputOracleUpgradeable_Test:test_initValuesOnProxy_succeeds() (gas: 2609
6
)
L2OutputOracleUpgradeable_Test:test_initValuesOnProxy_succeeds() (gas: 2609
3
)
L2OutputOracleUpgradeable_Test:test_initializeImpl_alreadyInitialized_reverts() (gas: 15149)
L2OutputOracleUpgradeable_Test:test_initializeProxy_alreadyInitialized_reverts() (gas: 20131)
L2OutputOracleUpgradeable_Test:test_upgrading_succeeds() (gas: 180413)
...
...
@@ -169,7 +169,7 @@ L2StandardBridge_Test:test_finalizeBridgeETH_sendToSelf_reverts() (gas: 23838)
L2StandardBridge_Test:test_finalizeDeposit_succeeds() (gas: 89396)
L2StandardBridge_Test:test_initialize_succeeds() (gas: 10537)
L2StandardBridge_Test:test_receive_succeeds() (gas: 131905)
L2StandardBridge_Test:test_withdrawTo_succeeds() (gas: 3446
7
0)
L2StandardBridge_Test:test_withdrawTo_succeeds() (gas: 3446
6
0)
L2StandardBridge_Test:test_withdraw_insufficientValue_reverts() (gas: 19630)
L2StandardBridge_Test:test_withdraw_notEOA_reverts() (gas: 251798)
L2StandardBridge_Test:test_withdraw_succeeds() (gas: 343975)
...
...
@@ -183,7 +183,7 @@ LegacyERC20ETH_Test:test_decreaseAllowance_doesNotExist_reverts() (gas: 10679)
LegacyERC20ETH_Test:test_increaseAllowance_doesNotExist_reverts() (gas: 10689)
LegacyERC20ETH_Test:test_metadata_succeeds() (gas: 15414)
LegacyERC20ETH_Test:test_mint_doesNotExist_reverts() (gas: 10649)
LegacyERC20ETH_Test:test_transferFrom_doesNotExist_reverts() (gas: 128
87
)
LegacyERC20ETH_Test:test_transferFrom_doesNotExist_reverts() (gas: 128
90
)
LegacyERC20ETH_Test:test_transfer_doesNotExist_reverts() (gas: 10733)
LegacyMessagePasser_Test:test_passMessageToL1_succeeds() (gas: 34518)
MerkleTrie_Test:test_get_corruptedProof_reverts() (gas: 5713)
...
...
@@ -242,32 +242,32 @@ OptimismMintableERC721Factory_Test:test_createOptimismMintableERC721_zeroRemoteT
OptimismPortalUpgradeable_Test:test_initialize_cannotInitImpl_reverts() (gas: 10791)
OptimismPortalUpgradeable_Test:test_initialize_cannotInitProxy_reverts() (gas: 15833)
OptimismPortalUpgradeable_Test:test_params_initValuesOnProxy_succeeds() (gas: 16011)
OptimismPortalUpgradeable_Test:test_upgradeToAndCall_upgrading_succeeds() (gas: 1804
57
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifOutputRootChanges_reverts() (gas: 1987
64
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifOutputTimestampIsNotFinalized_reverts() (gas: 2010
83
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifWithdrawalNotProven_reverts() (gas: 3965
6
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifWithdrawalProofNotOldEnough_reverts() (gas: 19612
8
)
OptimismPortalUpgradeable_Test:test_upgradeToAndCall_upgrading_succeeds() (gas: 1804
81
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifOutputRootChanges_reverts() (gas: 1987
58
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifOutputTimestampIsNotFinalized_reverts() (gas: 2010
77
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifWithdrawalNotProven_reverts() (gas: 3965
0
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifWithdrawalProofNotOldEnough_reverts() (gas: 19612
2
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onInsufficientGas_reverts() (gas: 196954)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onRecentWithdrawal_reverts() (gas: 176842)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onReentrancy_reverts() (gas: 235400)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onReplay_reverts() (gas: 236906)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_provenWithdrawalHash_succeeds() (gas: 22858
7
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_provenWithdrawalHash_succeeds() (gas: 22858
1
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_targetFails_fails() (gas: 8797746687696163638)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_timestampLessThanL2OracleStart_reverts() (gas: 1928
52
)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_timestampLessThanL2OracleStart_reverts() (gas: 1928
46
)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_onInvalidOutputRootProof_reverts() (gas: 83498)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_onInvalidWithdrawalProof_reverts() (gas: 13522
4
)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_onSelfCall_reverts() (gas: 507
3
2)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_onInvalidWithdrawalProof_reverts() (gas: 13522
3
)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_onSelfCall_reverts() (gas: 507
5
2)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_replayProveChangedOutputRoot_succeeds() (gas: 275173)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_replayProve_reverts() (gas: 188130)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_validWithdrawalProof_succeeds() (gas: 178317)
OptimismPortal_Test:test_constructor_succeeds() (gas: 17277)
OptimismPortal_Test:test_depositTransaction_contractCreation_reverts() (gas: 142
67
)
OptimismPortal_Test:test_depositTransaction_contractCreation_reverts() (gas: 142
73
)
OptimismPortal_Test:test_depositTransaction_createWithZeroValueForContract_succeeds() (gas: 76662)
OptimismPortal_Test:test_depositTransaction_createWithZeroValueForEOA_succeeds() (gas: 77029)
OptimismPortal_Test:test_depositTransaction_noValueContract_succeeds() (gas: 76681)
OptimismPortal_Test:test_depositTransaction_noValueEOA_succeeds() (gas: 77198)
OptimismPortal_Test:test_depositTransaction_withEthValueAndContractContractCreation_succeeds() (gas: 83664)
OptimismPortal_Test:test_depositTransaction_withEthValueAndEOAContractCreation_succeeds() (gas: 758
62
)
OptimismPortal_Test:test_depositTransaction_withEthValueAndEOAContractCreation_succeeds() (gas: 758
71
)
OptimismPortal_Test:test_depositTransaction_withEthValueFromContract_succeeds() (gas: 83389)
OptimismPortal_Test:test_depositTransaction_withEthValueFromEOA_succeeds() (gas: 84133)
OptimismPortal_Test:test_isOutputFinalized_succeeds() (gas: 119474)
...
...
@@ -280,9 +280,9 @@ Proxy_Test:test_implementation_zeroAddressCaller_succeeds() (gas: 14707)
Proxy_Test:test_ownerKey_succeeds() (gas: 19081)
Proxy_Test:test_ownerProxyCall_notAdmin_succeeds() (gas: 34637)
Proxy_Test:test_proxyCallToImp_notAdmin_succeeds() (gas: 29985)
Proxy_Test:test_upgradeToAndCall_functionDoesNotExist_reverts() (gas: 1045
17
)
Proxy_Test:test_upgradeToAndCall_isPayable_succeeds() (gas: 537
07
)
Proxy_Test:test_upgradeToAndCall_succeeds() (gas: 1251
55
)
Proxy_Test:test_upgradeToAndCall_functionDoesNotExist_reverts() (gas: 1045
20
)
Proxy_Test:test_upgradeToAndCall_isPayable_succeeds() (gas: 537
19
)
Proxy_Test:test_upgradeToAndCall_succeeds() (gas: 1251
67
)
Proxy_Test:test_upgradeTo_clashingFunctionSignatures_succeeds() (gas: 101359)
ProxyAdmin_Test:test_chugsplashChangeProxyAdmin_succeeds() (gas: 35586)
ProxyAdmin_Test:test_chugsplashGetProxyAdmin_succeeds() (gas: 15675)
...
...
@@ -300,7 +300,7 @@ ProxyAdmin_Test:test_erc1967GetProxyImplementation_succeeds() (gas: 52049)
ProxyAdmin_Test:test_erc1967UpgradeAndCall_succeeds() (gas: 78940)
ProxyAdmin_Test:test_erc1967Upgrade_succeeds() (gas: 50034)
ProxyAdmin_Test:test_isUpgrading_succeeds() (gas: 19431)
ProxyAdmin_Test:test_onlyOwner_notOwner_reverts() (gas: 227
60
)
ProxyAdmin_Test:test_onlyOwner_notOwner_reverts() (gas: 227
45
)
ProxyAdmin_Test:test_owner_succeeds() (gas: 9738)
ProxyAdmin_Test:test_proxyType_succeeds() (gas: 20511)
ProxyAdmin_Test:test_setAddressManager_notOwner_reverts() (gas: 10600)
...
...
packages/contracts-bedrock/contracts/test/invariants/L2OutputOracle.t.sol
0 → 100644
View file @
12e8d4b1
pragma solidity 0.8.15;
import { InvariantTest } from "forge-std/InvariantTest.sol";
import { L2OutputOracle_Initializer } from "../CommonTest.t.sol";
contract L2OutputOracle_MonotonicBlockNumIncrease_Invariant is
InvariantTest,
L2OutputOracle_Initializer
{
function setUp() public override {
super.setUp();
// Set the target contract to the oracle proxy
targetContract(address(oracle));
// Set the target sender to the proposer
targetSender(address(proposer));
// Set the target selector for `proposeL2Output`
// `proposeL2Output` is the only function we care about, as it is the only function
// that can modify the `l2Outputs` array in the oracle.
bytes4[] memory selectors = new bytes4[](1);
selectors[0] = oracle.proposeL2Output.selector;
FuzzSelector memory selector = FuzzSelector({
addr: address(oracle),
selectors: selectors
});
targetSelector(selector);
}
/**
* @custom:invariant The block number of the output root proposals should monotonically
* increase.
*
* When a new output is submitted, it should never be allowed to correspond to a block
* number that is less than the current output.
*/
function invariant_monotonicBlockNumIncrease() external {
// Assert that the block number of proposals must monotonically increase.
assertTrue(oracle.nextBlockNumber() >= oracle.latestBlockNumber());
}
}
packages/contracts-bedrock/contracts/test/invariants/OptimismPortal.t.sol
0 → 100644
View file @
12e8d4b1
pragma solidity 0.8.15;
import { InvariantTest } from "forge-std/InvariantTest.sol";
import { Portal_Initializer } from "../CommonTest.t.sol";
import { Types } from "../../libraries/Types.sol";
contract OptimismPortal_Invariant_Harness is Portal_Initializer, InvariantTest {
// Reusable default values for a test withdrawal
Types.WithdrawalTransaction _defaultTx;
uint256 _proposedOutputIndex;
uint256 _proposedBlockNumber;
bytes32 _stateRoot;
bytes32 _storageRoot;
bytes32 _outputRoot;
bytes32 _withdrawalHash;
bytes[] _withdrawalProof;
Types.OutputRootProof internal _outputRootProof;
function setUp() public virtual override {
super.setUp();
_defaultTx = Types.WithdrawalTransaction({
nonce: 0,
sender: alice,
target: bob,
value: 100,
gasLimit: 100_000,
data: hex""
});
// Get withdrawal proof data we can use for testing.
(_stateRoot, _storageRoot, _outputRoot, _withdrawalHash, _withdrawalProof) = ffi
.getProveWithdrawalTransactionInputs(_defaultTx);
// Setup a dummy output root proof for reuse.
_outputRootProof = Types.OutputRootProof({
version: bytes32(uint256(0)),
stateRoot: _stateRoot,
messagePasserStorageRoot: _storageRoot,
latestBlockhash: bytes32(uint256(0))
});
_proposedBlockNumber = oracle.nextBlockNumber();
_proposedOutputIndex = oracle.nextOutputIndex();
// Configure the oracle to return the output root we've prepared.
vm.warp(oracle.computeL2Timestamp(_proposedBlockNumber) + 1);
vm.prank(oracle.PROPOSER());
oracle.proposeL2Output(_outputRoot, _proposedBlockNumber, 0, 0);
// Warp beyond the finalization period for the block we've proposed.
vm.warp(
oracle.getL2Output(_proposedOutputIndex).timestamp +
op.FINALIZATION_PERIOD_SECONDS() +
1
);
// Fund the portal so that we can withdraw ETH.
vm.deal(address(op), 0xFFFFFFFF);
}
}
contract OptimismPortal_CannotTimeTravel is OptimismPortal_Invariant_Harness {
function setUp() public override {
super.setUp();
// Prove the withdrawal transaction
op.proveWithdrawalTransaction(
_defaultTx,
_proposedOutputIndex,
_outputRootProof,
_withdrawalProof
);
// Set the target contract to the portal proxy
targetContract(address(op));
// Exclude the proxy multisig from the senders so that the proxy cannot be upgraded
excludeSender(address(multisig));
}
/**
* @custom:invariant `finalizeWithdrawalTransaction` should revert if the finalization
* period has not elapsed.
*
* A withdrawal that has been proven should not be able to be finalized until after
* the finalization period has elapsed.
*/
function invariant_cannotFinalizeBeforePeriodHasPassed() external {
vm.expectRevert("OptimismPortal: proven withdrawal finalization period has not elapsed");
op.finalizeWithdrawalTransaction(_defaultTx);
}
}
contract OptimismPortal_CannotFinalizeTwice is OptimismPortal_Invariant_Harness {
function setUp() public override {
super.setUp();
// Prove the withdrawal transaction
op.proveWithdrawalTransaction(
_defaultTx,
_proposedOutputIndex,
_outputRootProof,
_withdrawalProof
);
// Warp past the finalization period.
vm.warp(block.timestamp + op.FINALIZATION_PERIOD_SECONDS() + 1);
// Finalize the withdrawal transaction.
op.finalizeWithdrawalTransaction(_defaultTx);
// Set the target contract to the portal proxy
targetContract(address(op));
// Exclude the proxy multisig from the senders so that the proxy cannot be upgraded
excludeSender(address(multisig));
}
/**
* @custom:invariant `finalizeWithdrawalTransaction` should revert if the withdrawal
* has already been finalized.
*
* Ensures that there is no chain of calls that can be made that allows a withdrawal
* to be finalized twice.
*/
function invariant_cannotFinalizeTwice() external {
vm.expectRevert("OptimismPortal: withdrawal has already been finalized");
op.finalizeWithdrawalTransaction(_defaultTx);
}
}
contract OptimismPortal_CanAlwaysFinalizeAfterWindow is OptimismPortal_Invariant_Harness {
function setUp() public override {
super.setUp();
// Prove the withdrawal transaction
op.proveWithdrawalTransaction(
_defaultTx,
_proposedOutputIndex,
_outputRootProof,
_withdrawalProof
);
// Warp past the finalization period.
vm.warp(block.timestamp + op.FINALIZATION_PERIOD_SECONDS() + 1);
// Set the target contract to the portal proxy
targetContract(address(op));
// Exclude the proxy multisig from the senders so that the proxy cannot be upgraded
excludeSender(address(multisig));
}
/**
* @custom:invariant A withdrawal should **always** be able to be finalized
* `FINALIZATION_PERIOD_SECONDS` after it was successfully proven.
*
* This invariant asserts that there is no chain of calls that can be made that
* will prevent a withdrawal from being finalized exactly `FINALIZATION_PERIOD_SECONDS`
* after it was successfully proven.
*/
function invariant_canAlwaysFinalize() external {
uint256 bobBalanceBefore = address(bob).balance;
op.finalizeWithdrawalTransaction(_defaultTx);
assertEq(address(bob).balance, bobBalanceBefore + _defaultTx.value);
}
}
packages/contracts-bedrock/contracts/test/invariants/SystemConfig.t.sol
0 → 100644
View file @
12e8d4b1
pragma solidity 0.8.15;
import { InvariantTest } from "forge-std/InvariantTest.sol";
import { StdAssertions } from "forge-std/StdAssertions.sol";
import { SystemConfig } from "../../L1/SystemConfig.sol";
contract SystemConfig_GasLimitLowerBound_Invariant is InvariantTest, StdAssertions {
SystemConfig public config;
function setUp() public {
config = new SystemConfig({
_owner: address(0xbeef),
_overhead: 2100,
_scalar: 1000000,
_batcherHash: bytes32(hex"abcd"),
_gasLimit: 8_000_000,
_unsafeBlockSigner: address(1)
});
// Set the target contract to the `config`
targetContract(address(config));
// Set the target sender to the `config`'s owner (0xbeef)
targetSender(address(0xbeef));
// Set the target selector for `setGasLimit`
// `setGasLimit` is the only function we care about, as it is the only function
// that can modify the gas limit within the SystemConfig.
bytes4[] memory selectors = new bytes4[](1);
selectors[0] = config.setGasLimit.selector;
FuzzSelector memory selector = FuzzSelector({
addr: address(config),
selectors: selectors
});
targetSelector(selector);
}
/**
* @custom:invariant The gas limit of the `SystemConfig` contract can never be lower
* than the hard-coded lower bound.
*/
function invariant_gasLimitLowerBound() external {
assertTrue(config.gasLimit() >= config.MINIMUM_GAS_LIMIT());
}
}
packages/contracts-bedrock/package.json
View file @
12e8d4b1
...
...
@@ -26,7 +26,7 @@
"test"
:
"yarn build:differential && yarn build:fuzz && forge test"
,
"coverage"
:
"yarn build:differential && yarn build:fuzz && forge coverage"
,
"coverage:lcov"
:
"yarn build:differential && yarn build:fuzz && forge coverage --report lcov"
,
"gas-snapshot"
:
"yarn build:differential && yarn build:fuzz && forge snapshot --no-match-test 'testDiff|testFuzz'"
,
"gas-snapshot"
:
"yarn build:differential && yarn build:fuzz && forge snapshot --no-match-test 'testDiff|testFuzz
|invariant
'"
,
"storage-snapshot"
:
"./scripts/storage-snapshot.sh"
,
"validate-spacers"
:
"hardhat validate-spacers"
,
"slither"
:
"./scripts/slither.sh"
,
...
...
@@ -77,7 +77,7 @@
"dotenv"
:
"^16.0.0"
,
"ds-test"
:
"https://github.com/dapphub/ds-test.git#9310e879db8ba3ea6d5c6489a579118fd264a3f5"
,
"ethereum-waffle"
:
"^3.0.0"
,
"forge-std"
:
"https://github.com/foundry-rs/forge-std.git#5
bafa16b4a6aa67c503d96294be846a22a6f6efb
"
,
"forge-std"
:
"https://github.com/foundry-rs/forge-std.git#5
3331f4cb2e313466f72440f3e73af048c454d02
"
,
"glob"
:
"^7.1.6"
,
"hardhat-deploy"
:
"^0.11.4"
,
"solhint"
:
"^3.3.7"
,
...
...
packages/contracts-periphery/.gas-snapshot
View file @
12e8d4b1
AssetReceiverTest:testFail_withdrawERC20() (gas: 199
441
)
AssetReceiverTest:testFail_withdrawERC20withAmount() (gas: 199
389
)
AssetReceiverTest:testFail_withdrawERC721() (gas: 559
30
)
AssetReceiverTest:testFail_withdrawETH() (gas: 10
523
)
AssetReceiverTest:testFail_withdrawETHwithAmount() (gas: 10
639
)
AssetReceiverTest:test_constructor() (gas: 9
845
)
AssetReceiverTest:testFail_withdrawERC20() (gas: 199
012
)
AssetReceiverTest:testFail_withdrawERC20withAmount() (gas: 199
092
)
AssetReceiverTest:testFail_withdrawERC721() (gas: 559
08
)
AssetReceiverTest:testFail_withdrawETH() (gas: 10
457
)
AssetReceiverTest:testFail_withdrawETHwithAmount() (gas: 10
594
)
AssetReceiverTest:test_constructor() (gas: 9
794
)
AssetReceiverTest:test_receive() (gas: 18860)
AssetReceiverTest:test_withdrawERC20() (gas: 183388)
AssetReceiverTest:test_withdrawERC20withAmount() (gas: 182436)
AssetReceiverTest:test_withdrawERC721() (gas: 49149)
AssetReceiverTest:test_withdrawETH() (gas: 26121)
AssetReceiverTest:test_withdrawETHwithAmount() (gas: 26161)
TeleportrWithdrawerTest:testFail_setData() (gas: 8546)
TeleportrWithdrawerTest:testFail_setRecipient() (gas: 9952)
TeleportrWithdrawerTest:testFail_setTeleportr() (gas: 9918)
TeleportrWithdrawerTest:test_constructor() (gas: 9790)
TeleportrWithdrawerTest:test_setData() (gas: 41835)
TeleportrWithdrawerTest:test_setRecipient() (gas: 36176)
TeleportrWithdrawerTest:test_setTeleportr() (gas: 38023)
TeleportrWithdrawerTest:test_withdrawFromTeleportrToContract() (gas: 191517)
TeleportrWithdrawerTest:test_withdrawFromTeleportrToEOA() (gas: 78597)
TransactorTest:testFail_CALL() (gas: 15737)
TransactorTest:testFail_DELEGATECALLL() (gas: 15704)
TransactorTest:test_CALL() (gas: 27132)
TransactorTest:test_DELEGATECALL() (gas: 21266)
TransactorTest:test_constructor() (gas: 9823)
AssetReceiverTest:test_withdrawERC20() (gas: 183064)
AssetReceiverTest:test_withdrawERC20withAmount() (gas: 182146)
AssetReceiverTest:test_withdrawERC721() (gas: 49097)
AssetReceiverTest:test_withdrawETH() (gas: 26179)
AssetReceiverTest:test_withdrawETHwithAmount() (gas: 26108)
AssetReceiverTest:test_attest_bulk() (gas: 592013)
AssetReceiverTest:test_attest_single() (gas: 539644)
OptimistTest:test_optimist_baseURI() (gas: 117016)
OptimistTest:test_optimist_burn() (gas: 77691)
OptimistTest:test_optimist_initialize() (gas: 23095)
OptimistTest:test_optimist_is_on_allow_list() (gas: 52822)
OptimistTest:test_optimist_mint_already_minted() (gas: 99125)
OptimistTest:test_optimist_mint_happy_path() (gas: 99381)
OptimistTest:test_optimist_mint_no_attestation() (gas: 15897)
OptimistTest:test_optimist_mint_secondary_minter() (gas: 100782)
OptimistTest:test_optimist_sbt_approve() (gas: 97490)
OptimistTest:test_optimist_sbt_transfer() (gas: 102537)
OptimistTest:test_optimist_set_approval_for_all() (gas: 101119)
OptimistTest:test_optimist_supports_interface() (gas: 5797)
OptimistTest:test_optimist_token_id_of_owner() (gas: 95251)
OptimistTest:test_optimist_token_uri() (gas: 214371)
TransactorTest:testFail_CALL() (gas: 15658)
TransactorTest:testFail_DELEGATECALLL() (gas: 15632)
TransactorTest:test_CALL() (gas: 26977)
TransactorTest:test_DELEGATECALL() (gas: 21122)
TransactorTest:test_constructor() (gas: 9782)
packages/contracts-periphery/package.json
View file @
12e8d4b1
...
...
@@ -77,7 +77,7 @@
"ds-test"
:
"https://github.com/dapphub/ds-test.git#9310e879db8ba3ea6d5c6489a579118fd264a3f5"
,
"ethereum-waffle"
:
"^3.4.4"
,
"ethers"
:
"^5.7.0"
,
"forge-std"
:
"https://github.com/foundry-rs/forge-std.git#5
bafa16b4a6aa67c503d96294be846a22a6f6efb
"
,
"forge-std"
:
"https://github.com/foundry-rs/forge-std.git#5
3331f4cb2e313466f72440f3e73af048c454d02
"
,
"hardhat"
:
"^2.9.6"
,
"hardhat-deploy"
:
"^0.11.10"
,
"hardhat-gas-reporter"
:
"^1.0.8"
,
...
...
yarn.lock
View file @
12e8d4b1
...
...
@@ -9463,9 +9463,9 @@ forever-agent@~0.6.1:
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
"forge-std@https://github.com/foundry-rs/forge-std.git#5
bafa16b4a6aa67c503d96294be846a22a6f6efb
":
version "1.
0
.0"
resolved "https://github.com/foundry-rs/forge-std.git#5
bafa16b4a6aa67c503d96294be846a22a6f6efb
"
"forge-std@https://github.com/foundry-rs/forge-std.git#5
3331f4cb2e313466f72440f3e73af048c454d02
":
version "1.
2
.0"
resolved "https://github.com/foundry-rs/forge-std.git#5
3331f4cb2e313466f72440f3e73af048c454d02
"
form-data@^2.2.0:
version "2.5.1"
...
...
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