Skip to content

Commit

Permalink
remove oz contracts-upgradeable, upgrade oz, update tests/code
Browse files Browse the repository at this point in the history
  • Loading branch information
burnto committed Dec 14, 2023
1 parent cb0ea8a commit 1bf6605
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/openzeppelin-contracts-upgradeable"]
path = lib/openzeppelin-contracts-upgradeable
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
1 change: 0 additions & 1 deletion lib/openzeppelin-contracts-upgradeable
Submodule openzeppelin-contracts-upgradeable deleted from 3d4c0d
3 changes: 1 addition & 2 deletions src/IPizza.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

import {PaymentSplitterUpgradeable} from "openzeppelin-contracts-upgradeable/finance/PaymentSplitterUpgradeable.sol";
import {Initializable} from "openzeppelin-contracts-upgradeable/proxy/utils/Initializable.sol";
import {Initializable} from "openzeppelin-contracts/proxy/utils/Initializable.sol";

interface IPizza {
function initialize(address[] memory _payees, uint256[] memory _shares) external;
Expand Down
7 changes: 4 additions & 3 deletions test/PizzaFactory.t.sol
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
pragma solidity 0.8.23;

import {Test, console2} from "forge-std/Test.sol";
import {PizzaFactory, PizzaCreated} from "../src/PizzaFactory.sol";
import {Pizza} from "../src/Pizza.sol";
import {Address} from "openzeppelin-contracts/utils/Address.sol";
import {IERC20} from "openzeppelin-contracts/token/ERC20/IERC20.sol";
import {Clones} from "openzeppelin-contracts/proxy/Clones.sol";

event PaymentReceived(address from, uint256 amount);

contract CounterTest is Test {
contract PizzaFactoryTest is Test {
PizzaFactory public f;
address[] payees;
uint256[] shares;
Expand Down Expand Up @@ -47,7 +48,7 @@ contract CounterTest is Test {

function test_createDeterministicOnce(uint256 nonce) public {
Pizza(payable(address(f.createDeterministic(payees, shares, nonce))));
vm.expectRevert("ERC1167: create2 failed");
vm.expectRevert(abi.encodeWithSelector(Clones.ERC1167FailedCreateClone.selector));
f.createDeterministic(payees, shares, nonce);
}

Expand Down

0 comments on commit 1bf6605

Please sign in to comment.