February 15, 2026

Smart contracts in 60 seconds – Duminda Wijesinghe

Smart contracts in 60 seconds – Duminda Wijesinghe

Smart contracts in 60 seconds – Duminda Wijesinghe

This is what our workspace would look like. You can see the environment is set to Javascript VM that means we a using an in-browser virtual Ethereum network for testing.

We are going to store a collection of strings in our contract and we’ll implement three functions. One for inserting a string into the collection using pushString, one for retrieving a particular string and one for counting the number of strings in the collection. And we’ll also won’t let anybody else to insert into the collection except the owner.

There is another function included for returning all the indexes in the collection for convenience.

Testing

Metamask — https://metamask.io/

MetaMask is a bridge that allows you to visit the distributed web of tomorrow in your browser today. It allows you to run Ethereum dApps right in your browser without running a full Ethereum node.

MetaMask includes a secure identity vault, providing a user interface to manage your identities on different sites and sign blockchain transactions.

We’ll use meta mask for testing our smart contract in a test network similar to the live Ethereum main network. We can use one of the following test networks.

For our application, we are going to use Ropsten.

Deployment

Infura — https://infura.io/

Infura is the infrastructure behind the Metamask. It works as a gateway to the Ethereum network. It’s funny to use a centralized service to develop a decentralized application, but it’s ok for now since it’s too much work to run our own nodes and most of the parts of our application will still be decentralized ?

Get to work?

Let’s not get ahead of ourselves ? It can be too much to digest in one go. Since we know the technology stack and the tools we need, let’s do some reading and get familiar with all the moving parts.

There will be separate articles for each step develop, test and deploy. Links to those articles will be here. If they are not here yet, that means I’m having trouble dragging myself out of bed :D.

Until then, keep hackin…

Published at Wed, 07 Aug 2019 02:49:46 +0000

Bitcoin Pic Of The Moment
Brent and I assembling our mining rig with two ASUS Radeon R9 290s. Watch the time-lapse of the assembly vimeo.com/84810174
By brendanlim on 2014-01-21 21:29:32
tags

Previous Article

Maltese Bitcoin Miner Wins Lawsuit Against Mining Equipment Seller

Next Article

Maltese Bitcoin Miner Wins Lawsuit Against Mining Equipment Seller

You might be interested in …

What Technical Improvements Are Needed?

What Technical Improvements Are Needed?

What Technical Improvements Are Needed? Web1 served as the internet of the 1990s and early 2000s. At that time, the internet was a read-only directory of static HTML pages. User-to-user interaction was limited. The era […]