Skip to content

Commit

Permalink
Merge branch 'master' into gas-prices-api
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspai committed Jan 3, 2025
2 parents 4236332 + cb7f46d commit 75135f8
Show file tree
Hide file tree
Showing 19 changed files with 1,662 additions and 136 deletions.
14 changes: 14 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# This is a comment.
# Each line is a file pattern followed by one or more owners.
# Note: CODEOWNERS are automatically requested for review on relevant PRs.
# Order is important; the last matching pattern takes the most
# precedence.

# These owners will be the default owners for everything in
# the repo unless a later match takes precedence.
* @mrice32 @nicholaspai @dohaki @james-a-morris

# Serverless api
/api/ @mrice32 @nicholaspai @dohaki @james-a-morris @pxrl

8 changes: 5 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.20",
"@across-protocol/contracts": "^3.0.17",
"@across-protocol/constants": "^3.1.24",
"@across-protocol/contracts": "^3.0.19",
"@across-protocol/contracts-v3.0.6": "npm:@across-protocol/[email protected]",
"@across-protocol/sdk": "^3.3.22",
"@across-protocol/sdk": "^3.3.27",
"@amplitude/analytics-browser": "^2.3.5",
"@balancer-labs/sdk": "1.1.6-beta.16",
"@emotion/react": "^11.13.0",
Expand All @@ -30,6 +30,8 @@
"@web3-onboard/core": "^2.21.2",
"@web3-onboard/gnosis": "^2.2.0",
"@web3-onboard/injected-wallets": "^2.11.1",
"@web3-onboard/metamask": "^2.2.0",
"@web3-onboard/phantom": "^2.1.1",
"@web3-onboard/react": "^2.8.13",
"@web3-onboard/walletconnect": "^2.4.6",
"axios": "^0.27.2",
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 @@ -5,6 +5,7 @@ export { default as BASE } from "./base";
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 LINEA } from "./linea";
export { default as LISK } from "./lisk";
export { default as LISK_SEPOLIA } from "./lisk-sepolia";
Expand Down
5 changes: 5 additions & 0 deletions scripts/chain-configs/ink/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.
16 changes: 16 additions & 0 deletions scripts/chain-configs/ink/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/ink/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.INK;
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-gel.inkonchain.com",
blockTimeSeconds: 1,
tokens: ["WETH", "ETH"],
enableCCTP: false,
} as ChainConfig;
2 changes: 1 addition & 1 deletion scripts/chain-configs/lisk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default {
chainId,
blockTimeSeconds: 2,
publicRpcUrl: "https://rpc.api.lisk.com",
tokens: ["WETH", "ETH", "USDT", "LSK"],
tokens: ["WETH", "ETH", "USDT", "LSK", "WBTC"],
enableCCTP: false,
swapTokens: [],
} as ChainConfig;
2 changes: 1 addition & 1 deletion scripts/chain-configs/world-chain/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ export default {
chainId,
publicRpcUrl: "https://worldchain-mainnet.g.alchemy.com/public",
blockTimeSeconds: 2,
tokens: ["ETH", "WBTC", "WETH", "USDC.e"],
tokens: ["ETH", "WBTC", "WETH", "USDC.e", "POOL"],
enableCCTP: false,
} as ChainConfig;
2 changes: 2 additions & 0 deletions scripts/generate-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const enabledMainnetChainConfigs = [
chainConfigs.ZORA,
chainConfigs.WORLD_CHAIN,
chainConfigs.ALEPH_ZERO,
chainConfigs.INK,
];

const enabledSepoliaChainConfigs = [
Expand Down Expand Up @@ -89,6 +90,7 @@ const enabledRoutes = {
CHAIN_IDs.SCROLL,
CHAIN_IDs.ZORA,
CHAIN_IDs.WORLD_CHAIN,
CHAIN_IDs.INK,
],
},
swapAndBridgeAddresses: {
Expand Down
5 changes: 5 additions & 0 deletions src/assets/chain-logos/ink-grayscale.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions src/assets/chain-logos/ink.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions src/constants/chains/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ import blastSepoliaGrayscaleLogo from "assets/chain-logos/blast-sepolia-grayscal
import { ReactComponent as blastSepoliaLogoSvg } from "assets/chain-logos/blast-sepolia.svg";
import { ReactComponent as blastSepoliaGrayscaleLogoSvg } from "assets/chain-logos/blast-sepolia-grayscale.svg";

import inkLogo from "assets/chain-logos/ink.svg";
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 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 @@ -233,6 +238,22 @@ export const blastSepolia = {
pollingInterval: 2000,
};

export const ink = {
name: "Ink",
fullName: "Ink",
chainId: 57073,
logoURI: inkLogo,
grayscaleLogoURI: inkGrayscaleLogo,
logoSvg: inkLogoSvg,
grayscaleLogoSvg: inkGrayscaleLogoSvg,
rpcUrl: "https://rpc-gel.inkonchain.com",
explorerUrl: "https://explorer.inkonchain.com",
constructExplorerLink: (txHash: string) => `${ink.explorerUrl}/tx/${txHash}`,
nativeCurrencySymbol: "ETH",
customRpcUrl: process.env.REACT_APP_CHAIN_57073_PROVIDER_URL,
pollingInterval: 1000,
};

export const linea = {
name: "Linea",
fullName: "Linea",
Expand Down Expand Up @@ -510,6 +531,7 @@ export const chainConfigs = [
baseSepolia,
blast,
blastSepolia,
ink,
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 @@ -25,6 +25,7 @@ const orderedEnabledChainIds = [
CHAIN_IDs.ZORA,
CHAIN_IDs.WORLD_CHAIN,
CHAIN_IDs.ALEPH_ZERO,
CHAIN_IDs.INK,
// testnet
CHAIN_IDs.SEPOLIA,
CHAIN_IDs.BASE_SEPOLIA,
Expand Down
69 changes: 69 additions & 0 deletions src/data/chains_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,13 @@
"name": "Lisk",
"decimals": 18,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/lsk.svg"
},
{
"address": "0x03C7054BCB39f7b2e5B2c7AcB37583e32D70Cfa3",
"symbol": "WBTC",
"name": "Wrapped Bitcoin",
"decimals": 8,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/wbtc.svg"
}
],
"outputTokens": [
Expand All @@ -1170,6 +1177,13 @@
"decimals": 18,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/eth.svg"
},
{
"address": "0x03C7054BCB39f7b2e5B2c7AcB37583e32D70Cfa3",
"symbol": "WBTC",
"name": "Wrapped Bitcoin",
"decimals": 8,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/wbtc.svg"
},
{
"address": "0x05D032ac25d322df992303dCa074EE7392C117b9",
"symbol": "USDT",
Expand Down Expand Up @@ -1415,6 +1429,13 @@
"name": "USD Coin (bridged)",
"decimals": 6,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/usdc.svg"
},
{
"address": "0x7077C71B4AF70737a08287E279B717Dcf64fdC57",
"symbol": "POOL",
"name": "PoolTogether",
"decimals": 18,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/pool.svg"
}
],
"outputTokens": [
Expand Down Expand Up @@ -1445,6 +1466,13 @@
"name": "Wrapped Bitcoin",
"decimals": 8,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/wbtc.svg"
},
{
"address": "0x7077C71B4AF70737a08287E279B717Dcf64fdC57",
"symbol": "POOL",
"name": "PoolTogether",
"decimals": 18,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/pool.svg"
}
]
},
Expand Down Expand Up @@ -1495,5 +1523,46 @@
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/usdt.svg"
}
]
},
{
"chainId": 57073,
"name": "Ink",
"publicRpcUrl": "https://rpc-gel.inkonchain.com",
"explorerUrl": "https://explorer.inkonchain.com",
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/scripts/chain-configs/ink/assets/logo.svg",
"spokePool": "0xeF684C38F94F48775959ECf2012D7E864ffb9dd4",
"spokePoolBlock": 1139240,
"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": "0x4200000000000000000000000000000000000006",
"symbol": "ETH",
"name": "Ether",
"decimals": 18,
"logoUrl": "https://raw.githubusercontent.com/across-protocol/frontend/master/src/assets/token-logos/eth.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"
}
]
}
]
Loading

0 comments on commit 75135f8

Please sign in to comment.