You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Accepts ECC USDC attached to the message and processes a buy on behalf of `buyer`. Used by Exchange to forward purchases. Does **not** check for multi-currency messages — only verifies ECC USDC is present.
18
+
Accepts eccUSDC attached to the message and processes a buy on behalf of `buyer`. Used by Exchange to forward purchases. Does **not** check for multi-currency messages — only verifies eccUSDC is present.
function claimUSDC(uint16 D, uint64 orderId, address seller) public
24
24
```
25
25
26
-
Called by a SellOrderLot to claim its USDC payout. Verifies caller address deterministically, checks the order is sold (`orderId <= soldPrefix[D]`), sends ECC USDC to `seller`, then calls `onReceiveUSDC` on the lot.
26
+
Called by a SellOrderLot to claim its eccUSDC payout. Verifies caller address deterministically, checks the order is sold (`orderId <= soldPrefix[D]`), sends eccUSDC to `seller`, then calls `onReceiveUSDC` on the lot.
27
27
28
28
### Admin
29
29
@@ -60,9 +60,9 @@ function getDetails() external view
60
60
61
61
Returns high-level contract state.
62
62
63
-
*`sellerShellPool` — total ECC SHELL held from seller deposits (nanoSHELL)
64
-
*`usdcBalance` — total ECC USDC tracked by the contract (microUSDC)
65
-
*`owedTotal` — total USDC owed to sellers awaiting claim (microUSDC)
63
+
*`sellerShellPool` — total SHELL held from seller deposits (nanoSHELL)
64
+
*`usdcBalance` — total eccUSDC tracked by the contract (microUSDC)
65
+
*`owedTotal` — total eccUSDC owed to sellers awaiting claim (microUSDC)
Initiates USDC payout claim. Sets `_claimed = true` and calls `Root.claimUSDC(denom, orderId, owner)`. If the root rejects (order not yet sold), the bounced message resets `_claimed = false` via `onBounce`.
138
+
Initiates eccUSDC payout claim. Sets `_claimed = true` and calls `Root.claimUSDC(denom, orderId, owner)`. If the root rejects (order not yet sold), the bounced message resets `_claimed = false` via `onBounce`.
139
139
140
140
Can be called by anyone (no `msg.sender` check), but the payout always goes to `_owner` (the original seller).
141
141
@@ -159,7 +159,7 @@ function getDetails() external view
function onTransferReceived(address from, address, uint128 value, uint128) external override
188
188
```
189
189
190
-
ISubscriber callback from the Exchange's TIP-3 USDC wallet. Mints equivalent ECC USDC and sends it to `from` (the depositor). Only callable by `_usdcWallet`.
190
+
ISubscriber callback from the Exchange's TIP-3 USDC wallet. Mints equivalent eccUSDC and sends it to `from` (the depositor). Only callable by `_usdcWallet`.
function mintAndSendAccumulator(address buyer, uint128 value, uint64 nonce) public onlyOwnerPubkey accept
204
204
```
205
205
206
-
Admin-only. Mints ECC USDC and calls `Accumulator.buyShellFor(buyer)` with the minted USDC attached. Requires whole USDC units and `nonce == _mintAccumulatorNonce + 1`. Uses separate nonce space from `mintAndSend`.
206
+
Admin-only. Mints eccUSDC and calls `Accumulator.buyShellFor(buyer)` with the minted eccUSDC attached. Requires whole eccUSDC units and `nonce == _mintAccumulatorNonce + 1`. Uses separate nonce space from `mintAndSend`.
207
207
208
208
### Admin
209
209
@@ -247,7 +247,7 @@ Returns the current owner public key.
247
247
function getTotalMinted() external view returns (uint128)
248
248
```
249
249
250
-
Returns total ECC USDC minted by this contract across all methods (microUSDC).
250
+
Returns total eccUSDC minted by this contract across all methods (microUSDC).
|`SellOrderCreated`|**610** + seller's address |`(address seller, uint16 denom, uint64 orderId, uint128 shellAmount)`| New lot created. Emitted twice: to addr 610 and to the seller's external address |
SettlementMonitor -.->|reads queues via getters| Accumulator
@@ -47,7 +47,7 @@ flowchart LR
47
47
48
48
## Contract roles
49
49
50
-
**ShellAccumulatorRootUSDC** is the central contract. It holds all ECC balances (USDC and SHELL from sellers), manages four FIFO queues (one per denomination), matches buyers against sellers, mints SHELL when sellers are insufficient, pays out USDC on claims, and handles NACKL redemption.
50
+
**ShellAccumulatorRootUSDC** is the central contract. It holds all ECC balances (eccUSDC and SHELL from sellers), manages four FIFO queues (one per denomination), matches buyers against sellers, mints SHELL when sellers are insufficient, pays out USDC on claims, and handles NACKL redemption.
51
51
52
52
**ShellSellOrderLot** is a lightweight per-order contract deployed by the Root when a seller deposits SHELL. It stores the seller's address, denomination, and order ID. Its only active function is `claim()`, which calls back into Root's `claimUSDC`. After payout confirmation, it self-destructs.
53
53
@@ -59,12 +59,12 @@ flowchart LR
59
59
60
60
Each denomination (1, 10, 100, 1000) has four counters:
|`nextId`| Next order ID to assign (starts at 1) |
65
+
|`available`| Number of lots waiting to be matched |
66
+
|`soldPrefix`| Contiguous prefix of sold lots |
67
+
|`owedCount`| Sold lots whose eccUSDC hasn't been claimed yet |
68
68
69
69
Order IDs are **1-based** (`nextId` starts at 1). The first lot gets `orderId = 1`, the second gets `orderId = 2`, etc. `soldPrefix = 3` means lots 1, 2, 3 are sold.
0 commit comments