Skip to content

Commit

Permalink
one contract per file, files match contract names (#75)
Browse files Browse the repository at this point in the history
* one contract per file, files match contract names

* snapshot
  • Loading branch information
anna-carroll authored Aug 5, 2024
1 parent 8a1a543 commit 914146a
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .gas-snapshot
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
GnosisSafeTest:test_gnosis_receive() (gas: 15927)
OrderOriginPermit2Test:test_fillPermit2() (gas: 223464)
OrderOriginPermit2Test:test_fillPermit2_multi() (gas: 1010764)
OrderOriginPermit2Test:test_fillPermit2_multi() (gas: 1007964)
OrderOriginPermit2Test:test_initiatePermit2() (gas: 233946)
OrderOriginPermit2Test:test_initiatePermit2_multi() (gas: 984506)
OrderOriginPermit2Test:test_initiatePermit2_multi() (gas: 981706)
OrdersTest:test_fill_ERC20() (gas: 71459)
OrdersTest:test_fill_ETH() (gas: 69090)
OrdersTest:test_fill_both() (gas: 167814)
Expand Down
5 changes: 3 additions & 2 deletions script/Zenith.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ pragma solidity 0.8.26;

// deploy contracts
import {Zenith} from "../src/Zenith.sol";
import {Transactor} from "../src/Transact.sol";
import {HostOrders, RollupOrders} from "../src/orders/Orders.sol";
import {Transactor} from "../src/Transactor.sol";
import {HostOrders} from "../src/orders/HostOrders.sol";
import {RollupOrders} from "../src/orders/RollupOrders.sol";
import {Passage} from "../src/passage/Passage.sol";
import {RollupPassage} from "../src/passage/RollupPassage.sol";
// utils
Expand Down
File renamed without changes.
9 changes: 9 additions & 0 deletions src/orders/HostOrders.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity 0.8.26;

import {OrderDestination} from "./OrderDestination.sol";
import {UsesPermit2} from "../UsesPermit2.sol";

contract HostOrders is OrderDestination {
constructor(address _permit2) UsesPermit2(_permit2) {}
}
4 changes: 0 additions & 4 deletions src/orders/Orders.sol → src/orders/RollupOrders.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import {OrderDestination} from "./OrderDestination.sol";
import {OrderOrigin} from "./OrderOrigin.sol";
import {UsesPermit2} from "../UsesPermit2.sol";

contract HostOrders is OrderDestination {
constructor(address _permit2) UsesPermit2(_permit2) {}
}

contract RollupOrders is OrderOrigin, OrderDestination {
constructor(address _permit2) UsesPermit2(_permit2) {}
}
2 changes: 1 addition & 1 deletion test/Orders.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity 0.8.26;

// test contracts
import {IOrders} from "../src/orders/IOrders.sol";
import {RollupOrders} from "../src/orders/Orders.sol";
import {RollupOrders} from "../src/orders/RollupOrders.sol";
import {OrderOrigin} from "../src/orders/OrderOrigin.sol";
// utils
import {TestERC20} from "./Helpers.t.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/Permit2Orders.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity 0.8.26;

// test contracts
import {RollupOrders} from "../src/orders/Orders.sol";
import {RollupOrders} from "../src/orders/RollupOrders.sol";
import {IOrders} from "../src/orders/IOrders.sol";
import {UsesPermit2} from "../src/UsesPermit2.sol";
// utils
Expand Down
2 changes: 1 addition & 1 deletion test/Permit2Passage.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ contract RollupPassagePermit2Test is SharedPermit2Test {
_setUpPermit2(token, amount);
_setupSinglePermit(token, amount);

// deploy Passage
// deploy RollupPassage
target = new RollupPassage(address(permit2Contract));
vm.label(address(target), "passage");

Expand Down
2 changes: 1 addition & 1 deletion test/Transact.t.sol → test/Transactor.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity 0.8.26;

// test contracts
import {Transactor} from "../src/Transact.sol";
import {Transactor} from "../src/Transactor.sol";
import {Passage} from "../src/passage/Passage.sol";
// utils
import {Test, console2} from "forge-std/Test.sol";
Expand Down

0 comments on commit 914146a

Please sign in to comment.