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
{{ message }}
Repository navigation
Commit 6ba673d
Browse filesBrowse the repository at this point in the historyBrowse files
feat: replace generic Error throws with typed error classes
Add ZeroExValidationError, ZeroExUnsupportedOperationError,
ZeroExTransactionRevertedError, and ZeroExTimeoutError. Replace all
generic Error instances in interface methods with the appropriate
typed class. Export new classes from index.js.
Update README fee mapping table with legacy fee/bridgeFee column and
add new error types to the error reference table.
|`fees.integratorFee`|`affiliate`| Integrator / referral fee | not visible |
161
161
162
162
Fee caps (`maxNetworkFeeBps`, `maxProtocolFeeBps`) are only enforced when the fee token matches the sell token. Cross-token comparisons are skipped because price data is not available in the API response.
163
163
@@ -171,6 +171,10 @@ Fee caps (`maxNetworkFeeBps`, `maxProtocolFeeBps`) are only enforced when the fe
171
171
|`ZeroExInsufficientLiquidityError`|`liquidityAvailable: false` in the price response |
172
172
|`ZeroExFeeLimitExceededError`| A quoted fee exceeds a configured `maxNetworkFeeBps` or `maxProtocolFeeBps` cap |
173
173
|`ZeroExReadOnlyError`|`swidge` is called without a full signing account |
174
+
|`ZeroExValidationError`| Invalid or missing input parameters |
175
+
|`ZeroExUnsupportedOperationError`| An unsupported operation is requested (e.g. cross-chain `toChain`) |
176
+
|`ZeroExTransactionRevertedError`| The swap transaction reverted on-chain |
177
+
|`ZeroExTimeoutError`| Timed out waiting for transaction confirmation |
174
178
|`NotImplementedError`|`getSupportedTokens()` is called |
0 commit comments