Skip to content
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

feat: weth to eth/weth bridge functionality #1115

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
bfadd76
add unwrap functionality
bmzig Jul 15, 2024
382d8a3
define ETH <-> WETH routes
bmzig Jul 17, 2024
0137fa0
Merge branch 'master' into bz/wethWrap
bmzig Jul 24, 2024
9ddd03c
fix incorrect data encoding
bmzig Jul 24, 2024
be863e0
bump contracts
bmzig Jul 24, 2024
b1382df
Merge branch 'master' into bz/wethWrap
bmzig Jul 26, 2024
9f1657b
Merge branch 'master' into bz/wethWrap
bmzig Aug 2, 2024
2f56e88
regenerate routes
bmzig Aug 2, 2024
9be9488
fix improper merge
bmzig Aug 2, 2024
69bf877
do not use the multicall handler when receiving ETH
bmzig Aug 2, 2024
aa38e73
Merge branch 'master' into bz/wethWrap
bmzig Aug 5, 2024
4b64ecc
Merge branch 'master' into bz/wethWrap
bmzig Aug 16, 2024
0f51bc5
Support WETH -> WETH/ETH
bmzig Aug 16, 2024
1532714
Merge branch 'master' into bz/wethWrap
bmzig Sep 2, 2024
5c5c1b2
rename
bmzig Sep 2, 2024
d83375e
regen routes
bmzig Sep 2, 2024
11e87ea
remove WETH -> ETH constraint
bmzig Sep 2, 2024
dfb4e6b
Merge branch 'master' into bz/wethWrap
bmzig Oct 4, 2024
4b70c46
regen routes, account for contract recipients, and remove tooltip
bmzig Oct 4, 2024
d9cb50b
Merge branch 'master' into bz/wethWrap
bmzig Oct 16, 2024
2c77ec4
add world chain multicall handler
bmzig Oct 16, 2024
1658417
use correct world chain def
bmzig Oct 16, 2024
5c01baf
don't use multicall handler on Polygon
bmzig Oct 16, 2024
157d13a
Merge branch 'master' into bz/wethWrap
bmzig Oct 22, 2024
051f400
enable weth -> eth
bmzig Oct 22, 2024
ba33674
empty message
bmzig Oct 22, 2024
a738b41
Revert "enable weth -> eth"
bmzig Oct 22, 2024
c7eef5b
fix bridge from eth
bmzig Oct 22, 2024
9fc2960
Merge branch 'master' into bz/wethWrap
bmzig Nov 7, 2024
048763f
regen routes
bmzig Nov 7, 2024
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
24 changes: 24 additions & 0 deletions scripts/generate-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,29 @@ function transformChainConfigs(
return ["WETH", "ETH"];
}

// Handle WETH -> ETH/WETH
if (tokenSymbol === "WETH") {
return [
"WETH",
{
inputTokenSymbol: "WETH",
outputTokenSymbol: "ETH",
},
];
}
/*
* TODO: Handle ETH -> ETH/WETH
bmzig marked this conversation as resolved.
Show resolved Hide resolved
if (tokenSymbol === "ETH") {
return [
"ETH",
{
inputTokenSymbol: "ETH",
outputTokenSymbol: "WETH",
},
];
}
*/

const chainIds =
typeof token === "string" ? [toChainId] : token.chainIds;

Expand Down Expand Up @@ -555,6 +578,7 @@ function transformToRoute(
fromTokenSymbol: inputTokenSymbol,
toTokenSymbol: outputTokenSymbol,
isNative: inputTokenSymbol === TOKEN_SYMBOLS_MAP.ETH.symbol,
toNative: outputTokenSymbol === TOKEN_SYMBOLS_MAP.ETH.symbol,
l1TokenAddress: inputToken.l1TokenAddress,
};
}
Expand Down
Loading
Loading