Skip to content

Commit

Permalink
flattening
Browse files Browse the repository at this point in the history
  • Loading branch information
FortisFortuna committed Feb 22, 2024
1 parent ecbe4f9 commit 01124ce
Show file tree
Hide file tree
Showing 6 changed files with 12,100 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,24 @@ To easily execute specific foundry profiles like `profile test forge test -w`
- `source .env`
- `npm run deploy:{network}`

FORGE FLATTENING
forge flatten --output src/flattened-pair.sol src/contracts/core/FraxswapPair.sol
forge flatten --output src/flattened-router.sol src/contracts/periphery/FraxswapRouter.sol
forge flatten --output src/flattened-factory.sol src/contracts/core/FraxswapFactory.sol
forge flatten --output src/flattened-router-multihop.sol src/contracts/periphery/FraxswapRouterMultihop.sol
sed -i '/SPDX-License-Identifier/d' ./src/flattened-pair.sol &&
sed -i '/pragma solidity/d' ./src/flattened-pair.sol &&
sed -i '1s/^/\/\/ SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.8.0;\n\n/' ./src/flattened-pair.sol
sed -i '/SPDX-License-Identifier/d' ./src/flattened-factory.sol &&
sed -i '/pragma solidity/d' ./src/flattened-factory.sol &&
sed -i '1s/^/\/\/ SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.8.0;\n\n/' ./src/flattened-factory.sol
sed -i '/SPDX-License-Identifier/d' ./src/flattened-router.sol &&
sed -i '/pragma solidity/d' ./src/flattened-router.sol &&
sed -i '1s/^/\/\/ SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.8.0;\n\n/' ./src/flattened-router.sol
sed -i '/SPDX-License-Identifier/d' ./src/flattened-router-multihop.sol &&
sed -i '/pragma solidity/d' ./src/flattened-router-multihop.sol &&
sed -i '1s/^/\/\/ SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.8.0;\n\n/' ./src/flattened-router-multihop.sol


## Tooling
This repo uses the following tools:
Expand Down
Loading

0 comments on commit 01124ce

Please sign in to comment.