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
Labels: complexity: high
Implement
validateCallerAllowlist(invoice, callerAddress)that checks whether a calling contract is on the invoice'sallowed_callerslist before submitting a payment. Should be used by integrating contracts to pre-validate.Acceptance criteria:
{ allowed: boolean, reason: string }{ allowed: true }whenallowed_callersis null (open invoice){ allowed: false, reason: 'caller not in allowlist' }otherwise