Skip to content

Commit

Permalink
Merge pull request #1713 from 4rgon4ut/feat/add-chiado-testnet
Browse files Browse the repository at this point in the history
Feat/add chiado testnet
  • Loading branch information
iamdefinitelyahuman authored Jan 29, 2024
2 parents 6879c9a + e0d1ec2 commit ae903c4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 37 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Polygon zkEVM
- Optimisim (fixed explorer support)
- Gnosis Chain
- Chiado (Gnosis testnet)
- Base chain

### Fixed
Expand Down
37 changes: 9 additions & 28 deletions brownie/data/network-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ live:
explorer: https://api-moonbeam.moonscan.io/api
multicall2: "0x1337BedC9D22ecbe766dF105c9623922A27963EC"
- name: Moonbase Alpha
chainid: 1287
chainid: 1287
id: moonbeam-test
host: https://rpc.api.moonbase.moonbeam.network
explorer: https://api-moonbase.moonscan.io/api
Expand Down Expand Up @@ -181,25 +181,18 @@ live:
host: https://polygon-mumbai.infura.io/v3/$WEB3_INFURA_PROJECT_ID
explorer: https://api-testnet.polygonscan.com/api
multicall2: "0x6842E0412AC1c00464dc48961330156a07268d14"
- name: XDai
- name: Gnosis Chain
networks:
- name: Mainnet
chainid: 100
id: xdai-main
host: https://xdai.poanetwork.dev
explorer: https://blockscout.com/xdai/mainnet/api
- name: Testnet
chainid: 77
id: xdai-test
host: https://sokol.poa.network
explorer: https://blockscout.com/poa/sokol/api
- name: Gnosis Chain
networks:
- chainid: 100
explorer: https://api.gnosisscan.io/api
host: https://rpc.gnosischain.com/
id: gnosis-main
name: Mainnet
host: https://rpc.gnosischain.com
explorer: https://api.gnosisscan.io/api
- name: Chiado
chainid: 10200
id: gnosis-test
host: https://rpc.chiadochain.net
explorer: https://gnosis-chiado.blockscout.com/api
- name: Polygon zkEVM
networks:
- chainid: 1101
Expand Down Expand Up @@ -309,18 +302,6 @@ development:
evm_version: istanbul
mnemonic: brownie
fork: polygon-main
- name: Ganache-CLI (XDai-Mainnet Fork)
id: xdai-main-fork
cmd: ganache-cli
host: http://127.0.0.1
timeout: 120
cmd_settings:
port: 8545
gas_limit: 20000000
accounts: 10
evm_version: istanbul
mnemonic: brownie
fork: xdai-main
- name: Ganache-CLI (Avax-Mainnet Fork)
id: avax-main-fork
cmd: ganache-cli
Expand Down
18 changes: 9 additions & 9 deletions docs/network-management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Services such as `Alchemy <https://www.alchemy.com>`_ and `Infura <https://infur
1. Some RPC endpoints may be unavailable. In particular, Infura does not provide access to the `debug_traceTransaction <https://geth.ethereum.org/docs/rpc/ns-debug#debug_tracetransaction>`_ method. For this reason, Brownie's :ref:`debugging tools<debug>` will not work when connected via Infura.
2. Hosted nodes do not provide access to accounts - this would be a major security hazard! You will have to manually unlock your own :ref:`local account<local-accounts>` before you can make a transaction.

Brownie allows you to bulk modify the provider you use by setting the `provider` field in the networks, and the associated provider.
Brownie allows you to bulk modify the provider you use by setting the `provider` field in the networks, and the associated provider.

::

Expand Down Expand Up @@ -240,16 +240,16 @@ And it'll print out all the valid networks to swap to the Alchemy format. If you
Adding Providers
----------------

To add or update a provider, run:
To add or update a provider, run:

::

$ brownie networks update_provider alchemy https://eth-{}.alchemyapi.io/v2/$WEB3_ALCHEMY_PROJECT_ID


This URL will allow brownie to swap out the {} with whatever network it's on, and you'll set a `WEB3_ALCHEMY_PROJECT_ID` environment variable as your Alchemy key.
This URL will allow brownie to swap out the {} with whatever network it's on, and you'll set a `WEB3_ALCHEMY_PROJECT_ID` environment variable as your Alchemy key.

Using Infura
Using Infura
************

To Infura you need to `register for an account <https://infura.io/register>`_. Once you have signed up, login and create a new project. You will be provided with a project ID, as well as API URLs that can be leveraged to access the network.
Expand All @@ -260,7 +260,7 @@ To connect to Infura using Brownie, store your project ID as an environment vari

$ export WEB3_INFURA_PROJECT_ID=YourProjectID

Or adding `export WEB3_INFURA_PROJECT_ID=YourProjectID` to your `.env` and adding `dotenv: .env` to your `brownie-config.yaml`.
Or adding `export WEB3_INFURA_PROJECT_ID=YourProjectID` to your `.env` and adding `dotenv: .env` to your `brownie-config.yaml`.


Using Alchemy
Expand All @@ -269,16 +269,16 @@ Using Alchemy
To Alchemy you need to `signup for an account <https://auth.alchemyapi.io/signup>`_. Once you have signed up, login and create a new project. You will be provided with a URL that can be leveraged to access the network.

Hit the `view key` button, and you'll be given a URL. You can just use the section after the last slash as your `WEB3_ALCHEMY_PROJECT_ID`. For example if your full key is: `https://eth-mainnet.alchemyapi.io/v2/1234`, your `WEB3_ALCHEMY_PROJECT_ID` would be `1234`.
Note, this only works well with ETH networks at the moment, but you can modify your providers list at any time.
Note, this only works well with ETH networks at the moment, but you can modify your providers list at any time.

You can set your `WEB3_ALCHEMY_PROJECT_ID` with the following command
::

$ export WEB3_ALCHEMY_PROJECT_ID=YourProjectID

Or adding `export WEB3_ALCHEMY_PROJECT_ID=YourProjectID` to your `.env` and adding `dotenv: .env` to your `brownie-config.yaml`.
Or adding `export WEB3_ALCHEMY_PROJECT_ID=YourProjectID` to your `.env` and adding `dotenv: .env` to your `brownie-config.yaml`.

To connect with other non-ethereum networks through alchemy, you'll have to follow the normal network adding process.
To connect with other non-ethereum networks through alchemy, you'll have to follow the normal network adding process.

.. _network-management-fork:

Expand Down Expand Up @@ -309,7 +309,7 @@ Brownie natively supports the following collection of EVM-compatible chains:
* Binance Smart Chain
* Fantom Opera
* Polygon Network
* XDai Network
* Gnosis Network

In order to enable native support for an EVM-compatible chain, there are 2 requirements. The chain must have a JSON-RPC endpoint which is publicly accessible (free in cost, sign-up may be required), and it should have a block explorer with API support for fetching contract sources and ABIs.

Expand Down

0 comments on commit ae903c4

Please sign in to comment.