Skip to content

New Network Support - [Network Name] #810

@yuh3705

Description

@yuh3705

This Issue is raised to add a support for a new network. To raise a PR for this issue, please follow the steps mentioned below.

Before you submit this issue

Make sure you have done the following transactions -

  • Deployment of the following core contracts:
    • Ethernaut.sol
    • Statistics.sol
    • ProxyAdmin.sol
    • ProxyStats.sol
  • ProxyStats.sol has been set in Ethernaut.sol by calling setStatistics().
  • All the levels' contracts:
    • Have been deployed.
    • Are registered in the Ethernaut.sol by calling registerLevel().

Make sure that the following checks are passing.

  • ethernaut.address in the console returns a valid address.
  • For all the levels:
    • You can visit them.
    • You can create their instances.
    • instance in the console returns a valid address after creating the instance.

And after all the above checks are passed...

  • You have transferred the ownership of the Ethernaut.sol contract to the OpenZeppeling account (0x09902A56d04a9446601a0d451E07459dC5aF0820) by running window.transferOwnerShip(0x09902A56d04a9446601a0d451E07459dC5aF0820) in the browser console.

That's it! Now you can submit this issue :D

To raise a Pull Request for this Issue

Take note of the following things before you start. Because you will need them further while preparing the PR.

File edits

Make sure you have followed the below steps:

  ALL_CAPS_NAME: {
    name: 'name',
    id: 'chain_id',
    url: `${process.env.ALL_CAPS_NAME_HOST}`,
    privKey: `${process.env.PRIV_KEY}`
  },
  ALL_CAPS_NAME: {
    name: 'name',
    id: 'chain_id',
    currencyName: 'currencyName',
    currencySymbol: "currencySymbol",
    rpcUrl: `rpcUrl`,
    blockExplorer: 'blockExplorer'
  },
  [NETWORKS.ALL_CAPS_NAME.name]: '0x09902A56d04a9446601a0d451E07459dC5aF0820',
  // export const ACTIVE_NETWORK = NETWORKS.ALL_CAPS_NAME
  • Created a JSON new file in ./client/src/gamedata directory with name deploy.name.json.
  • Provided the addresses of all the contracts in this file like below, and replaced all the x with their contract addresses in the network(This data can be gotten by running await window.loadContracts() in the browser console).
{
  "0": "x",
  "1": "x",
  "2": "x",
  "3": "x",
  "4": "x",
  "5": "x",
  "6": "x",
  "7": "x",
  "8": "x",
  "9": "x",
  "10": "x",
  "11": "x",
  "12": "x",
  "13": "x",
  "14": "x",
  "15": "x",
  "16": "x",
  "17": "x",
  "18": "x",
  "19": "x",
  "20": "x",
  "21": "x",
  "22": "x",
  "23": "x",
  "24": "x",
  "25": "x",
  "26": "x",
  "27": "x",
  "28":"x",
  "29":"x",
  "30":"x",
  "31":"x",
  "ethernaut": "x",
  "implementation": "x",
  "proxyAdmin": "x",
  "proxyStats": "x"
}

All looks good now! Please raise the PR :)

Review checklist to check if the issue is resolved

In the corresponding PR:

  • Verify the above checklist.
  • Review all the code files changes.
  • Start the project on this branch.
  • Run the following and check if it returns true.
(await ethernaut.owner()) === '0x09902A56d04a9446601a0d451E07459dC5aF0820'
  • Navigate all the levels and check if they are playable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions