The next thing is to actually install ethers into your project by using either npm or yarn. I use npm in the example below.
2️⃣ Basic Usage Of ethers.js
You can use ethers.js like you'd use any other package you can get through npm. Simply import ethers and you have an object at hand that provides the full API you need.
With the 'ethers' object you can now get yourself a provider. The latter is nothing else than an API object that allows you to interact with the blockchain itself.
The provider in this case is backed by MetaMask.
Ethereum stores its data publicly. This means that you can actually access every wallet and see how much currency it has stored. The only thing you need for this is the address of the wallet.
Before you now jump right into it and try to withdraw each and every Ether from all wallets you can find: This won't work. Without the wallet's private keys, you won't be able to transact anything. Sorry!
ethers does, however, allow you to send transactions from your own wallet through MetaMask.
You need a so-called "signer" that holds your private keys and can sign the transactions for you. When you already have a provider at hand, you can use it to create your signer.
With that signer, you can now send transactions to whatever wallet you want to.
What you always have to take care of, though, is to send the amount in Wei, and not in ETH itself. Ethereum does only know Wei, so ethers provides a conversion function for your convenience.
And this is how you can interact with Ethereum through ethers on a basic level.
ethers has more APIs than only those to interact with a wallet. It does also let you interact with tokens which are what altcoins on Ethereum are based on, e.g.
I will surely cover those in the future and give you a broader idea of what you could actually do with this library.
3️⃣ Before You Leave
If you liked this thread, a like would mean the world to me. Retweets are appreciated if your audience also likes this type of content. 😊
And if you want to see more content like this regularly, feel free to follow me for more! 💛🙏🏼
4️⃣ Want More?
I posted another thread, covering the basics of interacting with tokens through ethers.js!❤️
From time to time you read the term Web 3.0. For many of us, however, this term is still mysterious.
Time to shed some light on it and explain what it actually is all about!
🧵👇🏻
0️⃣ The Web Today
The web as we know it today is actually already Web 2.0. It is an extension of the original Web (1.0). In the beginning, the web was meant for websites to provide the information and users to consume it.
Web 2.0 changed this and brought the user into the game.
Users started to create the content themselves while websites became the platform to distribute this new type of content instead of only consuming information.
Especially social media made Web 2.0 a reality and kick-started an evolution that still goes on today.
Consensus algorithms are actually a necessity for blockchains to function properly and are at the heart of any implementation.
And did you know that there are actually quite a few of them? Let's take a look at some interesating ones!
🧵👇🏻
0️⃣ What Is A Consensus Algorithm?
Blockchains are decentralized. There is never a central entity that can decide what is true and what is not. Instead, in a blockchain network, a variety of nodes interact with each other.
As a blockchain usually stores data in a chain of blocks (hence the name), the network must decide what the actual truth is together, This is where consensus algorithms come in. Everyone can append a block. If two participants do it at the same time, the chain is forked.
You don't know how to get into crypto or you simply don't want to spend any money? Do you still want a piece of the cake?
Here is a short 101 on how to get your hands on some crypto and even #BTC.
🧵👇🏻
1️⃣ Download Brave
The Brave browser is based on Chromium, and designed with privacy in mind. If you are unsure, Brendan Eich (yes, exactly, him) is the CEO of Brave Software Inc., the company creating the browser.
Brave blocks ads on websites by default but it comes with its own blockchain-based ad system. Instead of putting them everywhere on websites, however, they come in the form of system notifcations, sent by your browser.
Here are five tips that helped me to grow as a developer.
They aren't complicated and can be implemented directly. I'm sure there is something in it for you!
🧵🔽
1️⃣ Learn To Listen
Listening is more important than talking. If someone has something to say, listen to them. Don't interrupt them. If you have questions about certain aspects of what they say, write them down. Then ask those questions later and talk about it together.
2️⃣ Accept You Don't Know Everything
Software engineering is too broad and too deep as if anyone could really know everything.
You need to accept that and understand that your peers all have their own experiences. Use this to your advantage. If you're stuck, ask for help.
I can relate!
When I started, AWS already offered so much that I literally couldn't find an entry point.
If you still feel this way, let me give you a little guide.
🧵⏬
1️⃣ Foreword
Before we're going in, let me tell you this:
AWS is huge, and the chance that you'll ever be able to call yourself an expert in every product and service it offers is...well, low.
To be honest, I wouldn't even aim for that goal. It simply doesn't make sense. Better aim to become good at a few products and then at all the supporting ones that fit.
You'll specialize, gather deep knowledge about a few products, and be a valuable expert in that area.