Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
06e15d9
chore: prevent postinstall script running if we're a dependency to an…
edmulraney Aug 22, 2024
c141419
Merge pull request #20 from Axis-Fi/chore/handle-postinstall
edmulraney Aug 23, 2024
ad5ffe5
test
edmulraney Aug 23, 2024
65e0cfb
Revert "test"
edmulraney Aug 23, 2024
8e8a776
Revert "chore: prevent postinstall script running if we're a dependen…
edmulraney Aug 23, 2024
a68d38d
Merge pull request #22 from Axis-Fi/chore/handle-postinstall
edmulraney Aug 23, 2024
13eea60
Fix failure with baseline invariant test
0xJem Aug 23, 2024
c179d61
Fix compilation warnings
0xJem Aug 23, 2024
ec2aefe
Merge pull request #23 from Axis-Fi/invariants-fix
0xJem Aug 23, 2024
833d408
Merge branch 'master' into fix/baseline-target-price
0xJem Aug 30, 2024
c493062
Add poolTargetTick parameter for Baseline callbacks, along with tests.
0xJem Aug 30, 2024
9b62bc7
Version bump
0xJem Aug 30, 2024
201636e
Adjust maximum floorReservesPercent to 99%
0xJem Sep 4, 2024
1f57769
Add SSH private key to fix Baseline checkout
0xJem Sep 10, 2024
33ba176
chore: linting
0xJem Sep 10, 2024
0825965
chore: update salts
0xJem Sep 10, 2024
64c7c3c
Attempt to fix checkout issues
0xJem Sep 10, 2024
a14ae6e
Checkout tweaks
0xJem Sep 10, 2024
74a46ea
Install script exits on error
0xJem Sep 10, 2024
669d92b
Use ssh-agent
0xJem Sep 10, 2024
2e5129a
Fixes for remappings and soldeer breaking changes
0xJem Sep 10, 2024
8ae6cfe
Document SSH shenanigans
0xJem Sep 10, 2024
5c0b6a0
Merge pull request #24 from Axis-Fi/fix/baseline-target-price
Oighty Sep 10, 2024
6f6ec2b
Update CHANGELOG
0xJem Sep 11, 2024
8e42643
Merge pull request #26 from Axis-Fi/fix/changelog
0xJem Sep 11, 2024
b50f0cb
Merge branch 'master' into master-merge
0xJem Feb 24, 2025
7c7f174
Fix soldeer
0xJem Feb 24, 2025
4561235
Add optimizer
0xJem Feb 24, 2025
f64af22
chore: update salts and constants
0xJem Feb 24, 2025
ed94f26
chore: linting
0xJem Feb 24, 2025
8ce5d18
Merge pull request #29 from Axis-Fi/master-merge
0xJem Feb 24, 2025
f1c075c
Remove baseline submodule from git
0xJem Mar 4, 2025
de1b0f0
Comment-out references to Baseline
0xJem Mar 4, 2025
50012d2
Disable Baseline constants
0xJem Mar 4, 2025
ae5a881
Fixed addresses for Uniswap V2 contracts in tests
0xJem Mar 4, 2025
5d8197d
Shift soldeer to use https for git repositories
0xJem Mar 4, 2025
6100a28
chore: update salts. All tests passing.
0xJem Mar 4, 2025
fed4ef4
chore: linting
0xJem Mar 4, 2025
f6322bb
Script to generate and return salt
0xJem Mar 4, 2025
b8f1ccf
Modify allowlist tests to generate salts
0xJem Mar 4, 2025
6e2884c
Don't write contract bytecode if it already exists
0xJem Mar 4, 2025
e94cebf
Generate salts for Uniswap tests
0xJem Mar 4, 2025
7eb390c
chore: linting
0xJem Mar 4, 2025
dd4fc9b
Remove obsolete WithSalts helper
0xJem Mar 4, 2025
e4649bc
Remove obsolete test salts
0xJem Mar 4, 2025
91a6199
Remove obsolete docs
0xJem Mar 4, 2025
18ef144
Create the bytecode directory
0xJem Mar 4, 2025
2055e47
Use foundry stable
0xJem Mar 4, 2025
b24ff80
Remove Baseline code instead of commenting-out
0xJem Mar 5, 2025
beae888
chore: linting
0xJem Mar 5, 2025
80820eb
Merge pull request #30 from Axis-Fi/remove-baseline
0xJem Mar 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ jobs:
name: Foundry project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Git Checkout
uses: actions/checkout@v4
with:
submodules: recursive
submodules: false
persist-credentials: false

- name: Install Node.js
uses: actions/setup-node@v2
Expand All @@ -31,8 +33,15 @@ jobs:

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

# Providing the SSH key to the checkout action does not work with our config.
# It likely is because of the install script wiping the lib/ directory.
# For this reason, we disable submodule checkouts above, set up the SSH agent
# with the provided key, and then run the install script.
- name: Setup SSH key
uses: webfactory/ssh-agent@v0.9.0
with:
version: nightly
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Install Dependencies
run: |
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "lib/baseline-v2"]
path = lib/baseline-v2
url = git@github.com:0xBaseline/baseline-v2.git
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.0.1

- Baseline: Add additional `poolTargetTick` parameter to callbacks.
- Baseline: Adjust maximum floorReservesPercent to 99%.

## 1.0.0

- Introduces direct-to-liquidity callbacks. Multi-use, permissionless versions are available for UniswapV2 and UniswapV3 pools. Permissioned launches are available for Baseline pools on Blast.
Expand Down
11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,6 @@ The test suite can be run with:
pnpm run test
```

#### Address Mismatch

Many of the contracts (e.g. callbacks) require a specific address prefix or have a deterministic address. If tests are failing for this reason, the cause is usually one of:

- The code of a callback contract has been changed
- This requires re-generating the salt for the contract. See the [test_salts.sh](/script/salts/test/test_salts.sh) script.
- There has been a change to the dependencies under `/lib`. The dependencies affect the build output, so any changes will affect the bytecode generated by the Solidity compiler.
- If the submodule change was inadvertent, this can be fixed by running `pnpm install` to reset the changes.
- In some cases, such as the `g-uni-v1-core` dependency, installing npm packages will result in the remappings being changed. It is best to remove the dependency's respective dependencies in order to fix this.
- If the change to dependencies and invalidation of salts is expected, then new salts must be generated. In some cases (such as Uniswap V2 and V3 factories), the new addresses must be recorded in the `Constants.sol` file.

### Format

Combines `forge fmt` and `solhint`
Expand Down
10 changes: 5 additions & 5 deletions deployments/.berachain-bartio-v1.0.0.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"deployments.callbacks.BatchCappedMerkleAllowlist": "0x98E7125E5763E05e62ef6DA691FAb74875798Dfb",
"deployments.callbacks.BatchMerkleAllowlist": "0x98537660E6e5699c51ae92F40f2F44C4173E1fD5",
"deployments.callbacks.BatchTokenAllowlist": "0x988143a01124F899d163b9868D3220AEBA02a599",
"deployments.callbacks.BatchAllocatedMerkleAllowlist": "0x981B55d72AaA7F7dBfaFeafa2DfFfd3971305ec6",
"deployments.callbacks.BatchUniswapV2DirectToLiquidity": "0xE64012Ff6ae44540dA3b47147dB5551f1cB25137"
"deployments.callbacks.BatchCappedMerkleAllowlist": "0x98E7125E5763E05e62ef6DA691FAb74875798Dfb",
"deployments.callbacks.BatchMerkleAllowlist": "0x98537660E6e5699c51ae92F40f2F44C4173E1fD5",
"deployments.callbacks.BatchTokenAllowlist": "0x988143a01124F899d163b9868D3220AEBA02a599",
"deployments.callbacks.BatchAllocatedMerkleAllowlist": "0x981B55d72AaA7F7dBfaFeafa2DfFfd3971305ec6",
"deployments.callbacks.BatchUniswapV2DirectToLiquidity": "0xE64012Ff6ae44540dA3b47147dB5551f1cB25137"
}
8 changes: 4 additions & 4 deletions deployments/.berachain-v1.0.0.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"deployments.callbacks.BatchCappedMerkleAllowlist": "0x984754FbFEDD9e0F02f22E00dee3FFa344070fEa",
"deployments.callbacks.BatchMerkleAllowlist": "0x98fA5b8503bF37f130e9F6D728CF4c7C2a3F5990",
"deployments.callbacks.BatchTokenAllowlist": "0x9805C84c7ba37615a549644fFEbaBA752e21A7cE",
"deployments.callbacks.BatchAllocatedMerkleAllowlist": "0x98487D56d7873E0BE148d3e3a5a85D465aD5Ed44"
"deployments.callbacks.BatchCappedMerkleAllowlist": "0x984754FbFEDD9e0F02f22E00dee3FFa344070fEa",
"deployments.callbacks.BatchMerkleAllowlist": "0x98fA5b8503bF37f130e9F6D728CF4c7C2a3F5990",
"deployments.callbacks.BatchTokenAllowlist": "0x9805C84c7ba37615a549644fFEbaBA752e21A7cE",
"deployments.callbacks.BatchAllocatedMerkleAllowlist": "0x98487D56d7873E0BE148d3e3a5a85D465aD5Ed44"
}
17 changes: 10 additions & 7 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ fs_permissions = [
ffi = true
solc_version = "0.8.19"
evm_version = "paris"
optimizer = true
optimizer_runs = 200

[fuzz]
runs = 1024
Expand All @@ -35,19 +37,20 @@ ignore = [

# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options

[soldeer]
remappings_generate = false # Disable replacing existing/custom remappings
remappings_regenerate = false

[dependencies]
forge-std = { version = "1.9.1" }
axis-core = { version = "1.0.4" }
"@openzeppelin-contracts" = { version = "4.9.2" }
"@openzeppelin-contracts-upgradeable" = { version = "4.9.2" }
"@uniswap-v2-core" = { version = "1.0.1" }
"@uniswap-v3-core" = { version = "1.0.1-solc-0.8-simulate" }
g-uni-v1-core = { version = "0.9.9", git = "git@github.com:Axis-Fi/g-uni-v1-core.git", rev = "d6bcb6e811e86d36bc836c002eb2e9a2c73d29ca" }
"@uniswap-v2-periphery" = { version = "1.0.1", git = "git@github.com:Axis-Fi/uniswap-v2-periphery.git", rev = "19be650786731dfe43cac3aac7a2d1f0731d18e2" }
"@uniswap-v3-periphery" = { version = "1.4.2-solc-0.8", git = "git@github.com:Uniswap/v3-periphery.git", rev = "b325bb0905d922ae61fcc7df85ee802e8df5e96c" }
g-uni-v1-core = { version = "0.9.9", git = "https://github.com/Axis-Fi/g-uni-v1-core.git", rev = "d6bcb6e811e86d36bc836c002eb2e9a2c73d29ca" }
"@uniswap-v2-periphery" = { version = "1.0.1", git = "https://github.com/Axis-Fi/uniswap-v2-periphery.git", rev = "19be650786731dfe43cac3aac7a2d1f0731d18e2" }
"@uniswap-v3-periphery" = { version = "1.4.2-solc-0.8", git = "https://github.com/Uniswap/v3-periphery.git", rev = "b325bb0905d922ae61fcc7df85ee802e8df5e96c" }
solmate = { version = "6.8.0" }
clones-with-immutable-args = { version = "1.1.1", git = "git@github.com:wighawag/clones-with-immutable-args.git", rev = "f5ca191afea933d50a36d101009b5644dc28bc99" }
clones-with-immutable-args = { version = "1.1.1", git = "https://github.com/wighawag/clones-with-immutable-args.git", rev = "f5ca191afea933d50a36d101009b5644dc28bc99" }
solady = { version = "0.0.124" }

[soldeer]
remappings_regenerate = false
1 change: 0 additions & 1 deletion lib/baseline-v2
Submodule baseline-v2 deleted from 60bed7
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "axis-periphery",
"version": "0.9.0",
"version": "1.0.1",
"description": "",
"main": "index.js",
"engines": {
Expand Down
1 change: 0 additions & 1 deletion remappings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@
@openzeppelin/contracts=dependencies/@openzeppelin-contracts-4.9.2
@openzeppelin/contracts-upgradeable=dependencies/@openzeppelin-contracts-upgradeable-4.9.2
@solady-0.0.124=dependencies/solady-0.0.124/src
@baseline=lib/baseline-v2/src
Loading
Loading