Skip to content

Commit

Permalink
fix: inverted minting logic
Browse files Browse the repository at this point in the history
  • Loading branch information
praetoriansentry committed Aug 14, 2023
1 parent 288b03d commit 6dfd104
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/loadtest/loadtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit 6dfd104

Please sign in to comment.