0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

EVM Smart Contract Development Random Tips

Last updated at Posted at 2024-05-17

Testing

  1. Pattern for testing lens against mutative version function

  1. Heuristic Invariant/Property in finance apps

  1. Compiling contracts faster with forge-std::deployCode or forge-std::deployCodeTo

Gas Optimization

  1. Storing callback data on transient storage might be chapter than passing data to callback function

    Example: metapool-router #246

  2. Replace JUMPI with opcode for failure pattern
    Imagine if-else branch like if condition, then revert, the JUMPI can be replaced with mload(condition - 0x01). The similar optimization can be seen in mega-dropper.

Deployment

  1. Crunch CREATE2 salt on terminal

  1. Library to deploy contracts built by Hardhat with Foundry

  1. Recording git commiet on-chain will make it easier to find version of upgradable contract

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?