Skip to content

Add allowed-callers enforcement helper #293

Description

@Kingsman-99

Labels: complexity: high

Implement validateCallerAllowlist(invoice, callerAddress) that checks whether a calling contract is on the invoice's allowed_callers list before submitting a payment. Should be used by integrating contracts to pre-validate.

Acceptance criteria:

  • Returns { allowed: boolean, reason: string }
  • Returns { allowed: true } when allowed_callers is null (open invoice)
  • Returns { allowed: false, reason: 'caller not in allowlist' } otherwise
  • Pure function, no RPC calls

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions