Brilliant smart contracts on Ethereum blockchain

Share this post on:

For a while I was delving into the capabilities of smart contract on Ethereum with Solidity. You might say that I discovered it too late, but better later than never! I’ve studied code samples, documentations and pondered about the capabilities of the Ethereum smart contracts.

Let’s discover together this topic and I’ll share what I’ve been up too in the last months.

WEB3 – New paradigm

The Web3 is the new iteration of the web as we know it. It focuses on sovereignty of individual data online, transparency and decentralization. Of course, it will not replace the Web2 completely but will definitely shift the way we do things online.

Due to the advent of the blockchain technology, we are even closer to achieving this paradigm. Blockchain technology helps to achieve transparent, tamper-proof and immutable recording of transactions or events in a distributed ledger which on top is always available.

More importantly, blockchains enable to run pieces of code called smart contracts in a consistent durable manner. This helps entities to automate processes, enable transactions and provide custom logic.

AFIEther comes on the scene

I started a new project to explore this new dimension called AFIEther. Website is work in progress but I opened a YouTube channel and an Instagram account. Feel free to explore with me this new realm by watching my first video on AFIEther channel!

Since I like my worked to be backed up by something meaningful, I also share to you the link to my deployed first smart contract called “Contacts”: https://dapps.afivan.com/

You can also find it listed on DAPP Radar.

Contacts – our first smart contract

It wasn’t that smooth sailing when it came to learning enough Solidity to get the smart contract mature enough, automating the deployment with Gitlab CI/CD and not to mention a decent frontend user interface for the first release. Still all of this has been achieved and we have an MVP ready at our AFI DAPPs page.

Now, how to use the smart contract? If you are new to the DAPP world, you might need to get used to the fact that there is no login necessary in a classic user/password way. You use your wallet address to authenticate. That’s it! The deal is that you need to have a browser wallet configured and this depends whether you are on desktop or mobile:

  1. Desktop: you need to install a browser extension
  2. Mobile: you need to navigate to the DAPP by using your wallet app’s integrated browser

After you do that, you need to authorize the dapp to use the wallet address. The dapp practically does not hold any wallet private keys. Instead, the wallet app will prompt you to authorize any operation you perform in the dapp.

This is how our main dapp landing page looks like. In the top right corner you can find the login by wallet button. Once you are logged in you can go to the Contacts contract either through the menu or from the card link in the main page below the presentation text.

Creating your first contact

The user interface is very intuitive and designed for both desktop and mobile use. If you click the plus button you can add the details of a new contact:

Once the name and address are correct you can click the Create button. Mind that any contract interaction that needs to write into a contract requires enough ETH funds to pay for the gas. You will need to confirm the transaction on your wallet once the popup shows up.

You can create up to 5 contacts.

Need more than 5 contacts? No problem

For a fee, you can buy an additional 10 contact slots. Simply press the Buy button, click the button on the popup and confirm from your wallet. It’s a very simple process!

You can buy as many contacts as needed if you need more.

What wallets work with the smart contract?

At the time of this writing, only Metamask works with the smart contract. We work to bring Coinbase support as well and also some visual improvements.

Both desktop and mobile scenarios should work fine, if you find any issue on any platform give us a heads up.

Why is a contacts contract necessary?

To be honest, I considered this question only after developing the contract already. I definitely think that having a contacts contract storing directly on blockchain is important for data integrity and immutability. You can practically access the contacts from any device anywhere.

For sure wallets have the possibility of defining the contacts (I didn’t check the exact capabilities), but they may be a bit tedious to use and you are restricted to a certain wallet provider. Moreover, you might be restricted to store only addresses which you own hence you will not be able to store a friend’s address for instance.

You can also see it as an elegant way to organize the addresses which you own across different wallet providers as well since you may own more than one wallet address at the same time.

Conclusion

Moving to web3 era will take some time and I’m glad that I took the opportunity to code, deploy and share a smart contract with the world at this stage. I think the “Contacts” contract is an useful one and I have ideas for others.

Do you have any smart contract idea which you would like to use? I can bring it to life, so please use the contact form or leave a comment below.

Thanks for reading, I hope you found this article useful and interesting. If you have any suggestions donโ€™t hesitate toย contact me. If you found my content useful please consider a small donation. Any support is greatly appreciated! Cheersย ย ๐Ÿ˜‰

Hi there ๐Ÿ‘‹
Itโ€™s nice to meet you.

Sign up to receive useful content in your inbox, every month.

Spam is a waste of time, I prefer something creative! Read the privacy policy for more info.

Author: afivan

Enthusiast adventurer, software developer with a high sense of creativity, discipline and achievement. I like to travel, I like music and outdoor sports. Because I have a broken ligament, I prefer safer activities like running or biking. In a couple of years, my ambition is to become a good technical lead with entrepreneurial mindset. From a personal point of view, Iโ€™d like to establish my own family, so Iโ€™ll have lots of things to do, thereโ€™s never time to get bored ๐Ÿ˜‚

View all posts by afivan >