Skip to content

Commit

Permalink
bump openzeppelin/contracts (#10887)
Browse files Browse the repository at this point in the history
* bump openzeppelin/contracts

* bump to 4.9.3

* bump OZ 4.7.0 deps to 4.8.0 and rm 4.7.0 from repo

* normalize contracts-upgradeable import

* rm foundry OZ ref

* bump OZ upgradable to 4.9.3

* rm old vendor version

* fix failing automation tests

* prettier

---------

Co-authored-by: Ryan Hall <[email protected]>
  • Loading branch information
RensR and RyanRHall authored Oct 13, 2023
1 parent 30c6b4b commit eb3cb9e
Show file tree
Hide file tree
Showing 42 changed files with 54 additions and 1,305 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "contracts/foundry-lib/forge-std"]
path = contracts/foundry-lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "contracts/foundry-lib/openzeppelin-contracts"]
path = contracts/foundry-lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
1 change: 0 additions & 1 deletion contracts/foundry-lib/openzeppelin-contracts
Submodule openzeppelin-contracts deleted from 1a60b0
5 changes: 2 additions & 3 deletions contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@
},
"dependencies": {
"@eth-optimism/contracts": "^0.5.21",
"@openzeppelin/contracts": "~4.3.3",
"@openzeppelin/contracts-upgradeable-4.7.3": "npm:@openzeppelin/[email protected]",
"@openzeppelin/contracts-v0.7": "npm:@openzeppelin/[email protected]"
"@openzeppelin/contracts": "~4.9.3",
"@openzeppelin/contracts-upgradeable": "~4.9.3"
}
}
25 changes: 9 additions & 16 deletions contracts/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion contracts/remappings.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
ds-test/=foundry-lib/forge-std/lib/ds-test/src
forge-std/=foundry-lib/forge-std/src
openzeppelin-contracts/=foundry-lib/openzeppelin-contracts/contracts/

@openzeppelin/=node_modules/@openzeppelin/
hardhat/=node_modules/hardhat/
Expand Down
11 changes: 6 additions & 5 deletions contracts/scripts/native_solc_compile_all_functions
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ OPTIMIZE_RUNS=1000000


SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
ROOT="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; cd ../../ && pwd -P )"
ROOT="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; cd ../ && pwd -P )"
python3 -m pip install --require-hashes -r $SCRIPTPATH/requirements.txt

solc-select install $SOLC_VERSION
Expand All @@ -20,11 +20,12 @@ export SOLC_VERSION=$SOLC_VERSION


compileContract () {
solc --overwrite --optimize --optimize-runs $OPTIMIZE_RUNS --metadata-hash none \
-o $ROOT/contracts/solc/v$SOLC_VERSION/functions/$1 \
solc @openzeppelin/=$ROOT/node_modules/@openzeppelin/ \
--overwrite --optimize --optimize-runs $OPTIMIZE_RUNS --metadata-hash none \
-o $ROOT/solc/v$SOLC_VERSION/functions/$1 \
--abi --bin \
--allow-paths $ROOT/contracts/src/v0.8,$ROOT/contracts/src/v0.8/functions \
$ROOT/contracts/src/v0.8/functions/$2
--allow-paths $ROOT/src/v0.8,$ROOT/node_modules \
$ROOT/src/v0.8/functions/$2
}

##########################
Expand Down
4 changes: 2 additions & 2 deletions contracts/src/v0.8/automation/upkeeps/ERC20BalanceMonitor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ pragma solidity ^0.8.4;

import "../../shared/access/ConfirmedOwner.sol";
import "../interfaces/KeeperCompatibleInterface.sol";
import "../../vendor/openzeppelin-solidity/v4.7.0/contracts/security/Pausable.sol";
import "../../vendor/openzeppelin-solidity/v4.7.0/contracts/token/ERC20/utils/SafeERC20.sol";
import "../../vendor/openzeppelin-solidity/v4.8.0/contracts/security/Pausable.sol";
import "../../vendor/openzeppelin-solidity/v4.8.0/contracts/token/ERC20/utils/SafeERC20.sol";

/**
* @title The ERC20BalanceMonitor contract.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ pragma solidity 0.8.6;

import "../../shared/access/ConfirmedOwner.sol";
import "../interfaces/KeeperCompatibleInterface.sol";
import "../../vendor/openzeppelin-solidity/v4.7.0/contracts/security/Pausable.sol";
import "../../vendor/openzeppelin-solidity/v4.7.0/contracts/token/ERC20/IERC20.sol";
import "../../vendor/openzeppelin-solidity/v4.8.0/contracts/security/Pausable.sol";
import "../../vendor/openzeppelin-solidity/v4.8.0/contracts/token/ERC20/IERC20.sol";
import "../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/structs/EnumerableMap.sol";

interface IAggregatorProxy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {IAuthorizedOriginReceiver} from "./accessControl/interfaces/IAuthorizedO
import {ConfirmedOwnerUpgradeable} from "./accessControl/ConfirmedOwnerUpgradeable.sol";
import {AuthorizedReceiver} from "./accessControl/AuthorizedReceiver.sol";
import {SafeCast} from "../../../vendor/openzeppelin-solidity/v4.8.0/contracts/utils/math/SafeCast.sol";
import {PausableUpgradeable} from "../../../vendor/openzeppelin-contracts-upgradeable/v4.8.1/security/PausableUpgradeable.sol";
import {Initializable} from "../../../vendor/openzeppelin-contracts-upgradeable/v4.8.1/proxy/utils/Initializable.sol";
import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/**
* @title Functions Billing Registry contract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.6;
import {IFunctionsOracle, IFunctionsBillingRegistry} from "./interfaces/IFunctionsOracle.sol";
import {OCR2BaseUpgradeable} from "./ocr/OCR2BaseUpgradeable.sol";
import {AuthorizedOriginReceiverUpgradeable} from "./accessControl/AuthorizedOriginReceiverUpgradeable.sol";
import {Initializable} from "../../../vendor/openzeppelin-contracts-upgradeable/v4.8.1/proxy/utils/Initializable.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/**
* @title Functions Oracle contract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity ^0.8.6;

import {EnumerableSet} from "../../../../vendor/openzeppelin-solidity/v4.8.0/contracts/utils/structs/EnumerableSet.sol";
import {Initializable} from "../../../../vendor/openzeppelin-contracts-upgradeable/v4.8.1/proxy/utils/Initializable.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import {IAuthorizedOriginReceiver} from "./interfaces/IAuthorizedOriginReceiver.sol";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity ^0.8.6;

import {IOwnable} from "../../../../shared/interfaces/IOwnable.sol";
import {Initializable} from "../../../../vendor/openzeppelin-contracts-upgradeable/v4.8.1/proxy/utils/Initializable.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/**
* @title The ConfirmedOwnerUpgradeable contract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity ^0.8.0;

import {ConfirmedOwnerUpgradeable} from "../accessControl/ConfirmedOwnerUpgradeable.sol";
import {OCR2Abstract} from "./OCR2Abstract.sol";
import {Initializable} from "../../../../vendor/openzeppelin-contracts-upgradeable/v4.8.1/proxy/utils/Initializable.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/**
* @notice Onchain verification of reports from the offchain reporting protocol
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity ^0.8.6;

import {EnumerableSet} from "../../../../../vendor/openzeppelin-solidity/v4.8.0/contracts/utils/structs/EnumerableSet.sol";
import {Initializable} from "../../../../../vendor/openzeppelin-contracts-upgradeable/v4.8.1/proxy/utils/Initializable.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import {AuthorizedOriginReceiverInterface} from "./AuthorizedOriginReceiverInterface.sol";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity ^0.8.6;

import {IOwnable} from "../../../../../shared/interfaces/IOwnable.sol";
import {Initializable} from "../../../../../vendor/openzeppelin-contracts-upgradeable/v4.8.1/proxy/utils/Initializable.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/**
* @title The ConfirmedOwnerUpgradeable contract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {AuthorizedOriginReceiverInterface} from "./AuthorizedOriginReceiverInter
import {ConfirmedOwnerUpgradeable} from "./ConfirmedOwnerUpgradeable.sol";
import {AuthorizedReceiver} from "./AuthorizedReceiver.sol";
import {SafeCast} from "../../../../../vendor/openzeppelin-solidity/v4.8.0/contracts/utils/math/SafeCast.sol";
import {PausableUpgradeable} from "../../../../../vendor/openzeppelin-contracts-upgradeable/v4.8.1/security/PausableUpgradeable.sol";
import {Initializable} from "../../../../../vendor/openzeppelin-contracts-upgradeable/v4.8.1/proxy/utils/Initializable.sol";
import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/**
* @title Functions Billing Registry contract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {AuthorizedOriginReceiverInterface} from "./AuthorizedOriginReceiverInter
import {ConfirmedOwnerUpgradeable} from "./ConfirmedOwnerUpgradeable.sol";
import {AuthorizedReceiver} from "./AuthorizedReceiver.sol";
import {SafeCast} from "../../../../../vendor/openzeppelin-solidity/v4.8.0/contracts/utils/math/SafeCast.sol";
import {PausableUpgradeable} from "../../../../../vendor/openzeppelin-contracts-upgradeable/v4.8.1/security/PausableUpgradeable.sol";
import {Initializable} from "../../../../../vendor/openzeppelin-contracts-upgradeable/v4.8.1/proxy/utils/Initializable.sol";
import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/**
* @title Functions Billing Registry contract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {FunctionsOracleInterface} from "./FunctionsOracleInterface.sol";
import {FunctionsBillingRegistryInterface} from "./FunctionsBillingRegistryInterface.sol";
import {OCR2BaseUpgradeable} from "./OCR2BaseUpgradeable.sol";
import {AuthorizedOriginReceiverUpgradeable} from "./AuthorizedOriginReceiverUpgradeable.sol";
import {Initializable} from "../../../../../vendor/openzeppelin-contracts-upgradeable/v4.8.1/proxy/utils/Initializable.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/**
* @title Functions Oracle contract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {FunctionsOracleInterface} from "./FunctionsOracleInterface.sol";
import {FunctionsBillingRegistryInterface} from "./FunctionsBillingRegistryInterface.sol";
import {OCR2BaseUpgradeable} from "./OCR2BaseUpgradeable.sol";
import {AuthorizedOriginReceiverUpgradeable} from "./AuthorizedOriginReceiverUpgradeable.sol";
import {Initializable} from "../../../../../vendor/openzeppelin-contracts-upgradeable/v4.8.1/proxy/utils/Initializable.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/**
* @title Functions Oracle contract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity ^0.8.0;

import {ConfirmedOwnerUpgradeable} from "./ConfirmedOwnerUpgradeable.sol";
import {OCR2Abstract} from "./OCR2Abstract.sol";
import {Initializable} from "../../../../../vendor/openzeppelin-contracts-upgradeable/v4.8.1/proxy/utils/Initializable.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/**
* @notice Onchain verification of reports from the offchain reporting protocol
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/v0.8/vendor/MockOVMCrossDomainMessenger.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity >=0.7.6 <0.9.0;

import "./openzeppelin-solidity/v4.7.0/contracts/utils/Address.sol";
import "./openzeppelin-solidity/v4.8.0/contracts/utils/Address.sol";

/**
* @title iOVM_CrossDomainMessenger
Expand Down
Loading

0 comments on commit eb3cb9e

Please sign in to comment.