@@ -29,7 +29,6 @@ import (
2929 "github.com/crytic/medusa/fuzzing/calls"
3030 "github.com/crytic/medusa/utils/randomutils"
3131
32- "github.com/crytic/medusa-geth/accounts/abi"
3332 "github.com/crytic/medusa-geth/common"
3433 "github.com/crytic/medusa/chain"
3534 compilationTypes "github.com/crytic/medusa/compilation/types"
@@ -456,17 +455,17 @@ func (f *Fuzzer) createTestChain() (*chain.TestChain, error) {
456455 // NOTE: Sharing GenesisAlloc between chains will result in some accounts not being funded for some reason.
457456 genesisAlloc := make (types.GenesisAlloc )
458457
459- // Fund all of our sender addresses in the genesis block
460- initBalance := new (big.Int ).Div ( abi . MaxInt256 , big .NewInt (2 )) // TODO: make this configurable
458+ // Fund all of our sender addresses in the genesis block with 2^256-1 ETH equivalent
459+ initBalance := new (big.Int ).Sub ( new (big. Int ). Exp ( big . NewInt ( 2 ) , big .NewInt (256 ), nil ), big . NewInt ( 1 ))
461460 for _ , sender := range f .senders {
462461 genesisAlloc [sender ] = types.Account {
463- Balance : initBalance ,
462+ Balance : new (big. Int ). Set ( initBalance ) ,
464463 }
465464 }
466465
467466 // Fund our deployer address in the genesis block
468467 genesisAlloc [f .deployer ] = types.Account {
469- Balance : initBalance ,
468+ Balance : new (big. Int ). Set ( initBalance ) ,
470469 }
471470
472471 // Identify which contracts need to be predeployed to a deterministic address by iterating across the mapping
0 commit comments