diff --git a/package.json b/package.json index 3d2639e..2caad42 100644 --- a/package.json +++ b/package.json @@ -40,8 +40,7 @@ "@openzeppelin/contracts": "4.9.3", "ds-test": "github:dapphub/ds-test#e282159", "forge-std": "github:foundry-rs/forge-std#v1.5.6", - "isolmate": "github:defi-wonderland/isolmate#59e1804", - "prb/test": "github:paulrberg/prb-test#a245c71" + "isolmate": "github:defi-wonderland/isolmate#59e1804" }, "devDependencies": { "@commitlint/cli": "17.0.3", diff --git a/remappings.txt b/remappings.txt index 39416e4..895d295 100644 --- a/remappings.txt +++ b/remappings.txt @@ -1,5 +1,4 @@ ds-test/=node_modules/ds-test/src -prb/test/=node_modules/prb/test/src/ forge-std/=node_modules/forge-std/src isolmate/=node_modules/isolmate/src diff --git a/solidity/test/utils/DSTestFull.sol b/solidity/test/utils/DSTestFull.sol deleted file mode 100644 index c1bd856..0000000 --- a/solidity/test/utils/DSTestFull.sol +++ /dev/null @@ -1,67 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity =0.8.19; - -import {PRBTest} from 'prb/test/PRBTest.sol'; - -contract DSTestFull is PRBTest { - // Seed for the generation of pseudorandom addresses - bytes32 private _nextAddressSeed = keccak256(abi.encodePacked('address')); - - /** - * @dev Creates a new pseudorandom address and labels it with the given label - * @param _name Name of the label. - * @return _address The address generated and labeled - */ - function _label(string memory _name) internal returns (address _address) { - return _label(_newAddress(), _name); - } - - /** - * @dev Labels the given address and returns it - * - * @param _addy Address to label. - * @param _name Name of the label. - * - * @return _address The address Labeled address - */ - function _label(address _addy, string memory _name) internal returns (address _address) { - vm.label(_addy, _name); - return _addy; - } - - /** - * @dev Creates a mock contract in a pseudorandom address and labels it. - * @param _name Label for the mock contract. - * @return _address The address of the mock contract. - */ - function _mockContract(string memory _name) internal returns (address _address) { - return _mockContract(_newAddress(), _name); - } - - /** - * @dev Creates a mock contract in a specified address and labels it. - * - * @param _addy Address for the mock contract. - * @param _name Label for the mock contract. - * - * @return _address The address of the mock contract. - */ - function _mockContract(address _addy, string memory _name) internal returns (address _address) { - vm.etch(_addy, new bytes(0x1)); - return _label(_addy, _name); - } - - /** - * @dev Creates a pseudorandom address. - * @return _address The address of the mock contract. - */ - function _newAddress() internal returns (address _address) { - address payable _nextAddress = payable(address(uint160(uint256(_nextAddressSeed)))); - _nextAddressSeed = keccak256(abi.encodePacked(_nextAddressSeed)); - _address = _nextAddress; - } - - function _expectEmitNoIndex() internal { - vm.expectEmit(false, false, false, true); - } -} diff --git a/yarn.lock b/yarn.lock index 062d27a..df2d574 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2252,10 +2252,6 @@ pluralize@^8.0.0: resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== -"prb/test@github:paulrberg/prb-test#a245c71": - version "0.6.0" - resolved "https://codeload.github.com/paulrberg/prb-test/tar.gz/a245c71edc07643aedfe27df4cc7b21048aa8824" - prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"