Skip to content

Commit

Permalink
update lib
Browse files Browse the repository at this point in the history
  • Loading branch information
6boris committed Oct 16, 2023
1 parent 2d20a9d commit 8977264
Show file tree
Hide file tree
Showing 22 changed files with 27 additions and 79 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,9 @@
[submodule "foundry/lib/@openzeppelin/contracts-v4.7.3"]
path = foundry/lib/@openzeppelin/contracts-v4.7.3
url = https://github.com/OpenZeppelin/openzeppelin-contracts
[submodule "foundry/lib/@solady"]
path = foundry/lib/@solady
url = https://github.com/Vectorized/solady
[submodule "foundry/lib/@solmate"]
path = foundry/lib/@solmate
url = https://github.com/transmissions11/solmate
77 changes: 1 addition & 76 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,84 +17,9 @@ yarn
安装指定版本

```bash

git submodule update --init --recursive

# OR
forge install foundry-rs/[email protected] --no-commit
forge install transmissions11/solmate@0384dbaaa4fcb5715738a9254a7c0a4cb62cf458 --no-commit
forge install vectorized/[email protected] --no-commit

forge install Uniswap/v2-periphery --no-commit
forge install Uniswap/v2-core --no-commit

forge install Uniswap/v3-periphery --no-commit
forge install Uniswap/v3-core --no-commit

forge install Uniswap/v4-periphery --no-commit
forge install Uniswap/v4-core --no-commit

forge install OpenZeppelin/[email protected] --no-commit
forge install OpenZeppelin/[email protected] --no-commit

# OpenZeppelin v4
v4.7.1

git clone https://github.com/OpenZeppelin/openzeppelin-contracts foundry/lib/openzeppelin-contracts-v4.7.1 && cd foundry/lib/openzeppelin-contracts-v4.7.1 && git checkout tags/v4.7.1

git clone https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable foundry/lib/openzeppelin-contracts-upgradeable-v4.7.1 && cd foundry/lib/openzeppelin-contracts-upgradeable-v4.7.1 && git checkout tags/v4.7.1

git rm --cached foundry/lib/openzeppelin-contracts-v4.7.1

git submodule add https://github.com/OpenZeppelin/openzeppelin-contracts foundry/lib/openzeppelin-contracts-v4.7.1

git submodule add https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable foundry/lib/openzeppelin-contracts-upgradeable-v4.7.1

git submodule add https://github.com/safe-global/safe-contracts foundry/lib/safe-contracts-v1.3.0



git submodule add https://github.com/foundry-rs/forge-std foundry/lib/@dev/forge-std
git submodule add https://github.com/PaulRBerg/prb-test foundry/lib/@dev/prb-test
git submodule add https://github.com/dapphub/ds-test foundry/lib/@dev/ds-test


git submodule add https://github.com/Uniswap/v2-core foundry/lib/@uniswap/v2-core
git submodule add https://github.com/Uniswap/v2-periphery foundry/lib/@uniswap/v2-periphery

git submodule add https://github.com/Uniswap/v3-core foundry/lib/@uniswap/v3-core
git submodule add https://github.com/Uniswap/v3-periphery foundry/lib/@uniswap/v3-periphery

git submodule add https://github.com/Uniswap/v4-core foundry/lib/@uniswap/v4-core
git submodule add https://github.com/Uniswap/v4-periphery foundry/lib/@uniswap/v4-periphery

git submodule add https://github.com/safe-global/safe-contracts foundry/lib/@gnosis.pm/safe-contracts
git submodule add https://github.com/safe-global/safe-contracts foundry/lib/@gnosis.pm/safe-contracts-v1.3.0
# cd foundry/lib/@gnosis.pm/safe-contracts-v1.3.0 && git checkout tags/v1.3.0

git submodule add https://github.com/OpenZeppelin/openzeppelin-contracts foundry/lib/@openzeppelin/contracts
git submodule add https://github.com/OpenZeppelin/openzeppelin-contracts foundry/lib/@openzeppelin/contracts-v4.7.1
# cd foundry/lib/@openzeppelin/contracts-v4.7.1 && git checkout tags/v4.7.1
git submodule add https://github.com/OpenZeppelin/openzeppelin-contracts foundry/lib/@openzeppelin/contracts-v4.7.3
# cd foundry/lib/@openzeppelin/contracts-v4.7.3 && git checkout tags/v4.7.3


git submodule add https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable foundry/lib/@openzeppelin/contracts-upgradeable
git submodule add https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable foundry/lib/@openzeppelin/contracts-upgradeable-v4.7.1
# cd foundry/lib/@openzeppelin/contracts-upgradeable-v4.7.1 && git checkout tags/v4.7.1

git submodule add https://github.com/transmissions11/solmate



rm -rf .git/modules/foundry/lib/@dev/ds-test
git submodule deinit -f foundry/lib/@dev/ds-test
git rm --cached -r foundry/lib/@dev/ds-test
rm -rf foundry/lib/@dev/ds-test


forge install safe-global/safe-contracts --no-commit

forge install
```

```bash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import { ERC20 } from "openzeppelin-contracts/contracts/token/ERC20/ERC20.sol";
import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract MintableERC20 is ERC20 {
address public owner;
Expand Down
1 change: 1 addition & 0 deletions foundry/lib/@dev/forge-std
Submodule forge-std added at f73c73
1 change: 1 addition & 0 deletions foundry/lib/@dev/prb-test
Submodule prb-test added at 2ece87
1 change: 1 addition & 0 deletions foundry/lib/@gnosis.pm/safe-contracts
Submodule safe-contracts added at 810fad
1 change: 1 addition & 0 deletions foundry/lib/@gnosis.pm/safe-contracts-v1.3.0
Submodule safe-contracts-v1.3.0 added at 186a21
1 change: 1 addition & 0 deletions foundry/lib/@openzeppelin/contracts
Submodule contracts added at 638329
1 change: 1 addition & 0 deletions foundry/lib/@openzeppelin/contracts-upgradeable
Submodule contracts-upgradeable added at 9610f7
1 change: 1 addition & 0 deletions foundry/lib/@openzeppelin/contracts-upgradeable-v4.7.1
1 change: 1 addition & 0 deletions foundry/lib/@openzeppelin/contracts-v4.7.1
Submodule contracts-v4.7.1 added at 3b8b4b
1 change: 1 addition & 0 deletions foundry/lib/@openzeppelin/contracts-v4.7.3
Submodule contracts-v4.7.3 added at ecd2ca
1 change: 1 addition & 0 deletions foundry/lib/@uniswap/v2-core
Submodule v2-core added at ee547b
1 change: 1 addition & 0 deletions foundry/lib/@uniswap/v2-periphery
Submodule v2-periphery added at 0335e8
1 change: 1 addition & 0 deletions foundry/lib/@uniswap/v3-core
Submodule v3-core added at d8b1c6
1 change: 1 addition & 0 deletions foundry/lib/@uniswap/v3-periphery
Submodule v3-periphery added at 697c24
1 change: 1 addition & 0 deletions foundry/lib/@uniswap/v4-core
Submodule v4-core added at 60de80
1 change: 1 addition & 0 deletions foundry/lib/@uniswap/v4-periphery
Submodule v4-periphery added at 581d96
1 change: 1 addition & 0 deletions foundry/lib/solady
Submodule solady added at a44f58
1 change: 1 addition & 0 deletions foundry/lib/solmate
Submodule solmate added at 0384db
2 changes: 1 addition & 1 deletion foundry/test/CTF/Damn-Vulnerable-DeFi/10.Free-Rider.t.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import { PRBTest } from "@dev/prb-test/src/PRBTest.sol";
import { PRBTest } from "@prb/test/PRBTest.sol";
import { DamnValuableNFT } from "@contracts/CTF/Damn-Vulnerable-DeFi/00.Base/DamnValuableNFT.sol";
import { DamnValuableToken } from "@contracts/CTF/Damn-Vulnerable-DeFi/00.Base/DamnValuableToken.sol";
import {
Expand Down
2 changes: 1 addition & 1 deletion remappings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

@solmate=foundry/lib/solmate/src
@solady=foundry/lib/solady/src
@prb/test=foundry/lib/prb-test/src
@prb/test=foundry/lib/@dev/prb-test/src

@gnosis.pm/safe-contracts=foundry/lib/@gnosis.pm/safe-contracts/contracts
@gnosis.pm/safe-contracts-v1.3.0=foundry/lib/@gnosis.pm/safe-contracts-v1.3.0/contracts
Expand Down

0 comments on commit 8977264

Please sign in to comment.