Skip to content

Commit 3210640

Browse files
committed
Add REQ-algochat-024/025 for ARC-4 encoding and refund foreign accounts
1 parent 8706c8d commit 3210640

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

specs/algochat/requirements.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,17 @@ The mailbox transport SHALL be strictly opt-in — exposed by `AlgorandService`
179179
Acceptance Criteria
180180
- Service tests with a stubbed algod client verify single put, atomic fan-out put, burn, and reclaim group shapes with correct ABI selectors, arguments, and box references; off-chain box reads returning depositor, write round, and envelope; and that the transport is absent unless configured.
181181

182+
### REQ-algochat-024
183+
184+
Mailbox put envelopes SHALL be transmitted as ARC-4 dynamic byte arrays — `uint16_be(length) ‖ bytes` — for both single puts and fan-out legs, and the encoder SHALL reject payloads longer than 65535 bytes with a typed error.
185+
186+
Acceptance Criteria
187+
- Unit tests verify the big-endian uint16 length prefix and verbatim payload passthrough, and stub-algod tests confirm put and fan-out app args carry the ARC-4-encoded envelope while static `byte[32]` args remain raw.
188+
189+
### REQ-algochat-025
190+
191+
Mailbox burn and reclaim SHALL include the depositor address — parsed from the mailbox box header — in the foreign accounts array so the contract's inner MBR refund succeeds, and SHALL omit foreign accounts when the mailbox box is absent (idempotent burn).
192+
193+
Acceptance Criteria
194+
- Stub-algod tests verify burn includes the depositor for an existing mailbox, omits foreign accounts for an absent mailbox, and reclaim includes the depositor.
195+

0 commit comments

Comments
 (0)