Photo by Marcus Wallis on Unsplash

Implementing Rock Paper Scissors in Solidity

Have you ever thought about playing rock paper scissors on the blockchain? In this tutorial, we will build a privacy focussed rock paper scissors application on Ethereum using Solidity.

The aim is to understand the differences between a web2 application and web3 application also known as DApp (Decentralised Application). In a web2 application, the database is private and the server is trusted whereas in a web3 application, there is no server, there is no one database, there is only a blockchain which has state and trust isnt really present, asking a blockchain node about…

TLDR; If you want to learn about privacy and how you can design your blockchain applications with privacy, I am working on a course which will go through the most widely used privacy techniques and add them to your applications in a very hands on fashion.

Privacy is very fundamental concept to developing blockchain applications, yet there are very little resources out there to learn from, especially knowing all the different techniques used for privacy and there pros and cons, also there is bias within different communities for privacy techniques if they have developed them or have any affiliation with…

At the time of writing, there is no secure way of knowing if a contract was called by Another Contract or an Externally Owned Account, there has been 2 ways but both both of them are easily hackable and I will discuss each of them below.


function isContract(address _addr) private returns (bool isContract){
uint32 size;
assembly {
size := extcodesize(_addr)
return (size > 0);
Taken from:

As the stackExchange answer already mentions, this way is not secure because doing construction time, the code at the address of contract is still 0 and there are many articles…

Going to Mainnet is the dream of every Crypto startup, being able to say that its all public and real and we are out of the safe environment to face the transaction fees, network congestion and high-security risks. But with all that comes trust, motivation to contribute to the ecosystem and to solve all these problems. Not just for ourselves, but for everyone ~ it’s open source after all.

While it may seem that moving to mainnet is as simple as changing the Web3 provider to a Mainnet node and using the right chain ID within transactions. it’s actually much…

IPFS — Interplanetary File System is awesome for storing data in a decentralised fashion and it’s one of the most commonly used tools for storing data within the blockchain space. Storing data within a Blockchain is expensive and slow, storing in IPFS is free and fast. IPFS does not allow duplication of data by hashing it and hashing the same data twice will give back the same hash.

IPFS seems to work really well. You can add data and it stays in this global network of nodes. Anyone with a hash can access the data (note that all data on…

Over the past month, we have been busy designing and implementing trustless smart contracts written in Solidity. This post will walk through the architectural decisions made and lessons learnt along the way.

Smart contracts play an important role in applications by giving the guarantee that everyone executes the same code all over the world, However; they must be designed with the right set of goals in mind. The goal for us was to have trustless smart contracts where there is no Owner in the contract and Zinc only ever has the rights explicitly granted by the user. In general, most…

Ali Azam

A software engineer passionate about blockchain and 5G, experienced in leading many projects including Virtuwind and a well known Blockchain advisor.

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