> For the complete documentation index, see [llms.txt](https://calnix.gitbook.io/eth-dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://calnix.gitbook.io/eth-dev/archive/brownie-framework/brownie-basics/testnet-deployment.md).

# Testnet deployment

> brownie networks list

displays list of networks:

![](https://1628544884-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTgomzlmn9NrxUY0OQ3cD%2Fuploads%2F0MgpYlc73QkkXlQINzxs%2Fimage.png?alt=media\&token=32b439f3-ff96-4be9-bd4d-3a27f26a21bd)

### Deployment networks

![](https://1628544884-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTgomzlmn9NrxUY0OQ3cD%2Fuploads%2FokwvOhxXmshNeYobFeQr%2Fimage.png?alt=media\&token=7b3304b1-4c26-4875-8cb6-8a2cc34f317a)

* these are temporary, like ganache networks.
* networks are torn down after running
* contracts and transactions sent on these networks are deleted after our script completes

### Connecting to a blockchain node

With remix we used MetaMask to connect to a proper testnet. In brownie, there is no such injection connection.

To connect to a blockchain node, we will use the RPC URL provided by infura or alchemy.&#x20;

* create a project in Infura
* go to project settings, and look for project ID:
* ![](https://1628544884-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTgomzlmn9NrxUY0OQ3cD%2Fuploads%2FTU2e2GPOvO2cSuxtuHlv%2Fimage.png?alt=media\&token=4ce7da4b-419b-465b-bbc5-d8a4cc0cba4c)
* in .env add the following line:
  * export WEB3\_INFURA\_PROJECT\_ID = cd3a18407dfe4d2597f756dafe2804d6

### Deploying to Rinkeby

> brownie run scripts/deploy.py --network rinkeby

![](https://1628544884-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTgomzlmn9NrxUY0OQ3cD%2Fuploads%2FasZuqVpfjnFpdKXhz7GO%2Fimage.png?alt=media\&token=27c87ec3-5534-4240-bf34-003aacfb2628)

We can look up the transaction hashes and the contract address on rinkeby etherscan.
