From 74749af09c7f19e86bea60fbd60dd859e10ce374 Mon Sep 17 00:00:00 2001 From: lmittmann <3458786+lmittmann@users.noreply.github.com> Date: Thu, 1 Feb 2024 08:25:30 +0100 Subject: [PATCH] added `BigMaxUint256` (#106) Co-authored-by: lmittmann Signed-off-by: Mohammed Sohail --- util.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/util.go b/util.go index 21ae33f..8575f42 100644 --- a/util.go +++ b/util.go @@ -12,11 +12,12 @@ import ( // Common [big.Int]'s. var ( - Big0 = big.NewInt(0) - 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) + BigMaxUint256 = new(big.Int).Sub(new(big.Int).Lsh(Big1, 256), Big1) ) // A returns an address from a hexstring or panics if the hexstring does not