Merge branch 'main' into remove-ekubo-balance-of-checks
This commit is contained in:
1
.github/workflows/evm-foundry-ci.yml
vendored
1
.github/workflows/evm-foundry-ci.yml
vendored
@@ -15,6 +15,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
with:
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Install Foundry
|
- name: Install Foundry
|
||||||
|
|||||||
13
CHANGELOG.md
13
CHANGELOG.md
@@ -1,3 +1,16 @@
|
|||||||
|
## [0.75.0](https://github.com/propeller-heads/tycho-execution/compare/0.74.0...0.75.0) (2025-04-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Unichain deployment ([d05e118](https://github.com/propeller-heads/tycho-execution/commit/d05e1183d4e85eb57c139b1fd5411833efea92fc))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Run foundry tests on PR branch (not main) ([43f1a07](https://github.com/propeller-heads/tycho-execution/commit/43f1a0701707d2dbf5bfa4f6ccde50aea48e46a1))
|
||||||
|
* Set native and wrapped tokens for Unichain ([4878229](https://github.com/propeller-heads/tycho-execution/commit/4878229e1d60a317b0f2d97ea57886e64cc70cb5))
|
||||||
|
|
||||||
## [0.74.0](https://github.com/propeller-heads/tycho-execution/compare/0.73.0...0.74.0) (2025-04-02)
|
## [0.74.0](https://github.com/propeller-heads/tycho-execution/compare/0.73.0...0.74.0) (2025-04-02)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -4341,7 +4341,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tycho-execution"
|
name = "tycho-execution"
|
||||||
version = "0.74.0"
|
version = "0.75.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"alloy",
|
"alloy",
|
||||||
"alloy-primitives",
|
"alloy-primitives",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tycho-execution"
|
name = "tycho-execution"
|
||||||
version = "0.74.0"
|
version = "0.75.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Provides tools for encoding and executing swaps against Tycho router and protocol executors."
|
description = "Provides tools for encoding and executing swaps against Tycho router and protocol executors."
|
||||||
repository = "https://github.com/propeller-heads/tycho-execution"
|
repository = "https://github.com/propeller-heads/tycho-execution"
|
||||||
|
|||||||
@@ -24,5 +24,10 @@
|
|||||||
},
|
},
|
||||||
"tenderly_base": {
|
"tenderly_base": {
|
||||||
"uniswap_v3": "0x7c7E06d7317e620a185078e236879D2a87fC8d22"
|
"uniswap_v3": "0x7c7E06d7317e620a185078e236879D2a87fC8d22"
|
||||||
|
},
|
||||||
|
"unichain": {
|
||||||
|
"uniswap_v2": "0x2E80FBD880379744b46C2aB7249D2949E6696353",
|
||||||
|
"uniswap_v3": "0x7ba9149EaCC5801279FF8B4d7ECa020bbef18F90",
|
||||||
|
"uniswap_v4": "0x475EB503D630C2919DC8B24cB6603E17e69Bfe35"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
"ethereum": "0x0178f471f219737c51d6005556d2f44de011a08a",
|
"ethereum": "0x0178f471f219737c51d6005556d2f44de011a08a",
|
||||||
"base": "0xC2C23b0199525DE070D126860133dc3badaD2EEb"
|
"base": "0xC2C23b0199525DE070D126860133dc3badaD2EEb",
|
||||||
|
"unichain": "0x9BDC3bE75440dBE563527CB39BB11cFBD1E21b09"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,11 @@ module.exports = {
|
|||||||
url: process.env.RPC_URL,
|
url: process.env.RPC_URL,
|
||||||
accounts: [process.env.PRIVATE_KEY],
|
accounts: [process.env.PRIVATE_KEY],
|
||||||
chainId: 8453
|
chainId: 8453
|
||||||
|
},
|
||||||
|
unichain: {
|
||||||
|
url: process.env.RPC_URL,
|
||||||
|
accounts: [process.env.PRIVATE_KEY],
|
||||||
|
chainId: 130
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -45,6 +50,20 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
etherscan: {
|
etherscan: {
|
||||||
apiKey: process.env.BLOCKCHAIN_EXPLORER_API_KEY,
|
apiKey: {
|
||||||
|
unichain: process.env.BLOCKCHAIN_EXPLORER_API_KEY,
|
||||||
|
base: process.env.BLOCKCHAIN_EXPLORER_API_KEY,
|
||||||
|
ethereum: process.env.BLOCKCHAIN_EXPLORER_API_KEY,
|
||||||
|
},
|
||||||
|
customChains: [
|
||||||
|
{
|
||||||
|
network: "unichain",
|
||||||
|
chainId: 130,
|
||||||
|
urls: {
|
||||||
|
apiURL: "https://api.uniscan.xyz/api",
|
||||||
|
browserURL: "https://www.uniscan.xyz/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ const executors_to_deploy = {
|
|||||||
// Args: Ekubo core contract
|
// Args: Ekubo core contract
|
||||||
{exchange: "EkuboExecutor", args: [
|
{exchange: "EkuboExecutor", args: [
|
||||||
"0xe0e0e08A6A4b9Dc7bD67BCB7aadE5cF48157d444"
|
"0xe0e0e08A6A4b9Dc7bD67BCB7aadE5cF48157d444"
|
||||||
|
]}
|
||||||
],
|
],
|
||||||
"base":[
|
"base":[
|
||||||
// Args: Factory, Pool Init Code Hash
|
// Args: Factory, Pool Init Code Hash
|
||||||
@@ -67,6 +68,20 @@ const executors_to_deploy = {
|
|||||||
{exchange: "UniswapV4Executor", args: ["0x498581ff718922c3f8e6a244956af099b2652b2b"]},
|
{exchange: "UniswapV4Executor", args: ["0x498581ff718922c3f8e6a244956af099b2652b2b"]},
|
||||||
{exchange: "BalancerV2Executor", args: []},
|
{exchange: "BalancerV2Executor", args: []},
|
||||||
],
|
],
|
||||||
|
"unichain":[
|
||||||
|
// Args: Factory, Pool Init Code Hash
|
||||||
|
{exchange: "UniswapV2Executor", args: [
|
||||||
|
"0x1f98400000000000000000000000000000000002",
|
||||||
|
"0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f"
|
||||||
|
]},
|
||||||
|
// USV3 - Args: Factory, Pool Init Code Hash
|
||||||
|
{exchange: "UniswapV3Executor", args: [
|
||||||
|
"0x1f98400000000000000000000000000000000003",
|
||||||
|
"0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54"
|
||||||
|
]},
|
||||||
|
// Args: Pool manager
|
||||||
|
{exchange: "UniswapV4Executor", args: ["0x1f98400000000000000000000000000000000004"]},
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ async function main() {
|
|||||||
// permit2 address is the same as on ethereum
|
// permit2 address is the same as on ethereum
|
||||||
permit2 = "0x000000000022D473030F116dDEE9F6B43aC78BA3";
|
permit2 = "0x000000000022D473030F116dDEE9F6B43aC78BA3";
|
||||||
weth = "0x4200000000000000000000000000000000000006";
|
weth = "0x4200000000000000000000000000000000000006";
|
||||||
|
} else if (network === "unichain") {
|
||||||
|
// permit2 address is the same as on ethereum
|
||||||
|
permit2 = "0x000000000022D473030F116dDEE9F6B43aC78BA3";
|
||||||
|
weth = "0x4200000000000000000000000000000000000006";
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`Unsupported network: ${network}`);
|
throw new Error(`Unsupported network: ${network}`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,5 +58,20 @@
|
|||||||
"FUND_RESCUER_ROLE": [
|
"FUND_RESCUER_ROLE": [
|
||||||
"0xb0A77f867Fcec1e9b271Ee17354bC6bBC0dD5662"
|
"0xb0A77f867Fcec1e9b271Ee17354bC6bBC0dD5662"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"unichain": {
|
||||||
|
"EXECUTOR_SETTER_ROLE": [
|
||||||
|
"0x810A00Fa9287700871ba0f870Cd89D7Eac08D48C"
|
||||||
|
],
|
||||||
|
"FEE_SETTER_ROLE": [],
|
||||||
|
"PAUSER_ROLE": [
|
||||||
|
"0x810A00Fa9287700871ba0f870Cd89D7Eac08D48C"
|
||||||
|
],
|
||||||
|
"UNPAUSER_ROLE": [
|
||||||
|
"0x810A00Fa9287700871ba0f870Cd89D7Eac08D48C"
|
||||||
|
],
|
||||||
|
"FUND_RESCUER_ROLE": [
|
||||||
|
"0x810A00Fa9287700871ba0f870Cd89D7Eac08D48C"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -35,7 +35,6 @@ use tycho_execution::encoding::{
|
|||||||
/// "token_out": "0x...",
|
/// "token_out": "0x...",
|
||||||
/// "split": 0.0
|
/// "split": 0.0
|
||||||
/// }],
|
/// }],
|
||||||
/// "router_address": "0x..."
|
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[command(author, version, about, long_about = None)]
|
#[command(author, version, about, long_about = None)]
|
||||||
|
|||||||
@@ -12,6 +12,6 @@ pub static GROUPABLE_PROTOCOLS: LazyLock<HashSet<&'static str>> = LazyLock::new(
|
|||||||
let mut set = HashSet::new();
|
let mut set = HashSet::new();
|
||||||
set.insert("uniswap_v4");
|
set.insert("uniswap_v4");
|
||||||
set.insert("balancer_v3");
|
set.insert("balancer_v3");
|
||||||
set.insert("ekubo");
|
set.insert("ekubo_v2");
|
||||||
set
|
set
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ impl Chain {
|
|||||||
self.decode_hex("0000000000000000000000000000000000000000", decode_err_msg)
|
self.decode_hex("0000000000000000000000000000000000000000", decode_err_msg)
|
||||||
}
|
}
|
||||||
324 => self.decode_hex("000000000000000000000000000000000000800A", decode_err_msg),
|
324 => self.decode_hex("000000000000000000000000000000000000800A", decode_err_msg),
|
||||||
|
130 => self.decode_hex("0000000000000000000000000000000000000000", decode_err_msg),
|
||||||
_ => Err(EncodingError::InvalidInput(format!(
|
_ => Err(EncodingError::InvalidInput(format!(
|
||||||
"Native token not set for chain {:?}. Double check the chain is supported.",
|
"Native token not set for chain {:?}. Double check the chain is supported.",
|
||||||
self.name
|
self.name
|
||||||
@@ -162,6 +163,7 @@ impl Chain {
|
|||||||
8453 => self.decode_hex("4200000000000000000000000000000000000006", decode_err_msg),
|
8453 => self.decode_hex("4200000000000000000000000000000000000006", decode_err_msg),
|
||||||
324 => self.decode_hex("5AEa5775959fBC2557Cc8789bC1bf90A239D9a91", decode_err_msg),
|
324 => self.decode_hex("5AEa5775959fBC2557Cc8789bC1bf90A239D9a91", decode_err_msg),
|
||||||
42161 => self.decode_hex("82aF49447D8a07e3bd95BD0d56f35241523fBab1", decode_err_msg),
|
42161 => self.decode_hex("82aF49447D8a07e3bd95BD0d56f35241523fBab1", decode_err_msg),
|
||||||
|
130 => self.decode_hex("4200000000000000000000000000000000000006", decode_err_msg),
|
||||||
_ => Err(EncodingError::InvalidInput(format!(
|
_ => Err(EncodingError::InvalidInput(format!(
|
||||||
"Wrapped token not set for chain {:?}. Double check the chain is supported.",
|
"Wrapped token not set for chain {:?}. Double check the chain is supported.",
|
||||||
self.name
|
self.name
|
||||||
|
|||||||
Reference in New Issue
Block a user