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 Sepolia testnet #1033

Merged
merged 1 commit into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 5 additions & 5 deletions packages/dev-frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { createClient, WagmiConfig } from "wagmi";
import { mainnet, goerli, localhost } from "wagmi/chains";
import { mainnet, goerli, sepolia, localhost } from "wagmi/chains";
import { ConnectKitProvider, getDefaultClient } from "connectkit";
import { Flex, Heading, ThemeProvider, Paragraph, Link } from "theme-ui";

Expand Down Expand Up @@ -49,7 +49,7 @@ const UnsupportedMainnetFallback: React.FC = () => (
<Icon name="exclamation-triangle" /> This app is for testing purposes only.
</Heading>

<Paragraph sx={{ mb: 3 }}>Please change your network to Görli.</Paragraph>
<Paragraph sx={{ mb: 3 }}>Please change your network to Görli or Sepolia.</Paragraph>

<Paragraph>
If you'd like to use the Liquity Protocol on mainnet, please pick a frontend{" "}
Expand All @@ -74,7 +74,7 @@ const UnsupportedNetworkFallback: React.FC = () => (
<Heading sx={{ mb: 3 }}>
<Icon name="exclamation-triangle" /> Liquity is not supported on this network.
</Heading>
Please switch to mainnet or Görli.
Please switch to mainnet, Görli or Sepolia.
</Flex>
);

Expand All @@ -93,8 +93,8 @@ const App = () => {
isDemoMode || import.meta.env.MODE === "test"
? [localhost]
: config.value.testnetOnly
? [goerli]
: [mainnet, goerli],
? [goerli, sepolia]
: [mainnet, goerli, sepolia],
walletConnectProjectId: config.value.walletConnectProjectId,
infuraId: config.value.infuraApiKey,
alchemyId: config.value.alchemyApiKey
Expand Down
3 changes: 2 additions & 1 deletion packages/dev-frontend/src/providers/BatchingProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const multicallAddress = {
3: "0x53C43764255c17BD724F74c4eF150724AC50a3ed",
4: "0x42Ad527de7d4e9d9d011aC45B31D8551f8Fe9821",
5: "0x77dCa2C955b15e9dE4dbBCf1246B4B85b651e50e",
42: "0x2cc8688C5f75E365aaEEb4ea8D6a480405A48D2A"
42: "0x2cc8688C5f75E365aaEEb4ea8D6a480405A48D2A",
11155111: "0xcA11bde05977b3631167028862bE2a173976CA11"
};

const hasMulticall = (chainId: number): chainId is keyof typeof multicallAddress =>
Expand Down
32 changes: 32 additions & 0 deletions packages/lib-ethers/deployments/default/sepolia.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"chainId": 11155111,
"version": "a0948b633b21ca147471a705e2d07f825f2f2292",
"deploymentDate": 1696838376000,
"bootstrapPeriod": 1209600,
"totalStabilityPoolLQTYReward": "32000000",
"liquidityMiningLQTYRewardRate": "0.257201646090534979",
"_priceFeedIsTestnet": false,
"_uniTokenIsMock": true,
"_isDev": false,
"startBlock": 4455303,
"addresses": {
"activePool": "0x7b6c5109F353236294123B0a55896b760708008c",
"borrowerOperations": "0xe093bC0a552C5cBbE0a07C0094F4AfB6204aa1b9",
"troveManager": "0x9431a9fa3300Cd5Db4733283A864Db3347d89311",
"collSurplusPool": "0xA242Df71374A1a18dB9487823105c0e546c2F57e",
"communityIssuance": "0xf1f7A8AC7CD2e14fE058d23653100fFb781bF338",
"defaultPool": "0x3a4C257ad04A0cae9C0b5BbFb9c2D35fb1F9a0eC",
"hintHelpers": "0xa2d566765185Ba047093D443C01bF0DD52E6c1A3",
"lockupContractFactory": "0x42e6423F2582d5C6FB1242acBde8dC6dFe4C7659",
"lqtyStaking": "0x8a45B418ea7a2896de7b14019ef3030249A8a630",
"priceFeed": "0x92Ef9191856bEa5cef75c9c9bb2C6F1593165aaa",
"sortedTroves": "0x0950ec7965CEf62489D1083763a9a153AC1a0548",
"stabilityPool": "0x32F32E36B1D812357C8C50EAF97363c13ea46a68",
"gasPool": "0x2d7458F23950456eC944B39c07776E0CD7249FE1",
"unipool": "0xb04E34D9Cb45895Ec38418cc2f8ea98cc0A0fb37",
"lusdToken": "0xF9D30b476Bd59b06cF5E14de888035b328E01FcE",
"lqtyToken": "0x351d6ffc84EA65D2949a221B17385226b06764AF",
"multiTroveGetter": "0xA975b76c81686DD2992095Cb9149A3392c63F248",
"uniToken": "0x9dA26Cd36e61CF4642Ad1169a6aA0c466ce7eE00"
}
}
8 changes: 7 additions & 1 deletion packages/lib-ethers/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ const oracleAddresses = {
goerli: {
chainlink: "0xD4a33860578De61DBAbDc8BFdb98FD742fA7028e",
tellor: "0x51c59c6cAd28ce3693977F2feB4CfAebec30d8a2"
},
sepolia: {
chainlink: "0x694AA1769357215DE4FAC081bf1f309aDC325306",
tellor: "0x80fc34a2f9FfE86F41580F47368289C402DEc660"
}
};

Expand All @@ -92,7 +96,8 @@ const wethAddresses = {
ropsten: "0xc778417E063141139Fce010982780140Aa0cD5Ab",
rinkeby: "0xc778417E063141139Fce010982780140Aa0cD5Ab",
goerli: "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",
kovan: "0xd0A1E359811322d97991E03f863a0C30C2cF029C"
kovan: "0xd0A1E359811322d97991E03f863a0C30C2cF029C",
sepolia: "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14"
};

const hasWETH = (network: string): network is keyof typeof wethAddresses => network in wethAddresses;
Expand Down Expand Up @@ -120,6 +125,7 @@ const config: HardhatUserConfig = {
...infuraNetwork("rinkeby"),
...infuraNetwork("goerli"),
...infuraNetwork("kovan"),
...infuraNetwork("sepolia"),
...infuraNetwork("mainnet"),

kiln: {
Expand Down
2 changes: 2 additions & 0 deletions packages/lib-ethers/src/EthersLiquityConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import rinkeby from "../deployments/rinkeby.json";
import ropsten from "../deployments/ropsten.json";
import mainnet from "../deployments/mainnet.json";
import kiln from "../deployments/kiln.json";
import sepolia from "../deployments/sepolia.json";

import { numberify, panic } from "./_utils";
import { EthersProvider, EthersSigner } from "./types";
Expand All @@ -34,6 +35,7 @@ const deployments: {
[goerli.chainId]: goerli,
[kovan.chainId]: kovan,
[kiln.chainId]: kiln,
[sepolia.chainId]: sepolia,

...(dev !== null ? { [dev.chainId]: dev } : {})
};
Expand Down