Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate callbacks to axis-periphery #225

Merged
merged 22 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .solhintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
lib/**
dependencies/**
src/modules/Modules.sol
src/modules/Keycode.sol
src/lib/**
test/lib/uniswap-v2/*.sol
test/lib/uniswap-v3/*.sol
src/lib/clones/**
src/lib/permit2/**
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@ Many of the contracts (e.g. callbacks) require a specific address prefix or have

- 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 run full-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.
- There has been a change to the dependencies under `/lib` or `/dependencies`. The dependencies affect the build output, so any changes will affect the bytecode generated by the Solidity compiler.
- If the change was inadvertent, this can be fixed by running `pnpm install` to reset the changes.
- 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
Expand Down Expand Up @@ -102,6 +101,18 @@ Deployments are listed in the [env.json file](/script/env.json) and periodically

[soldeer](https://soldeer.xyz/) is used as the dependency manager, as it solves many of the problems inherent in forge's use of git submodules. Soldeer is integrated into `forge`, so should not require any additional installations.

NOTE: The import path of each dependency is versioned. This ensures that any changes to the dependency version result in clear errors to highlight the potentially-breaking change.

#### Updating Dependencies

When updating the version of a dependency provided through soldeer, the following must be performed:

1. Update the version of the dependency in `foundry.toml` or through `forge soldeer`
2. Re-run the [installation script](#first-run)
3. If the version number has changed:
- Change the existing entry in [remappings.txt](remappings.txt) to point to the new dependency version
- Update imports to use the new remapping

### Packaging

To publish a new package version to soldeer, run the following:
Expand Down
5 changes: 0 additions & 5 deletions foundry.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[profile.default]
src = "src"
out = "out"
# libs = ["lib"]
fs_permissions = [{access = "read-write", path = "./bytecode/"}, {access = "read", path = "./script/"}, {access = "read-write", path = "./deployments/"}]
ffi = true
solc_version = "0.8.19"
Expand All @@ -21,7 +20,6 @@ quote_style = "double"
number_underscore = "thousands"
wrap_comments = false
ignore = [
"lib/**",
"src/lib/**",
]

Expand All @@ -32,7 +30,4 @@ forge-std = { version = "1.9.1" }
solmate = { version = "6.7.0", url = "[email protected]:transmissions11/solmate.git", commit = "c892309933b25c03d32b1b0d674df7ae292ba925" }
solady = { version = "0.0.124" }
"@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" }
clones-with-immutable-args = { version = "1.1.1", git = "[email protected]:wighawag/clones-with-immutable-args.git", rev = "f5ca191afea933d50a36d101009b5644dc28bc99" }
47 changes: 0 additions & 47 deletions lib/g-uni-v1-core/.circleci/config.yml

This file was deleted.

3 changes: 0 additions & 3 deletions lib/g-uni-v1-core/.env.example

This file was deleted.

6 changes: 0 additions & 6 deletions lib/g-uni-v1-core/.eslintignore

This file was deleted.

83 changes: 0 additions & 83 deletions lib/g-uni-v1-core/.eslintrc.json

This file was deleted.

1 change: 0 additions & 1 deletion lib/g-uni-v1-core/.gitattributes

This file was deleted.

34 changes: 0 additions & 34 deletions lib/g-uni-v1-core/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion lib/g-uni-v1-core/.husky/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions lib/g-uni-v1-core/.husky/pre-commit

This file was deleted.

4 changes: 0 additions & 4 deletions lib/g-uni-v1-core/.husky/pre-push

This file was deleted.

6 changes: 0 additions & 6 deletions lib/g-uni-v1-core/.prettierignore

This file was deleted.

1 change: 0 additions & 1 deletion lib/g-uni-v1-core/.prettierrc.json

This file was deleted.

10 changes: 0 additions & 10 deletions lib/g-uni-v1-core/.solcover.js

This file was deleted.

46 changes: 0 additions & 46 deletions lib/g-uni-v1-core/.solhint.json

This file was deleted.

2 changes: 0 additions & 2 deletions lib/g-uni-v1-core/.solhintignore

This file was deleted.

Loading
Loading