Blockchain Developers #1 source to keep up-to-date with what's happening within the web3 industry, without wasting your valuable time. Each month I recap the most important articles, guides, news, resources, podcasts and videos from the past month.
February 2023 was a fun month, let's check out what you might have missed (spolier: big month for Solidity).
Is this your first time here? If so, keep reading.
Been here before? I like you. Welcome back. Skip right to the February 2023 updates in the next section.
Ok... for your first timers, I'm Markus.
You're thinking... What's this all about?!
Well there are lots of blockchain newsletters and youtube channels out there that will hype you up on the latest NFT project or predicting some new token that's going to the moon.
Much less so in recent months given most of the "tourists" looking to make a quick buck tend to disappear when prices go down. But the builders are still here and so are you and so is this newsletter.
It's still hard though to find newsletters that actually go deep into things that are relevant for developers working in the space.
That's why I created this - a newsletter dedicated to developers who want to stay up-to-date and excel in the world of web3.
In case you aren't already convinced... Being a solidity, blockchain, & ethereum developer is a fantastic career option.
Regardless of whether you love or hate crypto, there's no denying blockchain is an exciting technology with tons of job opportunities. You can work around the world, you get to work on solutions to big problems, and you're on the cutting edge of the tech sector.
But things move FAST.
So staying up-to-date with the constantly evolving ecosystem can be tough. If you're still reading this, maybe you want to be a top-performing developer within the web3 landscape, but probably don’t have time to find, read, and synthesize all the articles, videos and podcasts that come out each month.
So this monthly Blockchain Developer Newsletter was born.
I keep you up-to-date with what's happening within the web3 industry, without wasting your valuable time, by curating the most important articles, guides, news, resources, podcasts and videos from the past month.
This newsletter was inspired by Andrei's Web Developer Monthly + Python Monthly and Daniel's Machine Learning Monthly.
Ok, let's dive into this issue. I hope you enjoy!
There’s been not only one, but two upgrades to Solidity within a single month. I hope you're as giddy as I am because we got some interesting new features!
This release introduced support for the Paris upgrade, which includes the deprecation of block.difficulty
in Solidity and removal of the difficulty()
instruction from inline assembly for EVM versions greater than or equal to Paris.
You now also get the global block.prevrandao
built-in to Solidity.
With all this, I suspect block.difficulty
will likely be removed entirely in Solidity version 0.9.0.
Another new change is the deprecation of selfdestruct
and the compiler's warning about its use in Solidity, including inline assembly.
Important: this means that even though there is no replacement for it, the use of selfdestruct
is not recommended anymore!
A full list for 0.8.18 changes can be found here.
This release also had some improvements on bytecode sizes, but more notably it now has user-defined value types or "UDVTs".
This is an exciting new feature that builds on top of user-defined types. If you’ve followed along with my Solidity bootcamp course, we implemented a fixed-point math type.
This change means you can now define your own operators for your types. Keep an eye out for an update to my course on this soon!
Most bitwise, arithmetic and comparison operators are supported, but most of the time you'll likely need only the supported arithmetic operators +
, -
, *
, /
, %
and comparisons ==
, !=
, <
, <=
, >
, >=
.
pragma solidity 0.8.19;
type Int is int;
using {add as +} for Int global;
using {sub as -, sub} for Int global;
function add(Int a, Int b) pure returns (Int) {
return Int.wrap(Int.unwrap(a) + Int.unwrap(b));
}
function sub(Int a, Int b) pure returns (Int) {
return Int.wrap(Int.unwrap(a) - Int.unwrap(b));
}
function test(Int x, Int y) pure {
x + y;
x.add(y); // ERROR: Member "add" not found or not visible after argument-dependent lookup in Int.
x - y;
x.sub(y); // OK -- "sub" was also attached in "using for"
}
So now you can write using {foo as +} for MyType global;
and BOOM, just like that you've defined the +
operator for your own type.
This feature will be extremely helpful even if you don’t ever write this yourself, because it could enable other people to write more developer-friendly libraries. And our code will become much more readable (dreams do can come true)!
A full list for 0.8.19 changes can be found here.
A brand new, outstanding guide was published this month on invariant testing for Foundry.
This guide is particularly useful if you want to become an expert at smart contract testing.
Not sure what an invariant test is?
It’s a check in your smart contract system that should always come back as true. For the WETH example, this could be that the ETH balance of the contract must always equal the total supply of WETH.
And I really mean always here.
In more complex systems, you could come up with more advanced invariance checks that can be used to make sure that no extra money was lost or created in the system.
That's very important for reasons that go without saying... okay I'll say the obvious one just to be sure: it could indicate a critical bug!
What do you do with these invariance checks?
You run them together with the Foundry fuzz testing feature. Fuzz testing means running code, in our case smart contract code, many, many, many times with random or semi-random data input. And no matter what input is given, the invariance checks should never break.
That's the key stuff you needed to know as a Blockchain Developer in February 2023. Give yourself a pat on the back, you're all caught up.
I hope you enjoyed this edition of Blockchain Developer Monthly and I hope you have a great March 🙌
See you next month,
Markus
P.S. Did I miss something? Have something I should include in a future post? Let me know.
By the way, I teach people how to code in Solidity and get hired as a Blockchain Developer in the most efficient way possible. Come check out a few of our Blockchain & Web3 Courses below and try out some of the free preview lessons.