Skip to content

Commit

Permalink
Merge pull request #1298 from ethereum-push-notification-service/feat…
Browse files Browse the repository at this point in the history
…/migrate-to-sepolia

Feat/migrate to sepolia
  • Loading branch information
0xNilesh authored Nov 10, 2023
2 parents 61cb272 + 2f6b04b commit b11d4fa
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 32 deletions.
4 changes: 2 additions & 2 deletions src/components/FaucetInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ const FaucetInfo = ({ onMintPushToken, noOfPushTokensToCheck, containerProps }:
) : (
<ItemBody>
<AnchorLink
href="https://chaindrop.org/?chainid=5&token=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
href="https://chaindrop.org/?chainid=11155111&token=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
target="_blank"
>
<NumberIcon>1</NumberIcon>
<PoolShare>Goerli ETH Faucet</PoolShare>
<PoolShare>Sepolia ETH Faucet</PoolShare>
</AnchorLink>
<Minter
onClick={async () => {
Expand Down
8 changes: 4 additions & 4 deletions src/components/Faucets.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ const Faucets = () => {

const dropdownValues = [
{
id: "5",
value: "Goerli",
title: "Goerli Faucet",
id: "11155111",
value: "Sepolia",
title: "Sepolia Faucet",
function: () => {},
link: "https://goerlifaucet.com/",
link: "https://sepoliafaucet.com/",
},
{
id: "80001",
Expand Down
2 changes: 1 addition & 1 deletion src/components/YieldFarmChainError.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const YieldFarmChainError = () => {

const chainIdToPass = appConfig.allowedNetworks[0];

if (currentChainId !== 1 && currentChainId !== 5) {
if (currentChainId !== 1 && currentChainId !== 11155111) {
console.log("Current Chain ID ", currentChainId);
console.log("Chain Id to pass", chainIdToPass);
switchChain(appConfig.coreContractChain);
Expand Down
31 changes: 16 additions & 15 deletions src/config/config-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export const config = {
* Allowed Networks
*/
allowedNetworks: [
5, // for eth goerli
// 5, // for eth goerli
11155111, // for eth sepolia
80001, //for mumbai polygon
97, // bnb testnet
420, // optimism goerli testnet
Expand All @@ -33,8 +34,8 @@ export const config = {
/**
* Core Network Related Data
*/
coreContractChain: 5, //the chain id of the network which the core contract relies on
coreRPC: 'https://goerli.infura.io/v3/4ff53a5254144d988a8318210b56f47a',
coreContractChain: 11155111, //the chain id of the network which the core contract relies on
coreRPC: 'https://sepolia.infura.io/v3/5524d420b29f4f7a8d8d2f582a0d43f7',
mainnetCoreRPC: "https://mainnet.infura.io/v3/4ff53a5254144d988a8318210b56f47a",
mainnetCoreContractChain: 1,
aliasRPC: {
Expand Down Expand Up @@ -78,12 +79,12 @@ export const config = {
*/
export const addresses = {
ceaErc20: "0xc1C0472c0C80bCcDC7F5D01A376Bd97a734B8815",
epnscore: "0x23346b732d56d34ec4e890419fbfb8548216a799",
epnsEthComm: "0xc064F30bac07e84500c97A04D21a9d1bfFC72Ec0",
epnscore: "0x5AB1520E2bd519BDab2e1347EEe81C00a77f4946",
epnsEthComm: "0x9dDCD7ed7151afab43044E4D694FA064742C428c",
epnsPolyComm: "0xAf55BE8e6b0d6107891bA76eADeEa032ef8A4504", // the ploygon comm contract
pushToken: "0x2b9bE9259a4F5Ba6344c1b1c07911539642a2D33", //address for push token
pushToken: "0x37c779a1564DCc0e3914aB130e0e787d93e21804", //address for push token
aDai: "0x31f30d9A5627eAfeC4433Ae2886Cf6cc3D25E772",
epnsToken: "0x2b9bE9259a4F5Ba6344c1b1c07911539642a2D33",
epnsToken: "0x37c779a1564DCc0e3914aB130e0e787d93e21804",
epnsLPToken: "0x1f094Bd8c260D0C3fC79157096015990885af4d2",
rockstar: "0x3f8C2152b79276b78315CAF66cCF951780580A8a",
batchMintNFT: "0xCf733D547B9f7F87c1B1f63f45c197C007F8eedf",
Expand All @@ -105,7 +106,7 @@ export const addresses = {
stakingV2: "0x0B318CA01Cec62bB29526591f368b44f4b8a0303",
yieldFarmLP: "0x576c46b328433AaDcb9d9cDd81E0A92852bb0B6F",
// yieldFarmLP: "0x13ac63901c8fD5797939099553582951fAbAFDE3",
pushCoreV2: "0x23346b732d56d34ec4e890419fbfb8548216a799",
pushCoreV2: "0x68a401dE9a6fcBEf0e616bCC6654B49dA379DAb7",
// pushCoreV2: "0x0E76e9776CB192f5840B357780efB325885073FF",
uniV2LPToken: "0x698839247E5b83572fFF6ccdcf386CC37e60bEf5",
pushToken: "0x2b9bE9259a4F5Ba6344c1b1c07911539642a2D33",
Expand All @@ -115,13 +116,13 @@ export const addresses = {
}

export const CHAIN_DETAILS = {
5: {
label: "Ethereum Goerli",
name: "ETH_TEST_GOERLI",
chainId: 5,
rpcUrl: "https://goerli.infura.io/v3/4ff53a5254144d988a8318210b56f47a",
commAddress: "0xc064F30bac07e84500c97A04D21a9d1bfFC72Ec0",
network: "goerli",
11155111: {
label: "Ethereum Sepolia",
name: "ETH_TEST_SEPOLIA",
chainId: 11155111,
rpcUrl: "https://sepolia.infura.io/v3/5524d420b29f4f7a8d8d2f582a0d43f7",
commAddress: "0x28709649Dfda9baDEbb61dBF7a8D199cfC8EcF2e",
network: "sepolia",
},
80001: {
label: "Polygon Mumbai",
Expand Down
12 changes: 9 additions & 3 deletions src/connectors/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,16 @@ export const MAINNET_CHAINS: ChainConfig = {
}

export const TESTNET_CHAINS: ChainConfig = {
5: {
urls: [getInfuraUrlFor('goerli')].filter(Boolean),
// 5: {
// urls: [getInfuraUrlFor('goerli')].filter(Boolean),
// nativeCurrency: ETH,
// name: 'Görli',
// },
11155111: {
urls: [getInfuraUrlFor('sepolia')].filter(Boolean),
nativeCurrency: ETH,
name: 'Görli',
name: 'Sepolia',
blockExplorerUrls: ['https://sepolia.etherscan.io'],
},
420: {
urls: [getInfuraUrlFor('optimism-goerli'), 'https://goerli.optimism.io'].filter(Boolean),
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/CaipHelper.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Internal Configs
import { appConfig } from '../config';

export const Eip155EnabledIds: Array<Number> = [1, 56, 137, 10, 1101, 42161, 5, 97, 80001, 420, 1442, 421613];
export const Eip155EnabledIds: Array<Number> = [1, 56, 137, 10, 1101, 42161, 11155111, 97, 80001, 420, 1442, 421613];

// Types
type CAIPProps = {
Expand Down
5 changes: 4 additions & 1 deletion src/helpers/UtilityHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export const EnvHelper = {
export const networkName = {
42: 'Ethereum Kovan',
5: "Ethereum Goerli",
11155111: "Ethereum Sepolia",
1: 'Ethereum Mainnet',
137: 'Polygon Mainnet',
80001: 'Polygon Mumbai',
Expand All @@ -116,6 +117,7 @@ export const networkName = {

export const chainNameBackendStandard = {
5: "ETH_TEST_GOERLI",
11155111: "ETH_TEST_SEPOLIA",
1: 'ETH_MAINNET',
137: 'POLYGON_MAINNET',
80001: 'POLYGON_TEST_MUMBAI',
Expand All @@ -137,7 +139,8 @@ export const aliasChainIdToChainName={
export const aliasChainIdsMapping = {
1: 137,
42: 80001,
5: 80001
5: 80001,
11155111: 80001
};

export const NETWORK_DETAILS = {
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/w2w/udResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ethers } from 'ethers';
import { appConfig, CHAIN_DETAILS } from 'config';

export const getUdResolver = (): Resolution => {
const l1ChainId = appConfig.allowedNetworks.includes(1) ? 1 : 5;
const l1ChainId = appConfig.allowedNetworks.includes(1) ? 1 : 11155111;
const l2ChainId = appConfig.allowedNetworks.includes(137) ? 137 : 80001;
return Resolution.fromEthersProvider({
uns: {
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useInactiveListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export function useInactiveListener() {
const getErrorMessage = () => {
if (appConfig.coreContractChain === 42)
return 'Unsupported Network, please connect to the Ethereum Kovan network or Polygon Mumbai network';
else if (appConfig.coreContractChain === 5)
return 'Unsupported Network, please connect to the Ethereum Goerli, Polygon Mumbai, BNB testnet, Optimism Goerli, Arbitrum testnet or Polygon zkEVM testnet';
else if (appConfig.coreContractChain === 11155111)
return 'Unsupported Network, please connect to the Ethereum Sepolia, Polygon Mumbai, BNB testnet, Optimism Goerli, Arbitrum testnet or Polygon zkEVM testnet';
else return 'Unsupported Network, please connect to the Ethereum, Polygon, BNB, Optimism, Arbitrum or Polygon zkEVM Mainnet';
}

Expand Down
1 change: 1 addition & 0 deletions src/segments/spam.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ const SpamBox = ({ showFilter, setShowFilter, search, setSearch }) => {
POLYGON_TEST_MUMBAI: 80001,
ETH_TEST_KOVAN: 42,
ETH_TEST_GOERLI: 5,
ETH_TEST_SEPOLIA: 11155111,
POLYGON_MAINNET: 137,
ETH_MAINNET: 1
};
Expand Down
4 changes: 2 additions & 2 deletions src/structure/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ function Header({ isDarkMode, darkModeToggle }) {
switchChain(appConfig.coreContractChain);
if (appConfig.coreContractChain === 42)
return 'Unsupported Network, please connect to the Ethereum Kovan network or Polygon Mumbai network';
else if (appConfig.coreContractChain === 5)
return 'Unsupported Network, please connect to the Ethereum Goerli, Polygon Mumbai, BNB testnet, Optimism Goerli, Arbitrum testnet or Polygon zkEVM testnet';
else if (appConfig.coreContractChain === 11155111)
return 'Unsupported Network, please connect to the Ethereum Sepolia, Polygon Mumbai, BNB testnet, Optimism Goerli, Arbitrum testnet or Polygon zkEVM testnet';
else return 'Unsupported Network, please connect to the Ethereum, Polygon, BNB, Optimism, Arbitrum or Polygon zkEVM Mainnet';
} else {
console.error(error);
Expand Down

0 comments on commit b11d4fa

Please sign in to comment.