State Variables Packed into a Slot | EVM Storage 3

Опубликовано: 26 Октябрь 2024
на канале: Smart Contract Programmer
1,181
57

Example of writing to state variables packed into a single slot

Bit masking
   • Bit Masking | EVM Storage 2  

0:00 Intro
3:25 Write to slot 0
4:41 Write to state variable s_a
7:12 Write to state variable s_b
10:00 Write to state variable s_c
12:08 Write to state variable s_d
13:49 Fix code
14:00 Test test_sstore
14:19 slot and offset
19:06 Test test_sstore_using_offset

Code corrections
9:15 add should be and
11:38 add should be and
13:08 add should be and

Playlist
   • EVM  

Code
https://solidity-by-example.org/evm/s...

Take a course
https://www.smartcontract.engineer/

Remix
https://remix.ethereum.org

#Solidity #SmartContract #Ethereum #スマートコントラクト

Follow
https://odysee.com/@SmartContractProg...
  / programmersmart  
  / discord  
https://t.me/smartcontractprogrammer
https://smartcontractprogrammer.com