From 6dfd1047ee29d2618b0f91d7b1760d62b1177eed Mon Sep 17 00:00:00 2001 From: John Hilliard Date: Mon, 14 Aug 2023 19:03:37 -0400 Subject: [PATCH] fix: inverted minting logic --- cmd/loadtest/loadtest.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/loadtest/loadtest.go b/cmd/loadtest/loadtest.go index b8aaaf6f..6401798b 100644 --- a/cmd/loadtest/loadtest.go +++ b/cmd/loadtest/loadtest.go @@ -556,14 +556,15 @@ func getLoadTestContract(ctx context.Context, c *ethclient.Client, tops *bind.Tr } func getERC20Contract(ctx context.Context, c *ethclient.Client, tops *bind.TransactOpts, cops *bind.CallOpts) (erc20Addr ethcommon.Address, erc20Contract *contracts.ERC20, err error) { erc20Addr = ethcommon.HexToAddress(*inputLoadTestParams.ERC20Address) - shouldMint := true + shouldMint := false if *inputLoadTestParams.ERC20Address == "" { erc20Addr, _, _, err = contracts.DeployERC20(tops, c) if err != nil { log.Error().Err(err).Msg("Unable to deploy ERC20 contract") return } - shouldMint = false + // if we're deploying a new ERC 20 we should mint tokens + shouldMint = true } log.Trace().Interface("contractaddress", erc20Addr).Msg("ERC20 contract address")