statechannels / dispute-game

A prototype of the dispute game in typescript and solidity.
MIT License
9 stars 0 forks source link

Add `hardhat-gas-reporter` and make some gas savings #51

Closed geoknee closed 2 years ago

geoknee commented 2 years ago

The gas reporter gives 87696 gas for the maximum used during ChallengeManager.claimFraud.

Making the following changes gave the following savings:

  1. 82009 (turn on solidity optimizer)
  2. 82009 use external instead of public (no change yet)
  3. 78843 use an enum for mover
  4. 76625 make splitFactor an immutable variable