# How to deploy a Solidity smart contract on ParaState’s testnet

By [IeSua](https://paragraph.com/@iesua) · 2022-09-18

---

Configuring Metamask to interact with ParaState TestNet
-------------------------------------------------------

Install [Metamask](https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn), create account, configuring the wallet.

![Select Settings from the dropdown menu.](https://storage.googleapis.com/papyrus_images/c5664bfe19441ce66416988366b7564ece9ce33d5f96ca11a37a174b315718d9.jpg)

Select Settings from the dropdown menu.

**_Select Settings from the dropdown menu._**

![](https://storage.googleapis.com/papyrus_images/c34d67b8f3814f9a07fe5d8f54ce40115618b55c64bbca1073aad22e61727d64.jpg)

**_On the Settings page choose the Networks menu._**

![](https://storage.googleapis.com/papyrus_images/fdd5765a834b8c96db53a64ec718bf0650209b884cb298664e5d2f7f21b64f59.jpg)

**_Click Add Network._**

Filling the Endpoint Information and click save button:

![](https://storage.googleapis.com/papyrus_images/f031708ecc0be14467c1d16e3da0397849853bf4d01bab09f16bd972b21f1a40.jpg)

**Network Name**: ParaState

**New RPC URL**: [https://rpc.parastate.io:8545](https://rpc.parastate.io:8545/)

**Chain ID**: 123

**Currency Symbol (Optional)**: STATE

**Block Explorer URL**: [http://scan.parastate.io/](http://scan.parastate.io/)

After that, you need to get **testnet STATE tokens**. Go to [http://faucet.parastate.io/](http://faucet.parastate.io/) page, enter your ParaState address from Metamask and click the button “**Get testnet STATE**”.

![](https://storage.googleapis.com/papyrus_images/fc35d560358bd37295aae9cffec8b71f03f592861bcec6200880ea98bdf332cd.jpg)

Configuring BUIDL online IDE
----------------------------

Go to the page [https://buidl.secondstate.io](https://buidl.secondstate.io/). In the lower left corner, click “**Providers**”. Fill it in as shown in the screenshot.

![](https://storage.googleapis.com/papyrus_images/7591dacb24fd4656a07655b0bb9b077b520c4a5df68b91a645bf4547a5487683.jpg)

**Endpoint**: [https://rpc.parastate.io:8545/](https://rpc.parastate.io:8545/)

**ChainId**: 123

![](https://storage.googleapis.com/papyrus_images/cb5b59ad5744e0fba88538d3350e6e023d6eecb70082f1f79f080f64a60538e7.jpg)

In the lower left corner, click “**Accounts**”, import the private key from your testnet STATE address. Set the imported address as default. If you do not want to import your private key into BUIDL online IDE, then you need to send some Testnet STATE tokens to the address already existing in BUIDL.

Deploy a Solidity smart contract on ParaState’s testnet
-------------------------------------------------------

First, you need to create your own smart contract, or find a ready-made one, for [example on Github](https://github.com/second-state/buidl/tree/master/demo/data-v2).

![](https://storage.googleapis.com/papyrus_images/6f386682ff8cbcfc348e4fd7f3b8d5efcce1d0e381c775cdea125a7340be4100.jpg)

I chose a simple contract: [Ethereum voting dapp](https://github.com/madrona-labs/voting).

Open the [Voting.sol](https://github.com/madrona-labs/voting/blob/master/Voting.sol) file, copy and paste the contract code into BUIDL online IDE and click on the “**Compile**” button.

![](https://storage.googleapis.com/papyrus_images/6d9b605598ea53eed4b929fd86e0bd1a752d9d8f8210aef9d7a3e4b0e20d14e3.jpg)

Fill in additional fields if necessary. In my case, I need to add the names of the candidates _\[“Rama”, “Nick”, “Jose”\]_. Click the button “**Deploy to the chain**”.

![](https://storage.googleapis.com/papyrus_images/13d98f5bfb19a89e034360c95c29be20d26da6fd28352045ba1369e856df988c.jpg)

The contract is now deployed on the ParaState Chain, and you can call its functions directly from inside BUIDL. You can check this by entering the received transaction hash into the [ParaState block explorer](http://scan.parastate.io/tx/0x8f93719cfa98f56ffde1d94ade5c0eec6308804f368c5fc574d53f506461f159).

![](https://storage.googleapis.com/papyrus_images/5119eaf42466aa17c9b6dba593f12f2b653bf9e37b6618a16e83cbc44f1be973.jpg)

**That’s all**. But if you want to see how a smart contract works in action, then you need to copy and paste HTML code from [index.html](https://github.com/madrona-labs/voting/blob/master/index.html) into the HTML editor.

![](https://storage.googleapis.com/papyrus_images/f64bb87c5bd46dba7bd76c2f98285f68c69990db7970612e467f279967db212c.jpg)

Then copy and paste JavaScript code from [index.js](https://github.com/madrona-labs/voting/blob/master/index.js) into the JS editor.

![](https://storage.googleapis.com/papyrus_images/bf0776624a6d0faa6e5df81c0f862745494e4ea778bf9d454b4ce590411deab4.jpg)

Click on **Run** to see the dapp in action! You should see the following:

![](https://storage.googleapis.com/papyrus_images/c4c4331471b7aa9e03e9eee14859ef33cc369c55aee61d5a884b3d23149d7f6b.png)

---

*Originally published on [IeSua](https://paragraph.com/@iesua/how-to-deploy-a-solidity-smart-contract-on-parastate-s-testnet)*
