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(soneium): integrate soneium #1376

Merged
merged 6 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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.30",
"@across-protocol/contracts": "^3.0.25",
"@across-protocol/contracts-v3.0.6": "npm:@across-protocol/[email protected]",
"@across-protocol/sdk": "^3.4.10",
"@across-protocol/sdk": "^3.4.12",
"@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 @@ -19,6 +19,7 @@ export { default as POLYGON_AMOY } from "./polygon-amoy";
export { default as REDSTONE } from "./redstone";
export { default as SCROLL } from "./scroll";
export { default as SEPOLIA } from "./sepolia";
export { default as SONEIUM } from "./soneium";
export { default as WORLD_CHAIN } from "./world-chain";
export { default as ZK_SYNC } from "./zk-sync";
export { default as ZORA } from "./zora";
8 changes: 8 additions & 0 deletions scripts/chain-configs/soneium/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.
8 changes: 8 additions & 0 deletions scripts/chain-configs/soneium/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/soneium/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.SONEIUM;
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.soneium.org",
blockTimeSeconds: 2,
tokens: ["WETH", "USDC.e"],
enableCCTP: false,
} as ChainConfig;
1 change: 1 addition & 0 deletions scripts/generate-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const enabledMainnetChainConfigs = [
chainConfigs.WORLD_CHAIN,
chainConfigs.ALEPH_ZERO,
chainConfigs.INK,
chainConfigs.SONEIUM,
];

const enabledSepoliaChainConfigs = [
Expand Down
8 changes: 8 additions & 0 deletions src/assets/chain-logos/soneium-grayscale.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/assets/chain-logos/soneium.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 @@ -105,6 +105,11 @@ import sepoliaGrayscaleLogo from "assets/chain-logos/sepolia-grayscale.svg";
import { ReactComponent as sepoliaLogoSvg } from "assets/chain-logos/sepolia.svg";
import { ReactComponent as sepoliaGrayscaleLogoSvg } from "assets/chain-logos/sepolia-grayscale.svg";

import soneiumLogo from "assets/chain-logos/soneium.svg";
import soneiumGrayscaleLogo from "assets/chain-logos/soneium-grayscale.svg";
import { ReactComponent as soneiumLogoSvg } from "assets/chain-logos/soneium.svg";
import { ReactComponent as soneiumGrayscaleLogoSvg } from "assets/chain-logos/soneium-grayscale.svg";

import worldChainLogo from "assets/chain-logos/world-chain.svg";
import worldChainGrayscaleLogo from "assets/chain-logos/world-chain-grayscale.svg";
import { ReactComponent as worldChainLogoSvg } from "assets/chain-logos/world-chain.svg";
Expand Down Expand Up @@ -473,6 +478,23 @@ export const sepolia = {
pollingInterval: 15000,
};

export const soneium = {
name: "soneium",
fullName: "soneium",
chainId: 1868,
logoURI: soneiumLogo,
grayscaleLogoURI: soneiumGrayscaleLogo,
logoSvg: soneiumLogoSvg,
grayscaleLogoSvg: soneiumGrayscaleLogoSvg,
rpcUrl: "https://rpc.soneium.org",
explorerUrl: "",
constructExplorerLink: (txHash: string) =>
`${soneium.explorerUrl}/tx/${txHash}`,
nativeCurrencySymbol: "ETH",
customRpcUrl: process.env.REACT_APP_CHAIN_1868_PROVIDER_URL,
pollingInterval: 2000,
};

export const worldChain = {
name: "World Chain",
fullName: "World Chain",
Expand Down Expand Up @@ -545,6 +567,7 @@ export const chainConfigs = [
redstone,
scroll,
sepolia,
soneium,
worldChain,
zkSync,
zora,
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 @@ -26,6 +26,7 @@ const orderedEnabledChainIds = [
CHAIN_IDs.WORLD_CHAIN,
CHAIN_IDs.ALEPH_ZERO,
CHAIN_IDs.INK,
CHAIN_IDs.SONEIUM,
// testnet
CHAIN_IDs.SEPOLIA,
CHAIN_IDs.BASE_SEPOLIA,
Expand Down
48 changes: 48 additions & 0 deletions src/data/chains_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1564,5 +1564,53 @@
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/eth.svg"
}
]
},
{
"chainId": 1868,
"name": "Cher",
"publicRpcUrl": "https://rpc.soneium.org",
"explorerUrl": "",
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/scripts/chain-configs/soneium/assets/logo.svg",
"spokePool": "0x3baD7AD0728f9917d1Bf08af5782dCbD516cDd96",
"spokePoolBlock": 1709997,
"inputTokens": [
{
"address": "0x4200000000000000000000000000000000000006",
"symbol": "WETH",
"name": "Wrapped Ether",
"decimals": 18,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/weth.svg"
},
{
"address": "0xbA9986D2381edf1DA03B0B9c1f8b00dc4AacC369",
"symbol": "USDC.e",
"name": "USD Coin (bridged)",
"decimals": 6,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/usdc.svg"
}
],
"outputTokens": [
{
"address": "0x4200000000000000000000000000000000000006",
"symbol": "WETH",
"name": "Wrapped Ether",
"decimals": 18,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/weth.svg"
},
{
"address": "0x4200000000000000000000000000000000000006",
"symbol": "ETH",
"name": "Ether",
"decimals": 18,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/eth.svg"
},
{
"address": "0xbA9986D2381edf1DA03B0B9c1f8b00dc4AacC369",
"symbol": "USDC.e",
"name": "USD Coin (bridged)",
"decimals": 6,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/usdc.svg"
}
]
}
]
Loading
Loading