Skip to content

Commit

Permalink
fix gasProxy & add deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
Attens1423 committed Oct 29, 2024
1 parent 5de10bd commit 64e2a5d
Show file tree
Hide file tree
Showing 78 changed files with 26,522 additions and 5,897 deletions.
114 changes: 114 additions & 0 deletions broadcast/Deploy.s.sol/421614/run-1730188333.json

Large diffs are not rendered by default.

114 changes: 114 additions & 0 deletions broadcast/Deploy.s.sol/421614/run-1730189264.json

Large diffs are not rendered by default.

221 changes: 221 additions & 0 deletions broadcast/Deploy.s.sol/421614/run-latest.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion contracts/SmartRoute/DODOGasProxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ contract DODOGasProxy is Ownable {
bytes calldata callData
) external payable whenNotPaused returns (bytes memory) {
// Check if target contract is whitelisted
require(isWhiteListedContract[approveTarget], "DODOGasProxy: NOT_WHITELISTED");
require(isWhiteListedApproveContract[approveTarget], "DODOGasProxy: NOT_WHITELISTED");
require(isWhiteListedContract[targetContract], "DODOGasProxy: NOT_WHITELISTED");

// Check and collect gas fee
uint256 requiredGasFee = chainGasFee[chainId];
Expand Down
4 changes: 2 additions & 2 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ optimizer_runs = 200
solc-version = "0.8.16"
verbosity = 1
remappings = [
'@rari-capital/solmate/src=node_modules/@rari-capital/solmate/src'
'@openzeppelin/=node_modules/@openzeppelin/contracts/'
]
src = 'contracts'
out = 'out'
libs = ['node_modules']
libs = ["node_modules"]
test = 'test'
cache_path = 'cache-foundry'

Expand Down
1 change: 1 addition & 0 deletions lib/forge-std/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/Vm.sol linguist-generated
128 changes: 128 additions & 0 deletions lib/forge-std/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
name: CI

on:
workflow_dispatch:
pull_request:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Print forge version
run: forge --version

# Backwards compatibility checks:
# - the oldest and newest version of each supported minor version
# - versions with specific issues
- name: Check compatibility with latest
if: always()
run: |
output=$(forge build --skip test)
if echo "$output" | grep -q "Warning"; then
echo "$output"
exit 1
fi
- name: Check compatibility with 0.8.0
if: always()
run: |
output=$(forge build --skip test --use solc:0.8.0)
if echo "$output" | grep -q "Warning"; then
echo "$output"
exit 1
fi
- name: Check compatibility with 0.7.6
if: always()
run: |
output=$(forge build --skip test --use solc:0.7.6)
if echo "$output" | grep -q "Warning"; then
echo "$output"
exit 1
fi
- name: Check compatibility with 0.7.0
if: always()
run: |
output=$(forge build --skip test --use solc:0.7.0)
if echo "$output" | grep -q "Warning"; then
echo "$output"
exit 1
fi
- name: Check compatibility with 0.6.12
if: always()
run: |
output=$(forge build --skip test --use solc:0.6.12)
if echo "$output" | grep -q "Warning"; then
echo "$output"
exit 1
fi
- name: Check compatibility with 0.6.2
if: always()
run: |
output=$(forge build --skip test --use solc:0.6.2)
if echo "$output" | grep -q "Warning"; then
echo "$output"
exit 1
fi
# via-ir compilation time checks.
- name: Measure compilation time of Test with 0.8.17 --via-ir
if: always()
run: forge build --skip test --contracts test/compilation/CompilationTest.sol --use solc:0.8.17 --via-ir

- name: Measure compilation time of TestBase with 0.8.17 --via-ir
if: always()
run: forge build --skip test --contracts test/compilation/CompilationTestBase.sol --use solc:0.8.17 --via-ir

- name: Measure compilation time of Script with 0.8.17 --via-ir
if: always()
run: forge build --skip test --contracts test/compilation/CompilationScript.sol --use solc:0.8.17 --via-ir

- name: Measure compilation time of ScriptBase with 0.8.17 --via-ir
if: always()
run: forge build --skip test --contracts test/compilation/CompilationScriptBase.sol --use solc:0.8.17 --via-ir

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Print forge version
run: forge --version

- name: Run tests
run: forge test -vvv

fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Print forge version
run: forge --version

- name: Check formatting
run: forge fmt --check
31 changes: 31 additions & 0 deletions lib/forge-std/.github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Sync Release Branch

on:
release:
types:
- created

jobs:
sync-release-branch:
runs-on: ubuntu-latest
if: startsWith(github.event.release.tag_name, 'v1')
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: v1

# The email is derived from the bots user id,
# found here: https://api.github.com/users/github-actions%5Bbot%5D
- name: Configure Git
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Sync Release Branch
run: |
git fetch --tags
git checkout v1
git reset --hard ${GITHUB_REF}
git push --force
26 changes: 0 additions & 26 deletions lib/forge-std/.github/workflows/tests.yml

This file was deleted.

2 changes: 1 addition & 1 deletion lib/forge-std/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cache/
out/
.vscode
.idea
.idea
3 changes: 0 additions & 3 deletions lib/forge-std/.gitmodules

This file was deleted.

Loading

0 comments on commit 64e2a5d

Please sign in to comment.