Skip to content

feat: deployment addresses #103

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

Merged
merged 2 commits into from
Jun 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
100 changes: 91 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,103 @@ forge coverage
forge doc --serve --port 4000
```

## Deployments
## Deployment Addresses

### Mainnet
On networks where Uniswap v4 is deployed, EulerSwap is deployed using a factory variant that creates Uniswap v4 hook compatible instances. Elsewhere, the original 'OG' version of EulerSwap factory is deployed.

Uniswap4 Hook Compatible:
## With Uniswap v4 Hook

- EulerSwapFactory: `0xb013be1D0D380C13B58e889f412895970A2Cf228`
- EulerSwapPeriphery: `0x208fF5Eb543814789321DaA1B5Eb551881D16b06`
### Mainnet (id: 1)

### Unichain
```javascript
{
"eulerSwapV1Factory": "0xb013be1D0D380C13B58e889f412895970A2Cf228",
"eulerSwapV1Implementation": "0xc35a0FDA69e9D71e68C0d9CBb541Adfd21D6B117",
"eulerSwapV1Periphery": "0x208fF5Eb543814789321DaA1B5Eb551881D16b06"
}
```

### Unichain (id: 130)

```javascript
{
"eulerSwapV1Factory": "0x45b146BC07c9985589B52df651310e75C6BE066A",
"eulerSwapV1Implementation": "0xd91B0bfACA4691E6Aca7E0E83D9B7F8917989a03",
"eulerSwapV1Periphery": "0xdAAF468d84DD8945521Ea40297ce6c5EEfc7003a"
}
```

### Avalanche C-Chain (id: 43114)

```javascript
{
"eulerSwapV1Factory": "0x8A1D3a4850ed7deeC9003680Cf41b8E75D27e440",
"eulerSwapV1Implementation": "0x4F4FDeE3568aC31C46634fb2Df3FF44A156Be351",
"eulerSwapV1Periphery": "0x31F34124a37f94efd17201A1B88d5008cD444c72"
}
```

### BNB Smart Chain (id: 56)

```javascript
{
"eulerSwapV1Factory": "0x3e378e5E339DF5e0Da32964F9EEC2CDb90D28Cc7",
"eulerSwapV1Implementation": "0x16BCa43290b77409e6D1c92B929f7A09C0E4EE86",
"eulerSwapV1Periphery": "0xa8826Bb29f875Db4c4b482463961776390774525"
}
```

### Base (id: 8453)

```javascript
{
"eulerSwapV1Factory": "0xf0CFe22d23699ff1B2CFe6B8f706A6DB63911262",
"eulerSwapV1Implementation": "0x3Ce63C16CB719a0c755DA25cd5dD35170A00424f",
"eulerSwapV1Periphery": "0x18e5F5C1ff5e905b32CE860576031AE90E1d1336"
}
```

## Without Uniswap v4 Hook

### Sonic (id: 146)

```javascript
{
"eulerSwapV1Factory": "0x94041db6deC15f79666B07846c13e6F7341b4a80",
"eulerSwapV1Implementation": "0x4D57F54582b333E4184A3cF40d1D61FE6D70c35D",
"eulerSwapV1Periphery": "0xb2237DC86B184e50Fc2F8b028B2b7AE192ef2566"
}
```

### Swellchain (id: 1923)

Uniswap4 Hook Compatible:
```javascript
{
"eulerSwapV1Factory": "0x976dd85654B3b2f9fb66280ACE30Cab7C81a2130",
"eulerSwapV1Implementation": "0x3620dAb0DB5595479a4D5408595D48FbE48CeA2A",
"eulerSwapV1Periphery": "0x34932C04c3d27c2BD7aCd0B5d203bfd65a17f481"
}
```

### Berachain (id: 80094)

```javascript
{
"eulerSwapV1Factory": "0xD14c95dc228E8851F63d9b83A0001F4D021B5DFf",
"eulerSwapV1Implementation": "0x0e05d236cb6c350935751A73e834A13111998e3c",
"eulerSwapV1Periphery": "0x46F951278f52f4798542C51BfB8Df1c165199150"
}
```

### BOB (id: 60808)

- EulerSwapFactory: `0x45b146BC07c9985589B52df651310e75C6BE066A`
- EulerSwapPeriphery: `0xdAAF468d84DD8945521Ea40297ce6c5EEfc7003a`
```javascript
{
"eulerSwapV1Factory": "0xE25B3cdA6fccAcbD794aEA64eE1B496d7b441644",
"eulerSwapV1Implementation": "0x334eac29ffAc27E6BC3484A738DAf520359698F0",
"eulerSwapV1Periphery": "0x199cC7C8606088bc22D82CDae2D7EE7F5F99ec9F"
}
```

## Getting Started

Expand Down
7 changes: 5 additions & 2 deletions script/DeployPool.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ contract DeployPool is ScriptUtil {
EulerSwapFactory factory = EulerSwapFactory(vm.parseJsonAddress(json, ".factory"));

address pool = factory.poolByEulerAccount(eulerAccount);
require(pool == address(0), "EulerSwap pool is already installed for this account. Run the uninstall script first.");
require(
pool == address(0), "EulerSwap pool is already installed for this account. Run the uninstall script first."
);

IEulerSwap.Params memory poolParams = IEulerSwap.Params({
vault0: vm.parseJsonAddress(json, ".vault0"),
Expand All @@ -43,7 +45,8 @@ contract DeployPool is ScriptUtil {
currReserve1: uint112(vm.parseJsonUint(json, ".currReserve1"))
});

bytes memory creationCode = MetaProxyDeployer.creationCodeMetaProxy(factory.eulerSwapImpl(), abi.encode(poolParams));
bytes memory creationCode =
MetaProxyDeployer.creationCodeMetaProxy(factory.eulerSwapImpl(), abi.encode(poolParams));
(address predictedPoolAddress, bytes32 salt) = HookMiner.find(
address(address(factory)),
uint160(
Expand Down