Skip to content

Commit

Permalink
Merge pull request #5 from Uniswap/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
gretzke authored Jul 25, 2024
2 parents 49d13d1 + 37d76ca commit 303081d
Show file tree
Hide file tree
Showing 919 changed files with 81,490 additions and 238 deletions.
89 changes: 0 additions & 89 deletions .github/workflows/coverage.yaml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/test.yaml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/update-submodules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Update Submodules

on:
push:
branches:
- main
- staging
- dev
schedule:
# Run this workflow daily at 03:17 UTC
- cron: "17 3 * * *"

jobs:
update-submodules:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Update Submodules
run: |
git submodule update --init --remote src/pkgs
- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Setup SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}

- name: Check for Changes
id: git-check
run: |
echo "::set-output name=changes::$(git status --porcelain)"
- name: Commit and Push if Changes are Present
if: steps.git-check.outputs.changes != ''
run: |
git remote set-url origin [email protected]:${{ github.repository }}.git
git add .
git commit -m "Update submodules"
git push
30 changes: 30 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,33 @@
[submodule "lib/forge-gas-snapshot"]
path = lib/forge-gas-snapshot
url = https://github.com/marktoda/forge-gas-snapshot
[submodule "src/pkgs/v2-core"]
path = src/pkgs/v2-core
url = https://github.com/Uniswap/v2-core
[submodule "src/pkgs/v2-periphery"]
path = src/pkgs/v2-periphery
url = https://github.com/Uniswap/v2-periphery
[submodule "lib/solidity-lib"]
path = lib/solidity-lib
url = https://github.com/Uniswap/solidity-lib
[submodule "src/pkgs/v3-core"]
path = src/pkgs/v3-core
url = https://github.com/Uniswap/v3-core
[submodule "src/pkgs/v3-periphery"]
path = src/pkgs/v3-periphery
url = https://github.com/Uniswap/v3-periphery
[submodule "lib/base64"]
path = lib/base64
url = https://github.com/Brechtpd/base64
[submodule "src/pkgs/v4-core"]
path = src/pkgs/v4-core
url = https://github.com/Uniswap/v4-core/
[submodule "src/pkgs/v4-periphery"]
path = src/pkgs/v4-periphery
url = https://github.com/Uniswap/v4-periphery/
[submodule "src/pkgs/permit2"]
path = src/pkgs/permit2
url = https://github.com/Uniswap/permit2/
[submodule "src/pkgs/universal-router"]
path = src/pkgs/universal-router
url = https://github.com/Uniswap/universal-router
9 changes: 9 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

forge clean;
repos=$(ls src/pkgs/);
for repo in $repos
do
echo "Starting build of $repo";
FOUNDRY_PROFILE=$repo forge build;
done
41 changes: 35 additions & 6 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,51 @@ src = "src"
out = "out"
libs = ["lib"]
optimizer = true
optimizer_runs = 999999
optimizer_runs = 800
bytecode_hash = "none"
via_ir = false
solc = "0.8.26"
verbosity = 2
ffi = true
fs_permissions = [
{ access = "read-write", path = ".forge-snapshots"},
{ access = "read", path = "script/" }
]
evm_version = "cancun"

remappings = [
"forge-std=lib/forge-std/src",
"@openzeppelin/contracts=lib/openzeppelin-contracts/contracts",
"@openzeppelin/contracts-upgradeable=lib/openzeppelin-contracts-upgradeable/contracts"
skip = [
"src/pkgs/**/audits/**",
"src/pkgs/**/certora/**",
"*.t.sol",
"*.s.sol"
]

[profile.v2-core]
src = "src/pkgs/v2-core"

[profile.v2-periphery]
src = "src/pkgs/v2-periphery"

[profile.v3-core]
src = "src/pkgs/v3-core"

[profile.v3-periphery]
src = "src/pkgs/v3-periphery"

[profile.v4-core]
src = "src/pkgs/v4-core"

[profile.v4-periphery]
src = "src/pkgs/v4-periphery"
libs = ["src/pkgs/v4-core", "lib"]

[profile.permit2]
src = "src/pkgs/permit2"
via_ir = true

[profile.universal-router]
src = "src/pkgs/universal-router"
via_ir = true

[profile.default.fuzz]
runs = 1000

Expand Down
1 change: 1 addition & 0 deletions lib/base64
Submodule base64 added at dcbf85
Loading

0 comments on commit 303081d

Please sign in to comment.