Skip to content

Commit

Permalink
Created fns
Browse files Browse the repository at this point in the history
  • Loading branch information
mehranhydary committed Sep 17, 2024
1 parent f6c9df1 commit 1a7ad54
Show file tree
Hide file tree
Showing 13 changed files with 2,422 additions and 1,563 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ forge script script/DeployPermit2.s.sol --rpc-url http://localhost:8545 --privat
0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --broadcast -v --via-ir
```

11. You should also deploy the other Uniswap contracts

```sh
cd contracts

forge script script/V4Deployer.s.sol --rpc-url http://localhost:8545 --private-key \
0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --broadcast -v --via-ir
```

```
```
Expand Down
295 changes: 295 additions & 0 deletions contracts/broadcast/V4Deployer.s.sol/31337/run-1726539126.json

Large diffs are not rendered by default.

216 changes: 127 additions & 89 deletions contracts/broadcast/V4Deployer.s.sol/31337/run-latest.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions contracts/script/V4Deployer.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ import {PoolModifyLiquidityTest} from "v4-core/test/PoolModifyLiquidityTest.sol"
import {PoolDonateTest} from "v4-core/test/PoolDonateTest.sol";
import {PoolTakeTest} from "v4-core/test/PoolTakeTest.sol";
import {PoolClaimsTest} from "v4-core/test/PoolClaimsTest.sol";
import {MiladyPoolRouter} from "../src/MiladyPoolRouter.sol";

contract V4Deployer is Script {
function run() public {
vm.startBroadcast();

PoolManager manager = new PoolManager(0);
PoolSwapTest swapRouter = new PoolSwapTest(manager);
MiladyPoolRouter _swapRouter = new MiladyPoolRouter(manager);
PoolModifyLiquidityTest modifyLiquidityRouter = new PoolModifyLiquidityTest(
manager
);
Expand Down
3 changes: 2 additions & 1 deletion contracts/src/MiladyPoolRouter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ contract MiladyPoolRouter is WyvernInspired {
using CurrencySettler for Currency;

// TODO: Hardcoded for now, should update so that we pass it in
address constant PERMIT2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;
address public constant PERMIT2 =
0x000000000022D473030F116dDEE9F6B43aC78BA3;

struct CallbackData {
address sender;
Expand Down
36 changes: 36 additions & 0 deletions contracts/yarn-error.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Arguments:
/Users/mehrancastle/.nvm/versions/node/v18.18.2/bin/node /Users/mehrancastle/.yarn/bin/yarn.js add permit2-sdk

PATH:
/Users/mehrancastle/.rvm/gems/ruby-2.7.4/bin:/Users/mehrancastle/.rvm/gems/ruby-2.7.4@global/bin:/Users/mehrancastle/.rvm/rubies/ruby-2.7.4/bin:/Applications/Cursor.app/Contents/MacOS:/Users/mehrancastle/.bun/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/Users/mehrancastle/.yarn/bin:/Users/mehrancastle/.config/yarn/global/node_modules/.bin:/Users/mehrancastle/.nvm/versions/node/v18.18.2/bin:/Users/mehrancastle/Library/pnpm:/Users/mehrancastle/.local/share/solana/install/active_release/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Users/mehrancastle/Library/Android/sdk/platform-tools:/Users/mehrancastle/.rvm/gems/ruby-2.7.4/bin:/Users/mehrancastle/.rvm/gems/ruby-2.7.4@global/bin:/Users/mehrancastle/.rvm/rubies/ruby-2.7.4/bin:/Applications/Cursor.app/Contents/MacOS:/Users/mehrancastle/.bun/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/Users/mehrancastle/.yarn/bin:/Users/mehrancastle/.config/yarn/global/node_modules/.bin:/Users/mehrancastle/.nvm/versions/node/v18.18.2/bin:/Users/mehrancastle/Library/pnpm:/Users/mehrancastle/.local/share/solana/install/active_release/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/mehrancastle/.cargo/bin:/Users/mehrancastle/.sp1/bin:/Users/mehrancastle/.foundry/bin:/Users/mehrancastle/.rvm/bin:/Users/mehrancastle/.foundry/bin:/Users/mehrancastle/.rvm/bin

Yarn version:
1.22.19

Node version:
18.18.2

Platform:
darwin arm64

Trace:
Error: https://registry.npmjs.org/permit2-sdk: Not found
at params.callback [as _callback] (/Users/mehrancastle/.yarn/lib/cli.js:66145:18)
at self.callback (/Users/mehrancastle/.yarn/lib/cli.js:140890:22)
at Request.emit (node:events:517:28)
at Request.<anonymous> (/Users/mehrancastle/.yarn/lib/cli.js:141862:10)
at Request.emit (node:events:517:28)
at IncomingMessage.<anonymous> (/Users/mehrancastle/.yarn/lib/cli.js:141784:12)
at Object.onceWrapper (node:events:631:28)
at IncomingMessage.emit (node:events:529:35)
at endReadableNT (node:internal/streams/readable:1368:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

npm manifest:
No manifest

yarn manifest:
No manifest

Lockfile:
No lockfile
Loading

0 comments on commit 1a7ad54

Please sign in to comment.