From 73322fad1058f0bea971776b0af8428e09c3f2a3 Mon Sep 17 00:00:00 2001 From: Morgan Kuphal <87319522+KuphJr@users.noreply.github.com> Date: Tue, 12 Sep 2023 18:26:13 -0500 Subject: [PATCH] Add log when allowlist routeID is unset (#10611) * Add log when allowlist routeID is unset * Added debug log * Addressed feedback --- core/services/gateway/handlers/functions/allowlist.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/services/gateway/handlers/functions/allowlist.go b/core/services/gateway/handlers/functions/allowlist.go index af00aeac915..19bc61aabad 100644 --- a/core/services/gateway/handlers/functions/allowlist.go +++ b/core/services/gateway/handlers/functions/allowlist.go @@ -177,6 +177,10 @@ func (a *onchainAllowlist) updateFromContractV1(ctx context.Context, blockNum *b if err != nil { return errors.Wrap(err, "unexpected error during functions_router.GetAllowListId") } + a.lggr.Debugw("successfully fetched allowlist route ID", "id", tosID) + if tosID == [32]byte{} { + return errors.New("allowlist route ID has not been set") + } tosAddress, err := a.contractV1.GetContractById(&bind.CallOpts{ Pending: false, Context: ctx, @@ -184,6 +188,7 @@ func (a *onchainAllowlist) updateFromContractV1(ctx context.Context, blockNum *b if err != nil { return errors.Wrap(err, "unexpected error during functions_router.GetContractById") } + a.lggr.Debugw("successfully fetched allowlist contract address", "address", tosAddress) tosContract, err := functions_allow_list.NewTermsOfServiceAllowList(tosAddress, a.client) if err != nil { return errors.Wrap(err, "unexpected error during functions_allow_list.NewTermsOfServiceAllowList")