Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

- name: Run Forge build
run: |
forge build --sizes
forge build --sizes --skip script
id: build

- name: Run Forge tests
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ docs/

# Dotenv file
.env

/dev-ctx/
15 changes: 15 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,18 @@
[submodule "libflat/ethereum-vault-connector"]
path = libflat/ethereum-vault-connector
url = https://github.com/euler-xyz/ethereum-vault-connector
[submodule "libflat/permit2"]
path = libflat/permit2
url = https://github.com/Uniswap/permit2
[submodule "libflat/openzeppelin-contracts"]
path = libflat/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
[submodule "libflat/v4-core"]
path = libflat/v4-core
url = https://github.com/uniswap/v4-core
[submodule "libflat/v4-periphery"]
path = libflat/v4-periphery
url = https://github.com/uniswap/v4-periphery
[submodule "libflat/solmate"]
path = libflat/solmate
url = https://github.com/rari-capital/solmate
30 changes: 30 additions & 0 deletions chains.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
let chains = [
//// PRODUCTION

{
chainId: 31337,
name: 'dev',
safeBaseUrl: 'https://app.safe.global',
safeAddressPrefix: 'dev',
status: 'beta',
},
];



const fs = require("node:fs");

for (let c of chains) {
let addrsDir = `./dev-ctx/addresses/${c.chainId}/`;

c.addresses = {};

for (const file of fs.readdirSync(addrsDir)) {
if (!file.endsWith('Addresses.json')) continue;
let section = file.replace(/Addresses[.]json$/, 'Addrs');
section = (section[0] + '').toLowerCase() + section.substr(1);
c.addresses[section] = JSON.parse(fs.readFileSync(`${addrsDir}/${file}`).toString());
}
}

fs.writeFileSync('./dev-ctx/EulerChains.json', JSON.stringify(chains));
14 changes: 14 additions & 0 deletions deploy-scenario.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

set -e

SCENARIO=$1

rm -rf dev-ctx/
mkdir -p dev-ctx/{addresses,labels,priceapi}/31337

forge script --rpc-url ${RPC_URL:-http://127.0.0.1:8545} "script/scenarios/$SCENARIO.s.sol" --broadcast --code-size-limit 100000 -vv
cast rpc evm_increaseTime 86400 || true
cast rpc evm_mine || true

node chains.js
28 changes: 28 additions & 0 deletions devland.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

set -e

SCENARIO=${1:-EulerSwapBasic}


function cleanup {
pkill -P $$
}

trap cleanup EXIT


PORT=${PORT:-8545}
anvil --port $PORT --code-size-limit 100000 &
sleep 1


RPC_URL=http://127.0.0.1:$PORT bash ./deploy-scenario.sh "$SCENARIO"


echo -------------------------------
echo DEVLAND READY
echo SCENARIO = $SCENARIO
echo -------------------------------

wait
3 changes: 2 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ libs = ["lib"]

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

auto_detect_remappings = false
auto_detect_remappings = false
fs_permissions = [{ access = "read-write", path = "./dev-ctx/"}]
1 change: 1 addition & 0 deletions libflat/openzeppelin-contracts
Submodule openzeppelin-contracts added at 0aaa23
1 change: 1 addition & 0 deletions libflat/permit2
Submodule permit2 added at cc56ad
1 change: 1 addition & 0 deletions libflat/solmate
Submodule solmate added at c93f77
1 change: 1 addition & 0 deletions libflat/v4-core
Submodule v4-core added at b619b6
1 change: 1 addition & 0 deletions libflat/v4-periphery
Submodule v4-periphery added at 9628c3
2 changes: 1 addition & 1 deletion remappings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ openzeppelin-contracts/=libflat/openzeppelin-contracts/contracts/
@uniswap/v4-periphery/=libflat/v4-periphery/
v4-periphery/=libflat/v4-periphery/
v4-core/=libflat/v4-core/src/
solmate/=libflat/solmate/
solmate/=libflat/solmate/src/

ethereum-vault-connector/=libflat/ethereum-vault-connector/src/
evc/=libflat/ethereum-vault-connector/src/
Expand Down
19 changes: 0 additions & 19 deletions script/Counter.s.sol

This file was deleted.

Loading