Skip to content

Commit

Permalink
configure wstETH bridge (#907)
Browse files Browse the repository at this point in the history
* configure wstETH bridge

* fix route contant

* bump connect version from 0.3.15 to 0.3.16

* update route name + symbol key

* fix prettier issue

* update route name
  • Loading branch information
sebastianscatularo authored Jul 2, 2024
1 parent d45902b commit 290ce3f
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 5 deletions.
8 changes: 4 additions & 4 deletions apps/connect/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/connect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@opentelemetry/resources": "^1.23.0",
"@opentelemetry/sdk-trace-web": "^1.23.0",
"@tanstack/react-query": "^5.14.2",
"@wormhole-foundation/wormhole-connect": "^0.3.15",
"@wormhole-foundation/wormhole-connect": "^0.3.16",
"dompurify": "^3.0.6",
"mixpanel-browser": "^2.49.0",
"react": "^18.2.0",
Expand Down
15 changes: 15 additions & 0 deletions apps/connect/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@ const defaultConfig: WormholeConnectConfig = {
window.location.origin.includes("testnet")) && {
eventHandler: eventHandler,
}),
// eslint-disable-next-line @typescript-eslint/no-explicit-any
isRouteSupportedHandler: async (td: any) => {
// Disable manual NTT for Lido wstETH
if (
td.route === "nttManual" &&
td.fromToken.tokenId !== "native" &&
(td.fromToken.tokenId.address ===
"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0" ||
td.fromToken.tokenId.address ===
"0x26c5e01524d2E6280A48F2c50fF6De7e52E9611C")
) {
return false;
}
return true;
},
};

export default function Root() {
Expand Down
43 changes: 43 additions & 0 deletions apps/connect/vite.token-bridge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,22 @@ const MAINNET_TOKEN_CONFIG: WormholeConnectConfig = {
default: 18,
},
},
'wstETH ': {
key: 'wstETH ',
symbol: 'wstETH ',
nativeChain: 'bsc',
tokenId: {
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NTUuOTQ0IDQzNS4wNjkgMjU1Ljk0NCA0MzUuMDY5IDE1MC45ODggMjM3LjgxMloiIGZpbGw9IndoaXRlIj48L3BhdGg+PHBhdGggb3BhY2l0eT0iMC42IiBkPSJNMjU1LjkxNCAyOTcuNzY0TDE1MC45NTggMjM3LjgxMkMyNTUuOTE0IDQzNS4wNjkgMjU1LjkxNCA0MzUuMDY5IDI1NS45MTQgNDM1LjA2OUMyNTUuOTE0IDM5Mi4xMDggMjU1LjkxNCAzNDIuODggMjU1LjkxNCAyOTcuNzY0WiIgZmlsbD0id2hpdGUiPjwvcGF0aD48cGF0aCBvcGFjaXR5PSIwLjIiIGQ9Ik0yNTYuMDgzIDE2My44MzNWMjY3LjIzM0wzNDYuNDkxIDIxNS41NjZMMjU2LjA4MyAxNjMuODMzWiIgZmlsbD0id2hpdGUiPjwvcGF0aD48cGF0aCBvcGFjaXR5PSIwLjYiIGQ9Ik0yNTYuMDU2IDE2My44MzNMMTY1LjU4MyAyMTUuNTY1TDI1Ni4wNTYgMjY3LjIzM1YxNjMuODMzWiIgZmlsbD0id2hpdGUiPjwvcGF0aD48cGF0aCBkPSJNMjU2LjA1NiA3Ni44NzVMMTY1LjU4MyAyMTUuNTk5TDI1Ni4wNTYgMTYzLjcyMlY3Ni44NzVaIiBmaWxsPSJ3aGl0ZSI+PC9wYXRoPjxwYXRoIG9wYWNpdHk9IjAuNiIgZD0iTTI1Ni4wODMgMTYzLjcwNkwzNDYuNTYgMjE1LjU4NUwyNTYuMDgzIDc2Ljc5MTZWMTYzLjcwNloiIGZpbGw9IndoaXRlIj48L3BhdGg+PC9zdmc+Cgo=",
coinGeckoId: 'wrapped-steth',
color: '#3AA3FF',
decimals: {
default: 8,
Ethereum: 18,
},
},
},
nttGroups: {
W: {
Expand Down Expand Up @@ -557,6 +573,33 @@ const MAINNET_TOKEN_CONFIG: WormholeConnectConfig = {
}
]
},
Lido_wstETH: {
displayName: 'NTT: Wormhole + Axelar',
nttManagers: [
{
chainName: 'ethereum',
address: '0xb948a93827d68a82F6513Ad178964Da487fe2BD9',
tokenKey: 'wstETH',
transceivers: [
{
address: '0xA1ACC1e6edaB281Febd91E3515093F1DE81F25c0',
type: 'wormhole',
},
],
},
{
chainName: 'bsc',
address: '0x6981F5621691CBfE3DdD524dE71076b79F0A0278',
tokenKey: 'wstETH ',
transceivers: [
{
address: '0xbe3F7e06872E0dF6CD7FF35B7aa4Bb1446DC9986',
type: 'wormhole',
},
],
},
],
},
"ETHFI": {
nttManagers: [
{
Expand Down

0 comments on commit 290ce3f

Please sign in to comment.