Skip to content

Commit

Permalink
Merge pull request #114 from maticnetwork/jhilliard/fix-erc-20-mint-l…
Browse files Browse the repository at this point in the history
…ogic

fix: inverted minting logic
  • Loading branch information
praetoriansentry authored Aug 15, 2023
2 parents 288b03d + 6dfd104 commit 9e13a01
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 9e13a01

Please sign in to comment.