Parastate. Deploy a Solidity Smart Contract on testnet


ParaState aims to become a Polkadot parachain that extends the frontier of Ethereum with substrate framework. By supporting 20+ programming languages to create Ethereum-compatible smart contracts, we can unite a larger developer community to boost the cross-chain interoperability.

Write Ethereum-compatible smart contracts in popular programming
languages, & run them much faster, on Polkadot.

A decentralized open source business model funded by developer
treasuries on participating parachains.


Deploying simple calculator smart contract to the test netowrk.

First of all add Parastate test network to metamask:

  1. Network name: Parastate testnet
  2. New RPC URL:
  3. Chain ID: 123
  4. Currency symbol: STATE

After that switch to the newly added network and create new wallet in metamask (you will be asked to import a private key for it later) and request test tokens here:


Go to and import your wallet with STATE tokens using your private key (could be exported from metamask).

Paste our smart contract code:

pragma solidity ^0.4.24;

contract Calculator {

int private lastValue = 0;

function Add(int a, int b) public returns (int) {

lastValue = a + b;

return lastValue;


function Subtract(int a, int b) public returns (int) {

lastValue = a - b;

return lastValue;


function LastOperation() public constant returns (int) {

return lastValue;



And compile it:

Now deploy it to the chain:

Wait for the confirmation of transaction:

After the smart contract has been successfully deployed, you can call its functions. Go to the Deployed tab.

Let’s interact with our smart contract:

Press Transact and wait till confirmation. After that press Call under the LastOperation and you will see the result:

The same way you can test all other functions. Super easy!

Thank for reading. Happy codding!


Website —
Twitter —
Github —
Telegram —
Discord —
Medium —




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Here Now Python Has Become an Industry Favorite?

Spotify API —A Rite of Passage

Raspberry Pi 3 Starting from Scratch…Again

Avoid writing expensive code in Python with Memoization

[NSTD] Cloud Vendor Locking

Top 10 CSS Bad Practices

OasisDDB WebDAV Gateway

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


More from Medium

Launching De-Fi Service Lemonade

sports betting

BusyDAO Development Update — 02/2022

HECO Mainnet DEX Bug Bounty Campaign! Reward Pool $20,000 USD of BYN!