Skip to content

Commit

Permalink
test: deploy Defaults in Base_Test (#375)
Browse files Browse the repository at this point in the history
test: remove unneeded assets function in Defaults
  • Loading branch information
andreivladbrg committed Jul 22, 2024
1 parent 91ca871 commit a7a4a66
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 13 deletions.
2 changes: 2 additions & 0 deletions test/Base.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ abstract contract Base_Test is
users.recipient2 = createUser("Recipient2");
users.recipient3 = createUser("Recipient3");
users.recipient4 = createUser("Recipient4");

defaults = new Defaults({ users_: users, asset_: dai });
}

/*//////////////////////////////////////////////////////////////////////////
Expand Down
4 changes: 0 additions & 4 deletions test/fork/Fork.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ abstract contract Fork_Test is Base_Test, V2CoreFuzzers {
// Load the external dependencies.
loadDependencies();

// Deploy the defaults contract and allow it to access cheatcodes.
defaults = new Defaults({ users_: users, asset_: FORK_ASSET });
vm.allowCheatcodes(address(defaults));

// Deploy V2 Periphery.
deployPeripheryConditionally();

Expand Down
4 changes: 0 additions & 4 deletions test/integration/Integration.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pragma solidity >=0.8.22 <0.9.0;

import { Precompiles as V2CorePrecompiles } from "@sablier/v2-core/precompiles/Precompiles.sol";

import { Defaults } from "../utils/Defaults.sol";
import { Base_Test } from "../Base.t.sol";

/// @notice Common logic needed by all integration tests.
Expand All @@ -19,9 +18,6 @@ abstract contract Integration_Test is Base_Test {
// Deploy the external dependencies.
deployDependencies();

// Deploy the defaults contract.
defaults = new Defaults({ users_: users, asset_: dai });

// Deploy V2 Periphery.
deployPeripheryConditionally();

Expand Down
5 changes: 0 additions & 5 deletions test/utils/Defaults.sol
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,6 @@ contract Defaults is Merkle {
SABLIER-V2-LOCKUP
//////////////////////////////////////////////////////////////////////////*/

function assets() public view returns (IERC20[] memory assets_) {
assets_ = new IERC20[](1);
assets_[0] = asset;
}

function broker() public view returns (Broker memory) {
return Broker({ account: users.broker, fee: BROKER_FEE });
}
Expand Down

0 comments on commit a7a4a66

Please sign in to comment.