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: 2 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ jobs:
include:
- test: happy_e2e_open_fill_settle
timeout_minutes: 10
- test: happy_e2e_native_fill_settle
timeout_minutes: 10
- test: submit_e2e_hyperlane
timeout_minutes: 10
- test: permit2_e2e
Expand Down
10 changes: 10 additions & 0 deletions config/demo.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@
],
"the_compact_address": "0x00000000000000000000000000000000000003ea",
"tokens": [
{
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18,
"symbol": "ETH"
},
{
"address": "0x00000000000000000000000000000000000003ed",
"decimals": 18,
Expand All @@ -127,6 +132,11 @@
],
"the_compact_address": "0x00000000000000000000000000000000000003f3",
"tokens": [
{
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18,
"symbol": "ETH"
},
{
"address": "0x00000000000000000000000000000000000003f6",
"decimals": 18,
Expand Down
12 changes: 12 additions & 0 deletions config/example-broadcaster.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
"the_compact_address": "0x00000000000000171ede64904551eedf3c6c9788",
"allocator_address": "0x565466528d126141ddb5c7d558803f79d9b66a6d",
"tokens": [
{
"symbol": "ETH",
"name": "Ether",
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18
},
{
"symbol": "USDC",
"name": "USD Coin",
Expand All @@ -36,6 +42,12 @@
"the_compact_address": "0x00000000000000171ede64904551eedf3c6c9788",
"allocator_address": "0x04bb6e565f0067e0411528e2d3a55a712d9a8b32",
"tokens": [
{
"symbol": "ETH",
"name": "Ether",
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18
},
{
"symbol": "USDC",
"name": "USD Coin",
Expand Down
12 changes: 12 additions & 0 deletions config/example-hyperlane.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
"the_compact_address": "0x00000000000000171ede64904551eedf3c6c9788",
"allocator_address": "0x565466528d126141ddb5c7d558803f79d9b66a6d",
"tokens": [
{
"symbol": "ETH",
"name": "Ether",
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18
},
{
"symbol": "USDC",
"name": "USD Coin",
Expand All @@ -35,6 +41,12 @@
"the_compact_address": "0x00000000000000171ede64904551eedf3c6c9788",
"allocator_address": "0x04bb6e565f0067e0411528e2d3a55a712d9a8b32",
"tokens": [
{
"symbol": "ETH",
"name": "Ether",
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18
},
{
"symbol": "USDC",
"name": "USD Coin",
Expand Down
18 changes: 16 additions & 2 deletions config/non-seeded-networks-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@
"input_settler_compact_address": "0x3333333333333333333333333333333333333333",
"the_compact_address": "0x4444444444444444444444444444444444444444",
"allocator_address": "0x5555555555555555555555555555555555555555",
"tokens": []
"tokens": [
{
"symbol": "ETH",
"name": "Ether",
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18
}
]
},
{
"chain_id": 1235,
Expand All @@ -24,7 +31,14 @@
"input_settler_compact_address": "0x8888888888888888888888888888888888888888",
"the_compact_address": "0x9999999999999999999999999999999999999999",
"allocator_address": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"tokens": []
"tokens": [
{
"symbol": "ETH",
"name": "Ether",
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18
}
]
}
],
"admin": {
Expand Down
12 changes: 12 additions & 0 deletions config/seed-overrides-kms-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
"name": "optimism-sepolia",
"type": "parent",
"tokens": [
{
"symbol": "ETH",
"name": "Ether",
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18
},
{
"symbol": "USDC",
"name": "USD Coin",
Expand All @@ -29,6 +35,12 @@
"name": "base-sepolia",
"type": "hub",
"tokens": [
{
"symbol": "ETH",
"name": "Ether",
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18
},
{
"symbol": "USDC",
"name": "USD Coin",
Expand Down
18 changes: 18 additions & 0 deletions config/seed-overrides-mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
"name": "optimism",
"type": "parent",
"tokens": [
{
"symbol": "ETH",
"name": "Ether",
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18
},
{
"symbol": "USDC",
"name": "USD Coin",
Expand All @@ -20,6 +26,12 @@
"name": "base",
"type": "hub",
"tokens": [
{
"symbol": "ETH",
"name": "Ether",
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18
},
{
"symbol": "USDC",
"name": "USD Coin",
Expand All @@ -33,6 +45,12 @@
"name": "arbitrum",
"type": "new",
"tokens": [
{
"symbol": "ETH",
"name": "Ether",
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18
},
{
"symbol": "USDC",
"name": "USD Coin",
Expand Down
12 changes: 12 additions & 0 deletions config/seed-overrides-testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"name": "optimism-sepolia",
"type": "parent",
"tokens": [
{
"symbol": "ETH",
"name": "Ether",
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18
},
{
"symbol": "USDC",
"name": "USD Coin",
Expand All @@ -19,6 +25,12 @@
"name": "base-sepolia",
"type": "hub",
"tokens": [
{
"symbol": "ETH",
"name": "Ether",
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18
},
{
"symbol": "USDC",
"name": "USD Coin",
Expand Down
10 changes: 8 additions & 2 deletions crates/solver-core/src/engine/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::SolverError;
use alloy_primitives::hex;
use solver_config::Config;
use solver_delivery::DeliveryService;
use solver_types::{Address, ExecutionContext, Intent};
use solver_types::{is_native_address, Address, ExecutionContext, Intent};
use std::collections::HashMap;
use std::sync::Arc;
use std::time::{Duration, SystemTime, UNIX_EPOCH};
Expand Down Expand Up @@ -250,6 +250,7 @@ impl ContextBuilder {
.get_tokens_for_chain(chain_id)
.await
.into_iter()
.filter(|token| !is_native_address(&token.address))
.map(|token| hex::encode(&token.address.0))
.collect()
}
Expand Down Expand Up @@ -339,6 +340,11 @@ mod tests {
.symbol("WETH")
.decimals(18)
.build();
let native_token = TokenConfigBuilder::new()
.address(Address(vec![0u8; 20]))
.symbol("ETH")
.decimals(18)
.build();

// Use NetworkConfigBuilder but replace tokens completely using .tokens()
// Note: This will extend the default tokens, so we need to account for that
Expand All @@ -351,7 +357,7 @@ mod tests {
.build();

// Manually set the tokens to exactly what we want (overriding defaults)
network_config.tokens = vec![usdc_token, weth_token];
network_config.tokens = vec![native_token, usdc_token, weth_token];

NetworksConfigBuilder::new()
.add_network(1, network_config)
Expand Down
Loading
Loading