Web3RpcError.cancelled constructor

Web3RpcError.cancelled([
  1. String message = 'Request cancelled'
])

The request was cancelled by the wallet before it produced a result.

EIP-1193 has no dedicated "cancelled" code, so we reuse 4900 (disconnected): from the DApp's point of view the provider stopped serving that request, which is exactly what 4900 communicates and what existing DApp error handling already treats as retryable. 4001 is deliberately not used — it means the user rejected, and a wallet-initiated cancellation (page teardown, account switch, timeout) is not a user rejection.

Implementation

factory Web3RpcError.cancelled([
  String message = 'Request cancelled',
]) =>
    Web3RpcError(4900, message);