Ethereum 101: Setting Up Parity and Writing a Basic Contract

·

Ethereum has emerged as one of the most powerful platforms for decentralized applications (dApps) and smart contracts. Whether you're a developer just getting started or someone exploring blockchain technology, understanding how to set up an Ethereum client and deploy your first contract is essential. In this guide, we’ll walk through setting up Parity, a lightweight and efficient Ethereum client, and writing a simple "Hello World" smart contract using the Remix IDE.

By the end of this tutorial, you'll have a working development environment on the Ropsten test network, a funded test wallet, and a deployed contract you can interact with—all without touching mainnet or spending real funds.


Why Use Parity?

Parity is an Ethereum client built in Rust that offers high performance, strong security, and a user-friendly web interface. Compared to Go-Ethereum (geth), Parity has a smaller memory footprint and faster synchronization times—ideal for local development.

👉 Get started with Ethereum development tools today

It also supports advanced features like light clients, WebAssembly, and robust RPC capabilities—making it perfect for building and testing dApps locally.


Installing Parity on macOS or Linux

To begin, open your terminal. We’ll use curl to install Parity directly:

bash <(curl https://get.parity.io -Lk)

If you're using Homebrew, you can alternatively run:

brew install parity

Once installed, verify the installation by typing:

parity --version

You should see version details confirming Parity is ready to go.


Running Parity on the Ropsten Test Network

Instead of syncing the full Ethereum mainnet (which can take hours), we'll use the Ropsten test network—a proof-of-work testnet ideal for development.

Run the following command to start Parity with all necessary configurations:

parity \
  --chain=ropsten \
  --geth \
  --force-ui \
  --jsonrpc-interface=all \
  --jsonrpc-hosts=127.0.0.1 \
  --jsonrpc-cors=http://127.0.0.1:8080 \
  --jsonrpc-apis=web3,eth,rpc

Let’s break down these flags:

💡 Tip: Save this command as a shell script (start-parity.sh) so you don’t have to retype it every time.

Access the Parity dashboard at http://127.0.0.1:8180. You’ll see sync progress; once the red sync bar disappears, you’re fully connected.


Setting Up Mist Browser for dApp Development

Mist is the official Ethereum wallet and dApp browser, now succeeded by tools like MetaMask—but still valuable for local development and integrated IDE access.

Download Mist from official sources and launch it. It will automatically attempt to connect to your local Ethereum node (Parity). Since we enabled --geth mode, compatibility is seamless.

Create Your First Wallet

  1. Click the three-line menu icon.
  2. Go to Wallets > Add Account.
  3. Set a strong password and securely store your private key or mnemonic phrase.

⚠️ There is no recovery option—if you lose your credentials, your funds are gone forever.

Your wallet address starts with 0x and appears in the Wallets tab. Copy it—we’ll use it next.


Getting Free Test ETH from Ropsten Faucets

To deploy contracts on Ethereum—even on testnets—you need Ether to pay for gas. Fortunately, Ropsten faucets provide free test ETH.

Visit any of these trusted faucets:

Paste your wallet address and request funds. MetaMask offers larger allowances but requires setup; others dispense small amounts quickly.

Wait a few seconds, then check your balance in Mist—it should reflect the received test ETH.

👉 Learn how gas fees work in Ethereum transactions


Writing Your First Smart Contract in Solidity

Now comes the fun part: coding a smart contract using Solidity, Ethereum’s primary smart contract language.

From Mist, navigate to Develop > Open Remix IDE. This opens the browser-based Solidity editor.

Step 1: Define Compiler Version

Start by specifying the Solidity version:

pragma solidity ^0.4.0;

This ensures your code compiles correctly with Solidity 0.4.x or higher (still widely used in legacy tutorials).

Step 2: Create the Contract

Define a contract named Hello:

contract Hello {
    uint public myNumber = 0;
}

Here:

Step 3: Add a Function to Modify State

Add a function to update myNumber:

function chooseNumber(uint _myNumber) {
    myNumber = _myNumber;
}

Note: No this. prefix is needed. In Solidity, this refers to the contract’s address—not instance variables.

Final code:

pragma solidity ^0.4.0;

contract Hello {
    function chooseNumber(uint _myNumber) {
        myNumber = _myNumber;
    }

    uint public myNumber = 0;
}

Compiling and Deploying the Contract

In Remix:

  1. Go to the Compile tab.
  2. Click Start to Compile — your contract should compile without errors.

Then switch to the Run tab:

You’ll be prompted for your wallet password. Confirming sends a transaction to deploy the contract.

After processing, you’ll see:
"Hello at [contract address]"


Interacting With Your Deployed Contract

Under the deployed contract pane:

  1. Click the blue myNumber button → returns current value (0).
  2. Enter 999 next to chooseNumber, then click it.
  3. Approve the transaction with your wallet password.

Wait a moment—once confirmed, click myNumber again. It now returns 999.

🎉 Success! You’ve written, deployed, and interacted with your first Ethereum smart contract.


Frequently Asked Questions (FAQ)

Q: Can I use this setup on Windows?

While this guide focuses on macOS and Linux, Parity does support Windows via binaries or Docker. However, tooling stability is generally better on Unix-like systems.

Q: Why use Parity instead of geth?

Parity offers faster sync speeds, lower resource usage, and a built-in UI. It's ideal for developers who want efficiency without sacrificing functionality.

Q: What happens if I lose my wallet password?

There is no way to recover a lost Ethereum wallet password or private key. Always back up your keys securely—preferably offline.

Q: Is Solidity version 0.4.0 still safe to use?

While newer versions (0.8+) include safety improvements like automatic overflow checks, version 0.4.x is still used in educational contexts. For production, always use the latest stable version.

Q: Do I need real ETH to test contracts?

No—testnets like Ropsten allow you to use free test ETH from faucets. Never send real funds unless interacting with mainnet.

Q: How much does it cost to deploy a contract?

On Ropsten, gas is free (test ETH only). On mainnet, deployment cost depends on contract complexity and network congestion—typically $10–$50 during peak times.


Next Steps in Ethereum Development

You’ve laid the foundation: a running node, funded wallet, and working contract. From here, explore more advanced concepts:

👉 Explore advanced blockchain development techniques

Ethereum’s ecosystem continues to evolve with upgrades like Proof-of-Stake and Layer 2 scaling—making now an exciting time to dive in.

Whether you're building DeFi protocols, NFT marketplaces, or DAOs, mastering the basics is the first step toward innovation.

Happy coding!