Skip to content

Commit

Permalink
added BigMaxUintX values (#189)
Browse files Browse the repository at this point in the history
Co-authored-by: lmittmann <[email protected]>
  • Loading branch information
lmittmann and lmittmann authored Sep 6, 2024
1 parent e677200 commit c4bfc65
Showing 1 changed file with 38 additions and 5 deletions.
43 changes: 38 additions & 5 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,45 @@ import (

// Common [big.Int]'s.
var (
Big0 = new(big.Int)
Big1 = big.NewInt(1)
Big2 = big.NewInt(2)
BigGwei = big.NewInt(1_000000000)
BigEther = big.NewInt(1_000000000_000000000)
Big0 = new(big.Int)
Big1 = big.NewInt(1)
Big2 = big.NewInt(2)
BigGwei = big.NewInt(1_000000000)
BigEther = big.NewInt(1_000000000_000000000)

// Max Uint Values.
BigMaxUint256 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 256), Big1)
BigMaxUint248 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 248), Big1)
BigMaxUint240 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 240), Big1)
BigMaxUint232 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 232), Big1)
BigMaxUint224 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 224), Big1)
BigMaxUint216 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 216), Big1)
BigMaxUint208 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 208), Big1)
BigMaxUint200 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 200), Big1)
BigMaxUint192 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 192), Big1)
BigMaxUint184 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 184), Big1)
BigMaxUint176 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 176), Big1)
BigMaxUint168 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 168), Big1)
BigMaxUint160 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 160), Big1)
BigMaxUint152 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 152), Big1)
BigMaxUint144 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 144), Big1)
BigMaxUint136 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 136), Big1)
BigMaxUint128 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 128), Big1)
BigMaxUint120 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 120), Big1)
BigMaxUint112 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 112), Big1)
BigMaxUint104 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 104), Big1)
BigMaxUint96 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 96), Big1)
BigMaxUint88 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 88), Big1)
BigMaxUint80 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 80), Big1)
BigMaxUint72 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 72), Big1)
BigMaxUint64 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 64), Big1)
BigMaxUint56 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 56), Big1)
BigMaxUint48 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 48), Big1)
BigMaxUint40 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 40), Big1)
BigMaxUint32 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 32), Big1)
BigMaxUint24 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 24), Big1)
BigMaxUint16 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 16), Big1)
BigMaxUint8 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 8), Big1)
)

// Zero Values.
Expand Down

0 comments on commit c4bfc65

Please sign in to comment.