DEPLOYING ETHEREUM SMART CONTRACT

Joseph Andrew Ketta Ayuo
2 min readDec 7, 2020

A Guide to Deploying Ethereum Smart Contract

Introduction

Ethereum has given birth to new decentralized apps in the blockchain space. Ethereum is Vitalik Buterin’s, a programmer, invention. A point to note is that Ethereum’s success credit goes to the implementation of smart contracts.

The Ethereum blockchain allows you to:

· Create cryptos that are compatible with Ethereum blockchain wallets.

· Develop virtual entities that enable voting.

· Build dApps.

· Fundraise

Smart contract

This refers to a business logic according to which all transactions on a blockchain take place. A smart contract aims to fulfil common contractual conditions. Smart contracts are deployed to the decentralized database for a fee proportional to the containing code’s storage size.

Create and Deploy Ethereum smart contracts

Installation Requirements

Metamask chrome extension

Acts as an Ethereum and wallet. Metamask allows you to interact with smart contracts and decentralized apps on the web. You do not need to download the blockchain or install any software.

Steps to develop a smart contract

1. Create a Metamask wallet

Enable Metamask in your chrome browser. You then set up your wallet.

2. Choose a test network.

The following test networks are available in your Metamask wallet. They are for testing only, and their ethers have no real value:

· Robsten Test Network

· Kovan Test Network

· Rinkeby Test Network

· Goerli Test Network

3. Add some dummy ethers to your wallet.

The dummy ethers are for testing the smart contract. Click on ‘Deposit’ and ‘Get Ether’ Click ‘Request 1 Ether from faucet’ and 1 ETH will be added to your wallet. You can add as many Ethers as you want into the test network.

As soon as the dummy Ethers are added to your wallet, you can write smart contracts on the Remix Browser IDE in Solidity.

4. Write the smart contract in Solidity.

Use Remix Browser IDE to write the Solidity code. It is the best as it comes with a handful of features and provides a great development experience. Remix is used for writing small-sized contracts.

5. Create a .sol extension file

Open the Remix browser and click on ‘+’ on the top left.

6. Deploy the contract

Press the deploy button at the right-hand side of the Remix window. After the transaction is complete, the smart contract address will be visible on the right-hand side. To check the tokens in your wallet, click add tokens, ether the address, and click ok.

Testing an Ethereum smart contract

· Run everything like transfer, totalSupply, and balanceOf.

· Try transferring tokens to other ETH wallets.

· Get totalSupply through the totalSupply method

Deploying Ethereum smart contracts

· Make your smart contract live

· Add real Ethers

· Again, deploy your smart contract, as mentioned above.

· Visit http://www.etherscan.io and search for your smart contract address, then select it.

· Verify your smart contract

· Copy your smart contract code and paste it on Etherscan. Select the name compiler version that you selected on Remix to compile your code.

· If you had selected optimization at Remix, check ‘yes’ on optimization. Otherwise, check ‘no’.

· Click on verify

--

--

Joseph Andrew Ketta Ayuo

Non-fiction|Blockchain|Cryptocurrency|Social Media Marketer