Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion api/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 3 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type Config struct {
Nodes []Node
StoreAllNodes []string
DeadNodes []string
VerifierAddress string
DelegatePrivateKey string
AxiomToken string
AxiomDataset string
Expand Down Expand Up @@ -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":
Expand All @@ -139,6 +141,7 @@ func init() {
Cfg.AudiusdEntityManagerAddress = core_config.ProdAcdcAddress
Cfg.AudiusAppUrl = "https://audius.co"
Cfg.RewardCodeAuthorizedKeys = []string{"DDT15s6MMNxE4jkyGN46wNYqrgLWofT6WAvWtjYYrCUq"}
Cfg.VerifierAddress = "0xbeef8E42e8B5964fDD2b7ca8efA0d9aef38AA996"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it actually beef?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default:
log.Fatalf("Unknown environment: %s", env)
}
Expand Down