// always round up the division as the bzzaar cannot handle decimals
neededERC20.Add(neededERC20,big.NewInt(1))
}
ifinsufficientETH&&insufficientERC20{
logger.Warningf("cannot continue until there is sufficient ETH (for Gas) and at least %d BZZ available on %x",neededERC20,overlayEthAddress)
}elseifinsufficientETH{
logger.Warningf("cannot continue until there is sufficient ETH (for Gas) available on %x",overlayEthAddress)
}else{
logger.Warningf("cannot continue until there is at least %d BZZ available on %x",neededERC20,overlayEthAddress)
}
ifchainId==5{
logger.Warningf("get your Goerli ETH and Goerli BZZ now via the bzzaar at https://bzz.ethswarm.org/?transaction=buy&amount=%d&slippage=30&receiver=0x%x",new(big.Int).Div(swapInitialDeposit,big.NewInt(10000000000000000)),overlayEthAddress)
logger.Warningf("get your Goerli ETH and Goerli BZZ now via the bzzaar at https://bzz.ethswarm.org/?transaction=buy&amount=%d&slippage=30&receiver=0x%x",neededERC20,overlayEthAddress)
}
select{
case<-time.After(backoffDuration):
case<-timeoutCtx.Done():
returnfmt.Errorf("insufficient token for initial deposit")
ifinsufficientERC20{
returnfmt.Errorf("insufficient BZZ for initial deposit")
}else{
returnfmt.Errorf("insufficient ETH for initial deposit")