Skip to content

Commit

Permalink
Merge pull request #731 from PhantomOz/master
Browse files Browse the repository at this point in the history
New Network Support - Polygon Amoy Testnet
  • Loading branch information
GianfrancoBazzani authored Apr 24, 2024
2 parents 03b9a03 + d6c9834 commit fc70c22
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 36 deletions.
4 changes: 2 additions & 2 deletions .env-sample
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ REACT_APP_SEPOLIA_EXPLORER_API_KEY=
HOLESKY_HOST=
REACT_APP_HOLESKY_EXPLORER_API_KEY=

MUMBAI_HOST=
REACT_APP_MUMBAI_EXPLORER_API_KEY=
AMOY_HOST=
REACT_APP_AMOY_EXPLORER_API_KEY=

OPTIMISM_SEPOLIA_HOST=
REACT_APP_OPTIMISM_SEPOLIA_EXPLORER_API_KEY=
Expand Down
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/New-Network-Support.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ Make sure you have followed the below steps:
"25": "x",
"26": "x",
"27": "x",
"28":"x",
"29":"x",
"30":"x",
"31":"x",
"ethernaut": "x",
"implementation": "x",
"proxyAdmin": "x",
Expand Down
73 changes: 39 additions & 34 deletions client/src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ export const NETWORKS = {
url: "http://localhost",
port: 8545,
},
MUMBAI: {
name: "mumbai-polygon",
id: "80001",
url: `${process.env.MUMBAI_HOST}`,
privKey: `${process.env.PRIV_KEY}`,
},
SEPOLIA: {
name: "sepolia",
id: "11155111",
Expand All @@ -44,7 +38,13 @@ export const NETWORKS = {
name: "holesky",
id: "17000",
url: `${process.env.HOLESKY_HOST}`,
privKey: `${process.env.PRIV_KEY}`
privKey: `${process.env.PRIV_KEY}`,
},
AMOY: {
name: "amoy",
id: "80002",
url: `${process.env.ALL_CAPS_NAME_HOST}`,
privKey: `${process.env.PRIV_KEY}`,
},
};

Expand All @@ -57,18 +57,6 @@ export const NETWORKS_INGAME = {
url: "http://localhost",
port: 8545,
},
MUMBAI: {
name: "mumbai-polygon",
id: "80001",
currencyName: "Mumbai-Matic",
currencySymbol: "MATIC",
rpcUrl: `https://matic-mumbai.chainstacklabs.com`,
blockExplorer: "https://mumbai.polygonscan.com",
explorer: {
apiKey: `${process.env.REACT_APP_MUMBAI_EXPLORER_API_KEY}`,
apiHost: `https://api-testnet.polygonscan.com`,
},
},
SEPOLIA: {
name: "sepolia",
id: "11155111",
Expand Down Expand Up @@ -117,6 +105,14 @@ export const NETWORKS_INGAME = {
apiHost: `https://api-holesky.etherscan.io`,
},
},
AMOY: {
name: "amoy",
id: "80002",
currencyName: "MATIC",
currencySymbol: "MATIC",
rpcUrl: `https://rpc-amoy.polygon.technology/`,
blockExplorer: "https://amoy.polygonscan.com/",
},
};

// Deprectated networks
Expand All @@ -125,18 +121,23 @@ export const NETWORKS_DEPRECATION = {
GOERLI: {
id: "5",
status: "deprecated",
date: "jan-2024"
date: "jan-2024",
},
OPTIMISM_GOERLI: {
id: "420",
status: "deprecated",
date: "jan-2024"
date: "jan-2024",
},
ARBITRUM_GOERLI: {
id: "421613",
status: "deprecated",
date: "jan-2024"
}
date: "jan-2024",
},
MUMBAI: {
id: "80001",
status: "deprecated",
date: "april-2024",
},
};

// Web3
Expand All @@ -149,19 +150,21 @@ export const GOOGLE_ANALYTICS_ID = "UA-85043059-4";
// Owner addresses
export const ADDRESSES = {
[NETWORKS.LOCAL.name]: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
[NETWORKS.MUMBAI.name]: "0x09902A56d04a9446601a0d451E07459dC5aF0820",
[NETWORKS.SEPOLIA.name]: "0x09902A56d04a9446601a0d451E07459dC5aF0820",
[NETWORKS.OPTIMISM_SEPOLIA.name]: "0x09902A56d04a9446601a0d451E07459dC5aF0820",
[NETWORKS.ARBITRUM_SEPOLIA.name]: "0x09902A56d04a9446601a0d451E07459dC5aF0820",
[NETWORKS.OPTIMISM_SEPOLIA.name]:
"0x09902A56d04a9446601a0d451E07459dC5aF0820",
[NETWORKS.ARBITRUM_SEPOLIA.name]:
"0x09902A56d04a9446601a0d451E07459dC5aF0820",
[NETWORKS.HOLESKY.name]: "0x09902A56d04a9446601a0d451E07459dC5aF0820",
[NETWORKS.AMOY.name]: "0x09902A56d04a9446601a0d451E07459dC5aF0820",
};

// Support EIP-1559
export const SUPPORTS_EIP_1559 = [
'5', // NETWORKS.GOERLI.id
'80001', // NETWORKS.MUMBAI.id
'11155111', // NETWORKS.SEPOLIA.id
]
"5", // NETWORKS.GOERLI.id
"80001", // NETWORKS.MUMBAI.id
"11155111", // NETWORKS.SEPOLIA.id
];

// Core contract keys
export const CORE_CONTRACT_NAMES = [
Expand All @@ -183,7 +186,7 @@ export const PATH_HELP = "/help";
export const PATH_LEVEL_ROOT = `${PATH_ROOT}level/`;
export const PATH_LEVEL = `${PATH_LEVEL_ROOT}:address`;
export const PATH_STATS = `${PATH_ROOT}stats`;
export const PATH_LEADERBOARD = `${PATH_ROOT}leaderboard`
export const PATH_LEADERBOARD = `${PATH_ROOT}leaderboard`;

// RELEASE SENSITIVE
// -----------------------------------------------------------------------------------------
Expand All @@ -197,6 +200,7 @@ export const SHOW_VERSION = true;
// export const ACTIVE_NETWORK = NETWORKS.OPTIMISM_SEPOLIA
// export const ACTIVE_NETWORK = NETWORKS.ARBITRUM_SEPOLIA
// export const ACTIVE_NETWORK = NETWORKS.HOLESKY
// export const ACTIVE_NETWORK = NETWORKS.AMOY
// export const ACTIVE_NETWORK = NETWORKS.LOCAL;

let id_to_network = {};
Expand All @@ -212,8 +216,9 @@ export const ID_TO_NETWORK = id_to_network;
// -----------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------

export const ALIAS_PATH = "https://raw.githubusercontent.com/OpenZeppelin/ethernaut-leaderboard/update/boards/aliases.json"
export const ALIAS_PATH =
"https://raw.githubusercontent.com/OpenZeppelin/ethernaut-leaderboard/update/boards/aliases.json";

export const getLeaderboardPath = (network) => {
return `https://raw.githubusercontent.com/OpenZeppelin/ethernaut-leaderboard/update/boards/networkleaderboards/${network}LeaderBoard.json`
}
return `https://raw.githubusercontent.com/OpenZeppelin/ethernaut-leaderboard/update/boards/networkleaderboards/${network}LeaderBoard.json`;
};
38 changes: 38 additions & 0 deletions client/src/gamedata/deploy.amoy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"0": "0xAd10DADdaAbb8Efbd597Bd9b20eB135968d781b1",
"1": "0xab695B6dE1608A0CedCF1804236C846D20aC40e7",
"2": "0x990F73cDD8148FDD851546f35d592DB4A06462bb",
"3": "0xaeA98399309F46dda0ff4A476447557e15164c7D",
"4": "0x4aebB740d5A673Ad4Ea0338C6B57eb6C08aEe8f2",
"5": "0xad41e7bBf1F0DF0d55095E786f558d0e63B074dB",
"6": "0x3f754D1a4278A32d91BF822027761E3Bdd75b119",
"7": "0xf6B39D70fDA787aB1cd9eF0DD6AC2190f34a6458",
"8": "0xc08C8451b01d31fca6421555b0A0431AFA2aBF8a",
"9": "0x1F4E18AA21104e948371494Dc52B41Fb7127CEa7",
"10": "0xA79006498B8Cacb8d9D8F4cdD29f7328f9188f19",
"11": "0x6E1515CAE054342e034d30860Cd4578ef84e63E8",
"12": "0x7414CBc5Af9A0A039839bD798D6C209AD89C9Cb4",
"13": "0xD821C7f2455DAE6F436ac6B44480b7F31F09838C",
"14": "0xf8aAeFefCf789e1df5c48760c64D52ECd25265cf",
"15": "0xca72EC4b4Bd117a2705440c3600309Ac4D94d481",
"16": "0xE1B1224Da4D5B09233CAaBEEa48036F98Ec68519",
"17": "0xe0f837ccc4ED52424Dd00063DE97Ad1fE86996a8",
"18": "0x10A6608a198a2BC946e2cDE6A1a34Cc218Da0EFA",
"19": "0x5A67F42DCE66f311B869e737cc88297284b1123A",
"20": "0xBd6502E57D34584A8CE00aea0a0D40A219a168A4",
"21": "0x29691f13DBF03b0827bae2Fd1cB43639B3F3da3F",
"22": "0x1596815349F03F2816b8731F568dE7686EeC5af3",
"23": "0x5F0Eb0b2913Af7878A09f955249804630F3e28c2",
"24": "0x94A2389802b644E387eF2aEE4090491B3484D08C",
"25": "0xa67972265516E4BFEA3d4f9c70749768be2d29F8",
"26": "0x91a71dbbEDC98B0B70e34A3CCf3D472DC8448DE3",
"27": "0xc221a88095591Bd0239B40348a530D286e919b06",
"28": "0x44fdd3c58983278570DdE58eea4BB3427EC86DC1",
"29": "0xf97EEDfFe70bFa579DbB26FD8Dd469F00ea9071f",
"30": "0xC7c121270efDB1DEE00DD0462187F4E8Bd4358f6",
"31": "0x33bE665704a6E2132f79E6b06C70660A11181374",
"ethernaut": "0x0917c9EEd9EF51D57AAa27357C5FeE4F3590D42e",
"implementation": "0x30c3249cD8E29D7d0fb48aAec78413E6588072e3",
"proxyAdmin": "0x74008e22B826C3163604B248f03df5164f20955F",
"proxyStats": "0x1Bee003fdcb598Bb079Cc4ABDb03Ecf51229B73D"
}
1 change: 1 addition & 0 deletions contracts/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ docs/

# Dotenv file
.env
contracts/out/

0 comments on commit fc70c22

Please sign in to comment.