Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
6696983
feat: first version of the poc-offline-mode
Nov 7, 2025
2dd2558
feat: making the deploy work all over again, with add liquidity
Nov 10, 2025
c977540
feat: concluindo o state management;
Nov 10, 2025
65dd677
feat: Finally getting back to the error I got of no liquidity;
Nov 10, 2025
3d75908
fix: Fixing some more problems related with the baseline solver and d…
Nov 10, 2025
8f1f38f
feat: Making the test almost work, but the autopilot is not settling …
Nov 11, 2025
6cfe3de
feat: Making the quote work, finally;
Nov 11, 2025
82acbc0
feat: Finally the poc-offline-mode is running correctly;
Nov 12, 2025
8ed55a9
fix: cleaning cache and broadcast
Nov 12, 2025
b542e5c
feat: adding a .md file explaining the UniswapV2Library error.
Nov 12, 2025
ffc47e1
refactor: changing the config file of the driver and baseline to poin…
Nov 12, 2025
135ee65
refactor: removing old files;
Nov 12, 2025
2c7a9e3
chore: adding solidity outputs to gitignore;
Nov 13, 2025
c4eb6c3
chore: fixing, adding back uniswap-v2-periphery back and putting unis…
Nov 13, 2025
4451f77
chore: Adding README.md file, removing the UniswapV2LibraryErrorNote.…
Nov 13, 2025
95cf550
fix: fixing the driver and baseline deployment config location, readd…
Nov 13, 2025
51b0885
feat: V1 of PoC for performance-testing-suite;
Nov 19, 2025
025f553
chore: Removing .md unused files;
Nov 19, 2025
d5fdd72
wip: Fixing orders, InsufficientBalance error partially fixed;
Nov 19, 2025
126e036
feat: Now the load-test is finally working gracefully:
Nov 20, 2025
3572121
chore: removing unused files;
Nov 20, 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
9 changes: 9 additions & 0 deletions configs/offline/baseline.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
chain-id = "31337" # Anvil local chain
base-tokens = [
"0x5fbdb2315678afecb367f032d93f642f64180aa3", # WETH (auto-generated from deployment)
"0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9", # DAI (auto-generated from deployment)
"0x9fe46736679d2d9a65f0992f2272de9f3c7fa6e0", # USDC (auto-generated from deployment)
]
max-hops = 2
max-partial-attempts = 5
native-token-price-estimation-amount = "100000000000000000" # 0.1 ETH
35 changes: 35 additions & 0 deletions configs/offline/driver.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
app-data-fetching-enabled = true
orderbook-url = "http://orderbook"
tx-gas-limit = "45000000"

[[solver]]
name = "baseline" # Arbitrary name given to this solver, must be unique
endpoint = "http://baseline"
absolute-slippage = "40000000000000000" # Denominated in wei, optional
relative-slippage = "0.1" # Percentage in the [0, 1] range
# Anvil account #0 private key (from test mnemonic)
account = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"

[submission]
gas-price-cap = "1000000000000"

[[submission.mempool]]
mempool = "public"

[contracts]
gp-v2-settlement = "0xb7f8bc63bbcad18155201308c8f3540b07f84f5e"
weth = "0x5fbdb2315678afecb367f032d93f642f64180aa3"
balances = "0xbd5a6618df333f8f66702daadc9a953e2b52a65d"
signatures = "0x7377795aa7b4a8fca5e4e194f54eaff667db45f0"

[liquidity]
base-tokens = [
"0x5fbdb2315678afecb367f032d93f642f64180aa3", # WETH (auto-generated from deployment)
"0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9", # DAI (auto-generated from deployment)
"0x9fe46736679d2d9a65f0992f2272de9f3c7fa6e0", # USDC (auto-generated from deployment)
]

[[liquidity.uniswap-v2]] # Uniswap V2 configuration (auto-generated from deployment)
router = "0x5fc8d32690cc91d4c39d9d3abcbd16989f875707"
pool-code = "0xb6912aa8f91da604bdd903b3484a9f6bb569baa993085fc590133487ff27f91e" # Uniswap V2 init code hash
missing-pool-cache-time = "1h"
4 changes: 1 addition & 3 deletions crates/chain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ impl Chain {
| Self::Optimism => U256::from(10u128.pow(17)),
Self::Gnosis | Self::Avalanche | Self::Lens => U256::from(10u128.pow(18)),
Self::Polygon | Self::Plasma => U256::from(10u128.pow(20)),
Self::Hardhat => {
panic!("unsupported chain for default amount to estimate native prices with")
}
Self::Hardhat => U256::from(10u128.pow(17)), // Use same as testnets for local testing
}
}

Expand Down
10 changes: 9 additions & 1 deletion crates/solvers/src/infra/contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ impl Contracts {
Self {
weth: eth::WethAddress(
WETH9::deployment_address(&chain.id())
.expect("there should be a contract address for all supported chains")
.unwrap_or_else(|| {
// For local development chains (Hardhat/Anvil), use the standard deployment
// address from the test deployment at 0x5FbDB2315678afecb367f032d93F642f64180aa3
if chain.id() == 31337 {
"0x5FbDB2315678afecb367f032d93F642f64180aa3".parse().unwrap()
} else {
panic!("there should be a contract address for all supported chains")
}
})
.into_legacy(),
),
}
Expand Down
25 changes: 25 additions & 0 deletions playground/.env.offline
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Auto-generated by deploy-all.sh
# Generated at: 1763647692

# Network Configuration
CHAIN_ID=31337
NODE_URL=http://chain:8545
SIMULATION_NODE_URL=http://chain:8545

# Token Addresses (from deployment)
WETH_ADDRESS=0x5fbdb2315678afecb367f032d93f642f64180aa3
DAI_ADDRESS=0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9
USDC_ADDRESS=0x9fe46736679d2d9a65f0992f2272de9f3c7fa6e0
NATIVE_TOKEN_ADDRESS=0x5fbdb2315678afecb367f032d93f642f64180aa3

# Uniswap V2 Addresses (from deployment)
UNISWAP_V2_FACTORY_ADDRESS=0xdc64a140aa3e981100a9beca4e685f962f0cf6c9
UNISWAP_V2_ROUTER_ADDRESS=0x5fc8d32690cc91d4c39d9d3abcbd16989f875707

# CoW Protocol Addresses (from deployment)
SETTLEMENT_CONTRACT_ADDRESS=0xb7f8bc63bbcad18155201308c8f3540b07f84f5e
AUTHENTICATOR_ADDRESS=0x610178da211fef7d417bc0e6fed39f05609ad788
VAULT_RELAYER_ADDRESS=0x8daf17a20c9dba35f005b6324f493785d239719d
BALANCER_VAULT_ADDRESS=0x8A791620dd6260079BF849Dc5567aDC3F2FdC318
BALANCES_CONTRACT_ADDRESS=0xbd5a6618df333f8f66702daadc9a953e2b52a65d
SIGNATURES_CONTRACT_ADDRESS=0x7377795aa7b4a8fca5e4e194f54eaff667db45f0
Loading