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: add Lens Sepolia #1368

Merged
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f547650
update deps
gsteenkamp89 Jan 10, 2025
194a070
add chain config
gsteenkamp89 Jan 10, 2025
70bcac4
update sdk
gsteenkamp89 Jan 10, 2025
7cadc8a
generate routes and ui assets
gsteenkamp89 Jan 10, 2025
3c0a5ed
Merge branch 'master' into gerhard/acx-3081-update-frontend-dapp-lens…
gsteenkamp89 Jan 10, 2025
f693a2a
fixes
gsteenkamp89 Jan 10, 2025
8077f3f
Undo zora logo changes
gsteenkamp89 Jan 10, 2025
d4fe97f
add path to animate id
gsteenkamp89 Jan 10, 2025
03316e6
fix routes
gsteenkamp89 Jan 10, 2025
d2d9870
add wgrass to sepolia and generate routes
gsteenkamp89 Jan 10, 2025
b60c1a2
fix: add missing grass logo
dohaki Jan 11, 2025
b5b34a8
fix: use custom gas token in limits
dohaki Jan 13, 2025
9592e32
fixup
dohaki Jan 13, 2025
22de5c2
fix: GRASS capital cost config
dohaki Jan 13, 2025
a8ba1cf
fix: GRASS on sepolia
dohaki Jan 13, 2025
85255e3
fix: GRASS/WGRASS behavior in selector
dohaki Jan 13, 2025
88cf5ae
improve: debug logs
dohaki Jan 13, 2025
c4b6de3
fix: log level
dohaki Jan 13, 2025
0492cd9
fixup
dohaki Jan 13, 2025
5e226fc
fix wgrass routes
gsteenkamp89 Jan 13, 2025
14ed903
Merge branch 'gerhard/acx-3081-update-frontend-dapp-lens-testnet' of …
gsteenkamp89 Jan 13, 2025
35530ba
Revert "fix wgrass routes"
gsteenkamp89 Jan 13, 2025
bb1f0fe
fix wgrass route
gsteenkamp89 Jan 13, 2025
8222a7c
Merge branch 'master' into gerhard/acx-3081-update-frontend-dapp-lens…
gsteenkamp89 Jan 14, 2025
b823784
update lockfile
gsteenkamp89 Jan 14, 2025
a7d51d7
Merge branch 'master' into gerhard/acx-3081-update-frontend-dapp-lens…
gsteenkamp89 Jan 15, 2025
dfe69cd
fix lint warnings
gsteenkamp89 Jan 15, 2025
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
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"private": true,
"license": "AGPL-3.0-only",
"dependencies": {
"@across-protocol/constants": "^3.1.24",
"@across-protocol/contracts": "^3.0.19",
"@across-protocol/constants": "^3.1.27",
"@across-protocol/contracts": "^3.0.20",
"@across-protocol/contracts-v3.0.6": "npm:@across-protocol/[email protected]",
"@across-protocol/sdk": "^3.4.8",
"@across-protocol/sdk": "^3.4.9",
"@amplitude/analytics-browser": "^2.3.5",
"@balancer-labs/sdk": "1.1.6-beta.16",
"@emotion/react": "^11.13.0",
Expand Down
1 change: 1 addition & 0 deletions scripts/chain-configs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export { default as BASE_SEPOLIA } from "./base-sepolia";
export { default as BLAST } from "./blast";
export { default as BLAST_SEPOLIA } from "./blast-sepolia";
export { default as INK } from "./ink";
export { default as LENS_SEPOLIA } from "./lens-sepolia";
export { default as LINEA } from "./linea";
export { default as LISK } from "./lisk";
export { default as LISK_SEPOLIA } from "./lisk-sepolia";
Expand Down
13 changes: 13 additions & 0 deletions scripts/chain-configs/lens-sepolia/assets/grayscale-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions scripts/chain-configs/lens-sepolia/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions scripts/chain-configs/lens-sepolia/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { CHAIN_IDs, PUBLIC_NETWORKS } from "@across-protocol/constants";
import { utils as sdkUtils } from "@across-protocol/sdk";
import { ChainConfig } from "../types";

const { getDeployedAddress, getDeployedBlockNumber } = sdkUtils;

const chainId = CHAIN_IDs.LENS_SEPOLIA;
const chainInfoBase = PUBLIC_NETWORKS[chainId];

export default {
...chainInfoBase,
logoPath: "./assets/logo.svg",
grayscaleLogoPath: "./assets/grayscale-logo.svg",
spokePool: {
address: getDeployedAddress("SpokePool", chainId),
blockNumber: getDeployedBlockNumber("SpokePool", chainId),
},
chainId,
publicRpcUrl: "https://rpc.testnet.lens.dev",
blockTimeSeconds: 1,
tokens: ["GRASS", "WETH", "WGRASS"],
enableCCTP: false,
} as ChainConfig;
2 changes: 1 addition & 1 deletion scripts/chain-configs/sepolia/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default {
},
chainId,
publicRpcUrl: "https://gateway.tenderly.co/public/sepolia",
tokens: ["WETH", "ETH", "USDC"],
tokens: ["WETH", "ETH", "USDC", "WGRASS"],
enableCCTP: false,
swapTokens: [],
} as ChainConfig;
1 change: 1 addition & 0 deletions scripts/generate-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const enabledSepoliaChainConfigs = [
chainConfigs.POLYGON_AMOY,
chainConfigs.BLAST_SEPOLIA,
chainConfigs.LISK_SEPOLIA,
chainConfigs.LENS_SEPOLIA,
];

const enabledRoutes = {
Expand Down
14 changes: 14 additions & 0 deletions src/assets/chain-logos/lens-sepolia-grayscale.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/assets/chain-logos/lens-sepolia.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions src/constants/chains/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ import inkGrayscaleLogo from "assets/chain-logos/ink-grayscale.svg";
import { ReactComponent as inkLogoSvg } from "assets/chain-logos/ink.svg";
import { ReactComponent as inkGrayscaleLogoSvg } from "assets/chain-logos/ink-grayscale.svg";

import lensSepoliaLogo from "assets/chain-logos/lens-sepolia.svg";
import lensSepoliaGrayscaleLogo from "assets/chain-logos/lens-sepolia-grayscale.svg";
import { ReactComponent as lensSepoliaLogoSvg } from "assets/chain-logos/lens-sepolia.svg";
import { ReactComponent as lensSepoliaGrayscaleLogoSvg } from "assets/chain-logos/lens-sepolia-grayscale.svg";

import lineaLogo from "assets/chain-logos/linea.svg";
import lineaGrayscaleLogo from "assets/chain-logos/linea-grayscale.svg";
import { ReactComponent as lineaLogoSvg } from "assets/chain-logos/linea.svg";
Expand Down Expand Up @@ -254,6 +259,23 @@ export const ink = {
pollingInterval: 1000,
};

export const lensSepolia = {
name: "Lens Sepolia",
fullName: "Lens sepolia",
chainId: 37111,
logoURI: lensSepoliaLogo,
grayscaleLogoURI: lensSepoliaGrayscaleLogo,
logoSvg: lensSepoliaLogoSvg,
grayscaleLogoSvg: lensSepoliaGrayscaleLogoSvg,
rpcUrl: "https://rpc.testnet.lens.dev",
explorerUrl: "https://block-explorer.testnet.lens.dev",
constructExplorerLink: (txHash: string) =>
`${lensSepolia.explorerUrl}/tx/${txHash}`,
nativeCurrencySymbol: "GRASS",
customRpcUrl: process.env.REACT_APP_CHAIN_37111_PROVIDER_URL,
pollingInterval: 1000,
};

export const linea = {
name: "Linea",
fullName: "Linea",
Expand Down Expand Up @@ -532,6 +554,7 @@ export const chainConfigs = [
blast,
blastSepolia,
ink,
lensSepolia,
linea,
lisk,
liskSepolia,
Expand Down
1 change: 1 addition & 0 deletions src/constants/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const orderedEnabledChainIds = [
CHAIN_IDs.POLYGON_AMOY,
CHAIN_IDs.BLAST_SEPOLIA,
CHAIN_IDs.LISK_SEPOLIA,
CHAIN_IDs.LENS_SEPOLIA,
];

export const chainInfoList: ChainInfoList = orderedEnabledChainIds.map(
Expand Down
62 changes: 62 additions & 0 deletions src/data/chains_11155111.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@
"name": "USD Coin",
"decimals": 6,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/usdc.svg"
},
{
"address": "0x2Be68B15c693D3b5747F9F0D49D30A2E81BAA2Df",
"symbol": "WGRASS",
"name": "Wrapped Grass",
"decimals": 18,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/wgrass.svg"
}
],
"outputTokens": [
Expand All @@ -51,6 +58,13 @@
"name": "USD Coin",
"decimals": 6,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/usdc.svg"
},
{
"address": "0x2Be68B15c693D3b5747F9F0D49D30A2E81BAA2Df",
"symbol": "WGRASS",
"name": "Wrapped Grass",
"decimals": 18,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/wgrass.svg"
}
]
},
Expand Down Expand Up @@ -382,5 +396,53 @@
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/eth.svg"
}
]
},
{
"chainId": 37111,
"name": "Lens Sepolia",
"publicRpcUrl": "https://rpc.testnet.lens.dev",
"explorerUrl": "https://block-explorer.testnet.lens.dev",
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/scripts/chain-configs/lens-sepolia/assets/logo.svg",
"spokePool": "0x6A0a7f39530923911832Dd60667CE5da5449967B",
"spokePoolBlock": 156275,
"inputTokens": [
{
"address": "0xaA91D645D7a6C1aeaa5988e0547267B77d33fe16",
"symbol": "WETH",
"name": "Wrapped Ether",
"decimals": 18,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/weth.svg"
},
{
"address": "0xeee5a340Cdc9c179Db25dea45AcfD5FE8d4d3eB8",
"symbol": "WGRASS",
"name": "Wrapped Grass",
"decimals": 18,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/wgrass.svg"
}
],
"outputTokens": [
{
"address": "0xaA91D645D7a6C1aeaa5988e0547267B77d33fe16",
"symbol": "WETH",
"name": "Wrapped Ether",
"decimals": 18,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/weth.svg"
},
{
"address": "0xaA91D645D7a6C1aeaa5988e0547267B77d33fe16",
"symbol": "ETH",
"name": "Ether",
"decimals": 18,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/eth.svg"
},
{
"address": "0xeee5a340Cdc9c179Db25dea45AcfD5FE8d4d3eB8",
"symbol": "WGRASS",
"name": "Wrapped Grass",
"decimals": 18,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/wgrass.svg"
}
]
}
]
Loading
Loading