blaine Profile picture
Nov 11, 2022 7 tweets 4 min read Read on X
(1/6) Proxy contracts are used all the time in @solidity_lang for many different reasons.

In this post I explain the concept of ‘storage collisions’ and how to avoid them when it comes to proxy contracts.

May your storage be collision resistant from this day forth 💥 🧼 🧽 Image
(2/6) Storage collisions suck.

They’ll cause all kinds of bugs in your application. 🐜

Many libraries like @OpenZeppelin handle a lot of the internal details for you; but understanding what’s going on under the hood is great to improve your @solidity_lang skills.
(3/6) I know there’s a lot to digest in this diagram but many of the concepts are topics that we’ve already covered.

For example:

Delegatecall ☎️
(5/6) In later posts I’ll dive into what I looks like to upgrade a @solidity_lang contract.

Yes, they’re immutable but there are clever ways of achieving upgradability which piggybacks on the architecture introduced above.
(6/6) As always, if you like this content follow me for more coming soon!

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with blaine

blaine Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @blainemalone

Nov 28, 2022
(1/4) EVM storage 📦

Slots, bits, bytes and gas refunds…

How is storage structured and accessed in the EVM? Image
(2/4)
This diagram was inspired by a blog post on the topic by @smarx

programtheblockchain.com/posts/2018/03/…
(3/4)
As we are starting to see, understanding EVM storage helps developers write better code.

It helps avoid bugs caused by storage collisions and save 💰 on gas costs.
Read 4 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(