Skip to content

[PeerX Backlog # 39] MintToken batch path must require authentication #39

Description

@ameeribro4-sudo

Problem Statement
lib.rs::execute_batch_atomic calls
crate::require_verified_user(env, caller_addr) only when caller is
Some. The BatchOperation::MintToken case sets caller = None,
bypassing KYC. Anyone can mint by submitting a batch where the first
operation is a MintToken.

Expected Outcome
Every batch route is authenticated; MintToken is admin-only within
batches.

Acceptance Criteria

  • execute_batch_atomic and execute_batch_best_effort always
    call require_admin if any op is MintToken.
  • Test: non-admin batch with MintToken reverts.
  • check_kyc_guards.sh updated.

Files Affected

  • peerx-contracts/counter/src/lib.rs, scripts/check_kyc_guards.sh.

Dependencies Issue #11.
Difficulty / Effort 🥈 / S
Labels bug, security, priority/critical

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26bugPeerX Backlog label bug (bulk-imported)priority/criticalPeerX Backlog label priority/critical (bulk-imported)securityPeerX Backlog label security (bulk-imported)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions