Skip to content

Commit 3c20cc1

Browse files
Update the docs adding the new error type
1 parent 47a718a commit 3c20cc1

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

crates/sdk/src/verification_layer/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ use std::path::PathBuf;
7878
/// * `ProofTooLarge` if the proof is too large.
7979
/// * `InsufficientBalance` if the sender balance is insufficient or unlocked
8080
/// * `ProofQueueFlushed` if there is an error in the batcher and the proof queue is flushed.
81+
/// * `ProofReplaced` if the proof has been replaced.
8182
/// * `GenericError` if the error doesn't match any of the previous ones.
8283
#[allow(clippy::too_many_arguments)] // TODO: Refactor this function, use NoncedVerificationData
8384
pub async fn submit_multiple_and_wait_verification(
@@ -245,6 +246,7 @@ async fn fetch_gas_price(
245246
/// * `ProofTooLarge` if the proof is too large.
246247
/// * `InsufficientBalance` if the sender balance is insufficient or unlocked.
247248
/// * `ProofQueueFlushed` if there is an error in the batcher and the proof queue is flushed.
249+
/// * `ProofReplaced` if the proof has been replaced.
248250
/// * `GenericError` if the error doesn't match any of the previous ones.
249251
pub async fn submit_multiple(
250252
network: Network,
@@ -364,6 +366,7 @@ async fn _submit_multiple(
364366
/// * `ProofTooLarge` if the proof is too large.
365367
/// * `InsufficientBalance` if the sender balance is insufficient or unlocked
366368
/// * `ProofQueueFlushed` if there is an error in the batcher and the proof queue is flushed.
369+
/// * `ProofReplaced` if the proof has been replaced.
367370
/// * `GenericError` if the error doesn't match any of the previous ones.
368371
#[allow(clippy::too_many_arguments)] // TODO: Refactor this function, use NoncedVerificationData
369372
pub async fn submit_and_wait_verification(
@@ -421,6 +424,7 @@ pub async fn submit_and_wait_verification(
421424
/// * `ProofTooLarge` if the proof is too large.
422425
/// * `InsufficientBalance` if the sender balance is insufficient or unlocked
423426
/// * `ProofQueueFlushed` if there is an error in the batcher and the proof queue is flushed.
427+
/// * `ProofReplaced` if the proof has been replaced.
424428
/// * `GenericError` if the error doesn't match any of the previous ones.
425429
pub async fn submit(
426430
network: Network,

docs/3_guides/1.2_SDK_api_reference.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ pub async fn submit(
4444
- `InsufficientBalance` if the sender balance is not enough or unlocked
4545
- `ProofQueueFlushed` if there is an error in the batcher and the proof queue is flushed.
4646
- `NotAContract(address)` if you are trying to send to an address that is not a contract. This generally occurs if you have misconfigured the `environment` parameter.
47+
- `ProofReplaced` if the proof has been replaced.
4748
- `GenericError` if the error doesn't match any of the previous ones.
4849

4950
### `submit_multiple`
@@ -87,6 +88,7 @@ pub async fn submit_multiple(
8788
- `ProofTooLarge` if the proof is too large.
8889
- `InsufficientBalance` if the sender balance is not enough or unlocked
8990
- `ProofQueueFlushed` if there is an error in the batcher and the proof queue is flushed.
91+
- `ProofReplaced` if the proof has been replaced.
9092
- `GenericError` if the error doesn't match any of the previous ones.
9193

9294
### `submit_and_wait_verification`
@@ -137,6 +139,7 @@ pub async fn submit_and_wait_verification(
137139
- `InsufficientBalance` if the sender balance is not enough or unlocked
138140
- `ProofQueueFlushed` if there is an error in the batcher and the proof queue is flushed.
139141
- `NotAContract(address)` if you are trying to send to an address that is not a contract. This generally occurs if you have misconfigured the `environment` parameter.
142+
- `ProofReplaced` if the proof has been replaced.
140143
- `GenericError` if the error doesn't match any of the previous ones.
141144

142145
### `submit_multiple_and_wait_verification`
@@ -186,6 +189,7 @@ pub async fn submit_multiple_and_wait_verification(
186189
- `InsufficientBalance` if the sender balance is not enough or unlocked
187190
- `ProofQueueFlushed` if there is an error in the batcher and the proof queue is flushed.
188191
- `NotAContract(address)` if you are trying to send to an address that is not a contract. This generally occurs if you have misconfigured the `environment` parameter.
192+
- `ProofReplaced` if the proof has been replaced.
189193
- `GenericError` if the error doesn't match any of the previous ones.
190194

191195
### `is_proof_verified`

0 commit comments

Comments
 (0)