ReasonJun

Solidity : 0.8.20 PUSH0 ( invalid opcode ) 본문

Blockchain/Solidity

Solidity : 0.8.20 PUSH0 ( invalid opcode )

ReasonJun 2023. 10. 23. 14:19
728x90

the new PUSH0 opcode in Solidity 0.8.20. It discusses what the opcode is and why it is needed. It also goes into the benefits of using PUSH0, such as reducing contract size and gas costs. Finally, the article provides a warning about using PUSH0 on other chains besides Ethereum mainnet.

 

Here is a more detailed summary of the article:

  • PUSH0 is a new opcode in Solidity 0.8.20 that allows developers to push an empty byte string onto the stack.
  • This is useful for a variety of reasons, such as initializing arrays and structs, and for passing empty arguments to functions.
  • PUSH0 can also be used to reduce contract size and gas costs, as it can eliminate the need to store empty byte strings in the contract code.
  • However, it is important to note that PUSH0 should not be used on other chains besides Ethereum mainnet, as it is not supported by all compilers and runtimes.

 

 

https://medium.com/coinmonks/push0-opcode-a-significant-update-in-the-latest-solidity-version-0-8-20-ea028668028a

 

PUSH0 opcode: A significant update in the latest solidity version 0.8.20

What is the PUSH0 opcode? An explanation of solidity latest version 0.8.20 changes and EIP-3855.

medium.com

https://eips.ethereum.org/EIPS/eip-3855?ref=zaryabs.com

 

EIP-3855: PUSH0 instruction

Introduce a new instruction which pushes the constant value 0 onto the stack

eips.ethereum.org

 

728x90

'Blockchain > Solidity' 카테고리의 다른 글

Solidity : abi.encodePacked(), super.uri()  (0) 2023.10.22
Ethereum : ERC1155  (0) 2023.10.22
Openzeppelin : ERC20PresetMinterPauser  (0) 2023.10.22
Openzeppelin : ERC721PresetMinterPauserAutoId  (0) 2023.10.22
Solidity : sol2uml  (0) 2023.10.20
Comments