Skip to content

Commit

Permalink
feat: enable dai on zksync (#939)
Browse files Browse the repository at this point in the history
* feat: utility script for generating static routes file

* feat: enable dai on zksync

* chore: bump sdk
  • Loading branch information
dohaki authored Jan 11, 2024
1 parent c5e555c commit 65d73f6
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 28 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"license": "AGPL-3.0-only",
"dependencies": {
"@across-protocol/constants-v2": "^1.0.5",
"@across-protocol/sdk-v2": "^0.17.17",
"@across-protocol/constants-v2": "^1.0.8",
"@across-protocol/sdk-v2": "^0.19.0",
"@amplitude/analytics-browser": "^2.3.5",
"@balancer-labs/sdk": "^1.1.5",
"@emotion/react": "^11.4.1",
Expand Down Expand Up @@ -92,7 +92,7 @@
]
},
"devDependencies": {
"@amplitude/ampli": "^1.27.1",
"@amplitude/ampli": "^1.34.0",
"@babel/plugin-transform-modules-commonjs": "^7.18.6",
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
Expand Down
20 changes: 10 additions & 10 deletions scripts/generate-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const enabledRoutes = {
},
{
chainId: CHAIN_IDs.ZK_SYNC,
tokens: ["WETH", "ETH", "USDC", "USDT", "WBTC"],
tokens: ["WETH", "ETH", "USDC", "USDT", "WBTC", "DAI"],
},
{
chainId: CHAIN_IDs.BASE,
Expand Down Expand Up @@ -147,7 +147,7 @@ const enabledRoutes = {
},
{
chainId: CHAIN_IDs.ZK_SYNC,
tokens: ["WETH", "ETH", "USDC", "WBTC", "USDT"],
tokens: ["WETH", "ETH", "USDC", "WBTC", "USDT", "DAI"],
},
{
chainId: CHAIN_IDs.BASE,
Expand Down Expand Up @@ -202,7 +202,7 @@ const enabledRoutes = {
},
{
chainId: CHAIN_IDs.ZK_SYNC,
tokens: ["WETH", "USDC", "WBTC", "USDT"],
tokens: ["WETH", "USDC", "WBTC", "USDT", "DAI"],
},
{
chainId: CHAIN_IDs.BASE,
Expand Down Expand Up @@ -258,7 +258,7 @@ const enabledRoutes = {
},
{
chainId: CHAIN_IDs.ZK_SYNC,
tokens: ["WBTC", "USDC", "WETH", "ETH", "USDT"],
tokens: ["WBTC", "USDC", "WETH", "ETH", "USDT", "DAI"],
},
{
chainId: CHAIN_IDs.BASE,
Expand All @@ -272,23 +272,23 @@ const enabledRoutes = {
toChains: [
{
chainId: CHAIN_IDs.MAINNET,
tokens: ["WETH", "ETH", "USDC", "WBTC", "USDT"],
tokens: ["WETH", "ETH", "USDC", "WBTC", "USDT", "DAI"],
},
{
chainId: CHAIN_IDs.OPTIMISM,
tokens: ["WETH", "ETH", "USDC", "WBTC", "USDT"],
tokens: ["WETH", "ETH", "USDC", "WBTC", "USDT", "DAI"],
},
{
chainId: CHAIN_IDs.ARBITRUM,
tokens: ["WETH", "ETH", "USDC", "WBTC", "USDT"],
tokens: ["WETH", "ETH", "USDC", "WBTC", "USDT", "DAI"],
},
{
chainId: CHAIN_IDs.POLYGON,
tokens: ["WETH", "USDC", "WBTC", "USDT"],
tokens: ["WETH", "USDC", "WBTC", "USDT", "DAI"],
},
{
chainId: CHAIN_IDs.BASE,
tokens: ["WETH", "ETH", "USDC"],
tokens: ["WETH", "ETH", "USDC", "DAI"],
},
],
},
Expand All @@ -314,7 +314,7 @@ const enabledRoutes = {
},
{
chainId: CHAIN_IDs.ZK_SYNC,
tokens: ["USDC", "WETH", "ETH"],
tokens: ["USDC", "WETH", "ETH", "DAI"],
},
],
},
Expand Down
90 changes: 90 additions & 0 deletions src/data/routes_1_0xc186fA914353c44b2E33eBE05f21846F1048bEda.json
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,15 @@
"isNative": false,
"l1TokenAddress": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599"
},
{
"fromChain": 1,
"toChain": 324,
"fromTokenAddress": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"fromSpokeAddress": "0x5c7BCd6E7De5423a257D81B442095A1a6ced35C5",
"fromTokenSymbol": "DAI",
"isNative": false,
"l1TokenAddress": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
},
{
"fromChain": 1,
"toChain": 8453,
Expand Down Expand Up @@ -683,6 +692,15 @@
"isNative": false,
"l1TokenAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7"
},
{
"fromChain": 10,
"toChain": 324,
"fromTokenAddress": "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",
"fromSpokeAddress": "0x6f26Bf09B1C792e3228e5467807a900A503c0281",
"fromTokenSymbol": "DAI",
"isNative": false,
"l1TokenAddress": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
},
{
"fromChain": 10,
"toChain": 8453,
Expand Down Expand Up @@ -998,6 +1016,15 @@
"isNative": false,
"l1TokenAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7"
},
{
"fromChain": 137,
"toChain": 324,
"fromTokenAddress": "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",
"fromSpokeAddress": "0x9295ee1d8C5b022Be115A2AD3c30C72E34e7F096",
"fromTokenSymbol": "DAI",
"isNative": false,
"l1TokenAddress": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
},
{
"fromChain": 137,
"toChain": 8453,
Expand Down Expand Up @@ -1322,6 +1349,15 @@
"isNative": false,
"l1TokenAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7"
},
{
"fromChain": 42161,
"toChain": 324,
"fromTokenAddress": "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",
"fromSpokeAddress": "0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A",
"fromTokenSymbol": "DAI",
"isNative": false,
"l1TokenAddress": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
},
{
"fromChain": 42161,
"toChain": 8453,
Expand Down Expand Up @@ -1412,6 +1448,15 @@
"isNative": false,
"l1TokenAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7"
},
{
"fromChain": 324,
"toChain": 1,
"fromTokenAddress": "0x4B9eb6c0b6ea15176BBF62841C6B2A8a398cb656",
"fromSpokeAddress": "0xE0B015E54d54fc84a6cB9B666099c46adE9335FF",
"fromTokenSymbol": "DAI",
"isNative": false,
"l1TokenAddress": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
},
{
"fromChain": 324,
"toChain": 10,
Expand Down Expand Up @@ -1457,6 +1502,15 @@
"isNative": false,
"l1TokenAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7"
},
{
"fromChain": 324,
"toChain": 10,
"fromTokenAddress": "0x4B9eb6c0b6ea15176BBF62841C6B2A8a398cb656",
"fromSpokeAddress": "0xE0B015E54d54fc84a6cB9B666099c46adE9335FF",
"fromTokenSymbol": "DAI",
"isNative": false,
"l1TokenAddress": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
},
{
"fromChain": 324,
"toChain": 42161,
Expand Down Expand Up @@ -1502,6 +1556,15 @@
"isNative": false,
"l1TokenAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7"
},
{
"fromChain": 324,
"toChain": 42161,
"fromTokenAddress": "0x4B9eb6c0b6ea15176BBF62841C6B2A8a398cb656",
"fromSpokeAddress": "0xE0B015E54d54fc84a6cB9B666099c46adE9335FF",
"fromTokenSymbol": "DAI",
"isNative": false,
"l1TokenAddress": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
},
{
"fromChain": 324,
"toChain": 137,
Expand Down Expand Up @@ -1538,6 +1601,15 @@
"isNative": false,
"l1TokenAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7"
},
{
"fromChain": 324,
"toChain": 137,
"fromTokenAddress": "0x4B9eb6c0b6ea15176BBF62841C6B2A8a398cb656",
"fromSpokeAddress": "0xE0B015E54d54fc84a6cB9B666099c46adE9335FF",
"fromTokenSymbol": "DAI",
"isNative": false,
"l1TokenAddress": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
},
{
"fromChain": 324,
"toChain": 8453,
Expand Down Expand Up @@ -1565,6 +1637,15 @@
"isNative": false,
"l1TokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
},
{
"fromChain": 324,
"toChain": 8453,
"fromTokenAddress": "0x4B9eb6c0b6ea15176BBF62841C6B2A8a398cb656",
"fromSpokeAddress": "0xE0B015E54d54fc84a6cB9B666099c46adE9335FF",
"fromTokenSymbol": "DAI",
"isNative": false,
"l1TokenAddress": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
},
{
"fromChain": 8453,
"toChain": 1,
Expand Down Expand Up @@ -1771,6 +1852,15 @@
"fromTokenSymbol": "ETH",
"isNative": true,
"l1TokenAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
},
{
"fromChain": 8453,
"toChain": 324,
"fromTokenAddress": "0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb",
"fromSpokeAddress": "0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64",
"fromTokenSymbol": "DAI",
"isNative": false,
"l1TokenAddress": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
}
],
"pools": [
Expand Down
26 changes: 11 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@
resolved "https://registry.yarnpkg.com/@across-protocol/constants-v2/-/constants-v2-1.0.4.tgz#df31c81038982a25de2b1b8f7604875f3de1186c"
integrity sha512-Nzl8Z1rZFvcpuKQu7CmBVfvgB13/NoulcsRVYBSkG90imS/e6mugxzqD9UrUb+WOL0ODMCANCAoDw54ZBBzNiQ==

"@across-protocol/constants-v2@^1.0.5":
version "1.0.5"
resolved "https://registry.yarnpkg.com/@across-protocol/constants-v2/-/constants-v2-1.0.5.tgz#461fa0fd907c4ed52cc5c16f5603b1a96b000e56"
integrity sha512-PVXyarhxUxhEP8il47HPt0yR3SfnD7K4PfNQ31X4UMzvJ2ohgQoW3eWXUbEYNGeZUJsVos4GHAc3Hu1h2Jno5w==

"@across-protocol/constants-v2@^1.0.7":
"@across-protocol/constants-v2@^1.0.8":
version "1.0.8"
resolved "https://registry.yarnpkg.com/@across-protocol/constants-v2/-/constants-v2-1.0.8.tgz#0f4dc9fbcf7b99dd895a06bb6070b5d3c8e1188d"
integrity sha512-7rygtlYseWNI/5ocIT9SXYu6L86oQbKTtFNAOw5MqD53bbsREzRy5dU0wkUHJzvHiNIQ+iawKnzprqshHHeRKw==
Expand Down Expand Up @@ -58,13 +53,13 @@
"@openzeppelin/contracts" "4.1.0"
"@uma/core" "^2.18.0"

"@across-protocol/sdk-v2@^0.17.17":
version "0.17.17"
resolved "https://registry.yarnpkg.com/@across-protocol/sdk-v2/-/sdk-v2-0.17.17.tgz#1cd191dd835b7546419d31b64c5195bb973639e4"
integrity sha512-N5EkPOJIOoUkO4/JNeRlQw7h9GRHrTQQ+ptua2cjF9i+cicukNLKrLPUTWrBXIgjsr5nXEAZl17KyeOqvXNafg==
"@across-protocol/sdk-v2@^0.19.0":
version "0.19.0"
resolved "https://registry.yarnpkg.com/@across-protocol/sdk-v2/-/sdk-v2-0.19.0.tgz#95d6151030bbe8bcd3737abca7564749d22bf892"
integrity sha512-l1TjbUhH5RWd5CJq5QPax+49d4cAjB/bQRvN3tArRyxPwD/Fbei6oFUInjTYSZzWBOlrWYlfO/Ni1xaJS/2R3w==
dependencies:
"@across-protocol/across-token" "^1.0.0"
"@across-protocol/constants-v2" "^1.0.7"
"@across-protocol/constants-v2" "^1.0.8"
"@across-protocol/contracts-v2" "^2.4.7"
"@eth-optimism/sdk" "^2.1.0"
"@pinata/sdk" "^2.1.0"
Expand All @@ -83,10 +78,10 @@
resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.9.4.tgz#aae21cb858bbb0411949d5b7b3051f4209043f62"
integrity sha512-UK0bHA7hh9cR39V+4gl2/NnBBjoXIxkuWAPCaY4X7fbH4L/azIi7ilWOCjMUYfpJgraLUAqkRi2BqrjME8Rynw==

"@amplitude/ampli@^1.27.1":
version "1.27.1"
resolved "https://registry.yarnpkg.com/@amplitude/ampli/-/ampli-1.27.1.tgz#bc6fdac5c1fa8fd70c8cf3398622180bbd6fb282"
integrity sha512-rKjGt6hlXrmwTxNanLbN5eYk5j8cEHnIwIMbpT/dG1oY/IdFAs/syEpUdkxoOIV7b7NixjXZMSliTlxiXyOPpA==
"@amplitude/ampli@^1.34.0":
version "1.34.0"
resolved "https://registry.yarnpkg.com/@amplitude/ampli/-/ampli-1.34.0.tgz#878bdeddc392ff24d707f8137834f9213098dd8e"
integrity sha512-44cZJeZahoDy3UEdHczVbNaVFNZ+Uk/XZMcjan6Qpliq0/P75sUpjUyei0uMKcI5hwEbsrzNEqYJTokf3o7kRA==
dependencies:
"@amplitude/identify" "^1.10.0"
"@amplitude/node" "^1.10.0"
Expand Down Expand Up @@ -137,6 +132,7 @@
tmp "^0.2.1"
tslib "^1.14.1"
typescript "^3.9.7"
uuid "^9.0.0"
vue-parser "^1.1.6"

"@amplitude/analytics-browser@^2.3.5":
Expand Down

2 comments on commit 65d73f6

@vercel
Copy link

@vercel vercel bot commented on 65d73f6 Jan 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

goerli-frontend-v2 – ./

goerli-frontend-v2-git-master-uma.vercel.app
goerli-frontend-v2-uma.vercel.app
goerli-frontend-v2.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 65d73f6 Jan 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.