You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// to the contract map, so that we can use that, when tracing transactions. It is suggested to use name identical to the name of the contract Solidity file.
L.Debug().Str("Current error", retryErr.Error()).Str("Replacement error", replacementErr.Error()).Uint("Attempt", i+1).Msg("Failed to prepare replacement transaction for contract deployment. Retrying with the original one")
1100
-
return
1101
-
}
1102
-
tx=replacementTx
1103
-
default:
1104
-
// do nothing, just wait again until it's mined
1105
-
}
1106
-
L.Debug().Str("Current error", retryErr.Error()).Uint("Attempt", i+1).Msg("Waiting for contract to be deployed")
1107
-
}),
1108
-
retry.DelayType(retry.FixedDelay),
1109
-
// if gas bump retries are set to 0, we still want to retry 10 times, because what we will be retrying will be other errors (no code at address, etc.)
1110
-
// downside is that if retries are enabled and their number is low other retry errors will be retried only that number of times
1111
-
// (we could have custom logic for different retry count per error, but that seemed like an overkill, so it wasn't implemented)
1112
-
retry.Attempts(func() uint {
1113
-
ifm.Cfg.GasBumpRetries() !=0 {
1114
-
returnm.Cfg.GasBumpRetries()
1115
-
}
1116
-
return10
1117
-
}()),
1118
-
retry.RetryIf(func(errerror) bool {
1119
-
returnstrings.Contains(strings.ToLower(err.Error()), "no contract code at given address") ||
1120
-
strings.Contains(strings.ToLower(err.Error()), "no contract code after deployment") ||
// if err, ok := auth.Context.Value(ContextErrorKey{}).(error); ok {
1143
-
// return DeploymentData{}, errors.Wrapf(err, "aborted contract deployment for %s, because context passed in transaction options had an error set", name)
// L.Debug().Str("Current error", retryErr.Error()).Str("Replacement error", replacementErr.Error()).Uint("Attempt", i+1).Msg("Failed to prepare replacement transaction for contract deployment. Retrying with the original one")
1192
-
// return
1193
-
// }
1194
-
// tx = replacementTx
1195
-
// default:
1196
-
// // do nothing, just wait again until it's mined
1197
-
// }
1198
-
// L.Debug().Str("Current error", retryErr.Error()).Uint("Attempt", i+1).Msg("Waiting for contract to be deployed")
1199
-
// }),
1200
-
// retry.DelayType(retry.FixedDelay),
1201
-
// // if gas bump retries are set to 0, we still want to retry 10 times, because what we will be retrying will be other errors (no code at address, etc.)
1202
-
// // downside is that if retries are enabled and their number is low other retry errors will be retried only that number of times
1203
-
// // (we could have custom logic for different retry count per error, but that seemed like an overkill, so it wasn't implemented)
1204
-
// retry.Attempts(func() uint {
1205
-
// if m.Cfg.GasBumpRetries() != 0 {
1206
-
// return m.Cfg.GasBumpRetries()
1207
-
// }
1208
-
// return 10
1209
-
// }()),
1210
-
// retry.RetryIf(func(err error) bool {
1211
-
// return strings.Contains(strings.ToLower(err.Error()), "no contract code at given address") ||
1212
-
// strings.Contains(strings.ToLower(err.Error()), "no contract code after deployment") ||
L.Debug().Str("Current error", retryErr.Error()).Str("Replacement error", replacementErr.Error()).Uint("Attempt", i+1).Msg("Failed to prepare replacement transaction for contract deployment. Retrying with the original one")
51
+
return
52
+
}
53
+
tx=replacementTx
54
+
default:
55
+
// do nothing, just wait again until it's mined
56
+
}
57
+
L.Debug().Str("Current error", retryErr.Error()).Uint("Attempt", i+1).Msg("Waiting for contract to be deployed")
58
+
}),
59
+
retry.DelayType(retry.FixedDelay),
60
+
// if gas bump retries are set to 0, we still want to retry 10 times, because what we will be retrying will be other errors (no code at address, etc.)
61
+
// downside is that if retries are enabled and their number is low other retry errors will be retried only that number of times
62
+
// (we could have custom logic for different retry count per error, but that seemed like an overkill, so it wasn't implemented)
63
+
retry.Attempts(func() uint {
64
+
ifclient.Cfg.GasBumpRetries() !=0 {
65
+
returnclient.Cfg.GasBumpRetries()
66
+
}
67
+
return10
68
+
}()),
69
+
retry.RetryIf(func(errerror) bool {
70
+
returnstrings.Contains(strings.ToLower(err.Error()), "no contract code at given address") ||
71
+
strings.Contains(strings.ToLower(err.Error()), "no contract code after deployment") ||
0 commit comments