From 272215c981e2b9b1f214fbb70e783eeb231338b6 Mon Sep 17 00:00:00 2001 From: Alec Savvy Date: Mon, 10 Nov 2025 09:33:29 -0700 Subject: [PATCH] verifed check --- api/relay.go | 6 +++++- config/config.go | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/api/relay.go b/api/relay.go index e85f2d3a..b72e2b7d 100644 --- a/api/relay.go +++ b/api/relay.go @@ -193,8 +193,12 @@ func (app *ApiServer) relay(c *fiber.Ctx) error { return fiber.NewError(fiber.StatusForbidden, "forbidden: signer does not match sender") } + isVerifier := strings.EqualFold(wallet, config.Cfg.VerifierAddress) _, anonymouslyAllowed := anonymouslyAllowedActions[operation] - if anonymouslyAllowed { + + // skip auth check if verifier or operation is anonymously allowed + skipAuthCheck := isVerifier || anonymouslyAllowed + if skipAuthCheck { logger.Info("operation is anonymously allowed") msg, err := app.handleRelay(ctx, logger, decodedTx) if err != nil { diff --git a/config/config.go b/config/config.go index 635bb961..0058a167 100644 --- a/config/config.go +++ b/config/config.go @@ -26,6 +26,7 @@ type Config struct { Nodes []Node StoreAllNodes []string DeadNodes []string + VerifierAddress string DelegatePrivateKey string AxiomToken string AxiomDataset string @@ -118,6 +119,7 @@ func init() { Cfg.AudiusdEntityManagerAddress = core_config.StageAcdcAddress Cfg.AudiusAppUrl = "https://staging.audius.co" Cfg.RewardCodeAuthorizedKeys = []string{"9XeZbswbSSUU4AHVArQbTQjAEjAPhVweGU5cogBVkvh4", "GrWNH9qfwrvoCEoTm65hmnSh4z3CD96SfhtfQY6ZKUfY"} + Cfg.VerifierAddress = "0xbbbb93A6B3A1D6fDd27909729b95CCB0cc9002C0" case "prod": fallthrough case "production": @@ -139,6 +141,7 @@ func init() { Cfg.AudiusdEntityManagerAddress = core_config.ProdAcdcAddress Cfg.AudiusAppUrl = "https://audius.co" Cfg.RewardCodeAuthorizedKeys = []string{"DDT15s6MMNxE4jkyGN46wNYqrgLWofT6WAvWtjYYrCUq"} + Cfg.VerifierAddress = "0xbeef8E42e8B5964fDD2b7ca8efA0d9aef38AA996" default: log.Fatalf("Unknown environment: %s", env) }