|
15 | 15 |
|
16 | 16 | ## ContractClient (via `Evm`) |
17 | 17 |
|
18 | | -| Method | Args | Returns | Notes | |
19 | | -|--------------------------------------------|----------------------------|----------------------|------------------------------------------| |
20 | | -| `at(address, abi)` | `string`, `array\| string` | self | Set target contract & ABI JSON/array | |
21 | | -| `call(fn, args=[])` | `string`, `array` | `CallResult\| mixed` | eth_call; hex wrapped for decoding | |
22 | | -| `sendAsync(fn, args=[], opts=[])` | `string`, `array`, `array` | `string` | Dispatch async job; returns request UUID | |
23 | | -| `wait(txHash, timeoutSec=120, pollMs=800)` | `string`, `int`, `int` | `array\| null` | Poll receipt until mined/timeout | |
24 | | -| `estimateGas(data, from?)` | `string`, `?string` | `int` | Uses eth_estimateGas + padding | |
| 18 | +| Method | Args | Returns | Notes | |
| 19 | +|-------------------------------------------------|-----------------------------------|----------------------|------------------------------------------------------------------------| |
| 20 | +| `at(address, abi)` | `string`, `array\| string` | self | Set target contract & ABI JSON/array | |
| 21 | +| `call(fn, args=[])` | `string`, `array` | `CallResult\| mixed` | eth_call; hex wrapped for decoding | |
| 22 | +| `sendAsync(fn, args=[], opts=[], payload=null)` | `string`, `array`, `array`, mixed | `string` | Dispatch async job; returns request UUID; payload flows through events | |
| 23 | +| `wait(txHash, timeoutSec=120, pollMs=800)` | `string`, `int`, `int` | `array\| null` | Poll receipt until mined/timeout | |
| 24 | +| `estimateGas(data, from?)` | `string`, `?string` | `int` | Uses eth_estimateGas + padding | |
25 | 25 |
|
26 | 26 | ### CallResult |
27 | 27 |
|
|
62 | 62 |
|
63 | 63 | ## FeePolicy (via `EvmFees`) |
64 | 64 |
|
65 | | -| Method | Args | Returns | Notes | |
66 | | -|---------------------------|----------------|-----------------------------------------------------------|-----------------------------| |
67 | | -| `suggest()` | - | `['maxFeePerGas'=>string,'maxPriorityFeePerGas'=>string]` | Initial fee suggestion | |
68 | | -| `bump(previous, attempt)` | `array`, `int` | `array` | Adjust fees for replacement | |
| 65 | +| Method | Args | Returns | Notes | |
| 66 | +|----------------------------------------|--------------------------------------|--------------------------------|------------------------| |
| 67 | +| `suggest(callable $gasPriceFetcher)` | `callable $gasPriceFetcher` | `[priorityWei, maxFeeWei]` | Initial fee suggestion | |
| 68 | +| `replace(int $oldPriority, int $oldMax)`| `int $oldPriority, int $oldMax` | `[priorityWei, maxFeeWei]` | Replacement bump | |
69 | 69 |
|
70 | 70 | --- |
71 | 71 |
|
@@ -104,14 +104,14 @@ Start with `EvmLogs::query()` then chain: |
104 | 104 |
|
105 | 105 | ## Events |
106 | 106 |
|
107 | | -| Event | When | Key Data | |
108 | | -|-----------------|--------------------|-----------------------------------| |
109 | | -| `TxQueued` | Job pushed | request_id, function, address | |
110 | | -| `TxBroadcasted` | First broadcast ok | tx_hash, nonce, fees | |
111 | | -| `TxReplaced` | Fee bump broadcast | old_tx_hash, new_tx_hash, attempt | |
112 | | -| `TxMined` | Receipt found | tx_hash, receipt | |
113 | | -| `TxFailed` | Terminal failure | reason, attempts | |
114 | | -| `CallPerformed` | Read executed | from, to, function, raw_result | |
| 107 | +| Event | When | Key Data (excerpt) | |
| 108 | +|-----------------|--------------------|----------------------------------------| |
| 109 | +| `TxQueued` | Job pushed | to, data, payload | |
| 110 | +| `TxBroadcasted` | First broadcast ok | txHash, fields, payload | |
| 111 | +| `TxReplaced` | Fee bump broadcast | oldTxHash, newFields, attempt, payload | |
| 112 | +| `TxMined` | Receipt found | txHash, receipt, payload | |
| 113 | +| `TxFailed` | Terminal failure | to, data, reason, payload | |
| 114 | +| `CallPerformed` | Read executed | from, address, function, rawResult | |
115 | 115 |
|
116 | 116 | --- |
117 | 117 |
|
@@ -157,4 +157,4 @@ Maintains nonce ordering; for scaling use a distributed nonce manager. |
157 | 157 | - Never log private keys. |
158 | 158 | - Limit queue concurrency. |
159 | 159 | - Use multiple RPC endpoints for resilience. |
160 | | - |
| 160 | +- Attach domain payloads to events for traceability. |
0 commit comments