Skip to content

Commit

Permalink
docs: max_fee
Browse files Browse the repository at this point in the history
  • Loading branch information
taturosati committed Aug 28, 2024
1 parent f20679a commit a81a870
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions batcher/aligned-sdk/src/sdk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ use futures_util::{
/// * `eth_rpc_url` - The URL of the Ethereum RPC node.
/// * `chain` - The chain on which the verification will be done.
/// * `verification_data` - An array of verification data of each proof.
/// * `max_fees` - An array of the maximum fee that the submitter is willing to pay for each proof verification.
/// * `wallet` - The wallet used to sign the proof.
/// * `nonce` - The nonce of the submitter address. See `get_next_nonce`.
/// # Returns
Expand All @@ -54,6 +55,7 @@ use futures_util::{
/// * `BatchVerificationTimeout` if there is a timeout waiting for the batch verification.
/// * `InvalidSignature` if the signature is invalid.
/// * `InvalidNonce` if the nonce is invalid.
/// * `InvalidMaxFee` if the max fee is invalid.
/// * `InvalidProof` if the proof is invalid.
/// * `ProofTooLarge` if the proof is too large.
/// * `InsufficientBalance` if the sender balance is insufficient or unlocked
Expand Down Expand Up @@ -83,6 +85,7 @@ pub async fn submit_multiple_and_wait_verification(
/// # Arguments
/// * `batcher_url` - The url of the batcher to which the proof will be submitted.
/// * `verification_data` - An array of verification data of each proof.
/// * `max_fees` - An array of the maximum fee that the submitter is willing to pay for each proof verification.
/// * `wallet` - The wallet used to sign the proof.
/// * `nonce` - The nonce of the submitter address. See `get_next_nonce`.
/// # Returns
Expand All @@ -96,6 +99,7 @@ pub async fn submit_multiple_and_wait_verification(
/// * `WebSocketClosedUnexpectedlyError` if the connection with the batcher is closed unexpectedly.
/// * `InvalidSignature` if the signature is invalid.
/// * `InvalidNonce` if the nonce is invalid.
/// * `InvalidMaxFee` if the max fee is invalid.
/// * `InvalidProof` if the proof is invalid.
/// * `ProofTooLarge` if the proof is too large.
/// * `InsufficientBalance` if the sender balance is insufficient or unlocked.
Expand Down Expand Up @@ -192,6 +196,7 @@ async fn _submit_multiple(
/// * `eth_rpc_url` - The URL of the Ethereum RPC node.
/// * `chain` - The chain on which the verification will be done.
/// * `verification_data` - The verification data of the proof.
/// * `max_fee` - The maximum fee that the submitter is willing to pay for the verification.
/// * `wallet` - The wallet used to sign the proof.
/// * `nonce` - The nonce of the submitter address. See `get_next_nonce`.
/// # Returns
Expand All @@ -208,6 +213,7 @@ async fn _submit_multiple(
/// * `BatchVerificationTimeout` if there is a timeout waiting for the batch verification.
/// * `InvalidSignature` if the signature is invalid.
/// * `InvalidNonce` if the nonce is invalid.
/// * `InvalidMaxFee` if the max fee is invalid.
/// * `InvalidProof` if the proof is invalid.
/// * `ProofTooLarge` if the proof is too large.
/// * `InsufficientBalance` if the sender balance is insufficient or unlocked
Expand Down Expand Up @@ -244,6 +250,7 @@ pub async fn submit_and_wait_verification(
/// # Arguments
/// * `batcher_url` - The url of the batcher to which the proof will be submitted.
/// * `verification_data` - The verification data of the proof.
/// * `max_fee` - The maximum fee that the submitter is willing to pay for the verification.
/// * `wallet` - The wallet used to sign the proof.
/// * `nonce` - The nonce of the submitter address. See `get_next_nonce`.
/// # Returns
Expand All @@ -257,6 +264,7 @@ pub async fn submit_and_wait_verification(
/// * `WebSocketClosedUnexpectedlyError` if the connection with the batcher is closed unexpectedly.
/// * `InvalidSignature` if the signature is invalid.
/// * `InvalidNonce` if the nonce is invalid.
/// * `InvalidMaxFee` if the max fee is invalid.
/// * `InvalidProof` if the proof is invalid.
/// * `ProofTooLarge` if the proof is too large.
/// * `InsufficientBalance` if the sender balance is insufficient or unlocked
Expand Down
11 changes: 11 additions & 0 deletions docs/3_guides/1.2_SDK_api_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Submits a proof to the batcher to be verified and returns an aligned verificatio
pub async fn submit(
batcher_url: &str,
verification_data: &VerificationData,
max_fee; U256,
wallet: Wallet<SigningKey>,
nonce: U256,
) -> Result<AlignedVerificationData, errors::SubmitError>
Expand All @@ -19,6 +20,7 @@ pub async fn submit(

- `batcher_url` - The url of the batcher to which the proof will be submitted.
- `verification_data` - The verification data for the proof.
- `max_fee` - The maximum fee that the submitter is willing to pay for the proof verification.
- `wallet` - The wallet used to sign the proof. Should be using correct chain id. See `get_chain_id`.
- `nonce` - The nonce of the submitter address. See `get_next_nonce`.

Expand All @@ -36,6 +38,7 @@ pub async fn submit(
- `WebSocketClosedUnexpectedlyError` if the connection with the batcher is closed unexpectedly.
- `InvalidSignature` if the signature is invalid.
- `InvalidNonce` if the nonce is invalid.
- `InvalidMaxFee` if the max fee is invalid.
- `InvalidProof` if the proof is invalid.
- `ProofTooLarge` if the proof is too large.
- `InsufficientBalance` if the sender balance is not enough or unlocked
Expand All @@ -50,6 +53,7 @@ Submits multiple proofs to the batcher to be verified and returns an aligned ver
pub async fn submit_multiple(
batcher_url: &str,
verification_data: &[VerificationData],
max_fees: &[U256],
wallet: Wallet<SigningKey>,
nonce: U256,
) -> Result<Vec<AlignedVerificationData>, errors::SubmitError>
Expand All @@ -59,6 +63,7 @@ pub async fn submit_multiple(

- `batcher_url` - The url of the batcher to which the proof will be submitted.
- `verification_data` - A verification data array.
- `max_fees` - A max fee array.
- `wallet` - The wallet used to sign the proof. Should be using correct chain id. See `get_chain_id`.
- `nonce` - The nonce of the submitter address. See `get_next_nonce`.

Expand All @@ -76,6 +81,7 @@ pub async fn submit_multiple(
- `WebSocketClosedUnexpectedlyError` if the connection with the batcher is closed unexpectedly.
- `InvalidSignature` if the signature is invalid.
- `InvalidNonce` if the nonce is invalid.
- `InvalidMaxFee` if the max fee is invalid.
- `InvalidProof` if the proof is invalid.
- `ProofTooLarge` if the proof is too large.
- `InsufficientBalance` if the sender balance is not enough or unlocked
Expand All @@ -93,6 +99,7 @@ pub async fn submit_and_wait_verification(
eth_rpc_url: &str,
chain: Chain,
verification_data: &VerificationData,
max_fee: U256,
wallet: Wallet<SigningKey>,
nonce: U256,
) -> Result<AlignedVerificationData, errors::SubmitError>
Expand All @@ -104,6 +111,7 @@ pub async fn submit_and_wait_verification(
- `eth_rpc_url` - The URL of the Ethereum RPC node.
- `chain` - The chain on which the verification will be done.
- `verification_data` - The verification data for the proof.
- `max_fee` - The maximum fee that the submitter is willing to pay for the proof verification.
- `wallet` - The wallet used to sign the proof. Should be using correct chain id. See `get_chain_id`.
- `nonce` - The nonce of the submitter address. See `get_next_nonce`.

Expand All @@ -124,6 +132,7 @@ pub async fn submit_and_wait_verification(
- `BatchVerificationTimeout` if there is a timeout waiting for the batch verification.
- `InvalidSignature` if the signature is invalid.
- `InvalidNonce` if the nonce is invalid.
- `InvalidMaxFee` if the max fee is invalid.
- `InvalidProof` if the proof is invalid.
- `ProofTooLarge` if the proof is too large.
- `InsufficientBalance` if the sender balance is not enough or unlocked
Expand Down Expand Up @@ -152,6 +161,7 @@ pub async fn submit_multiple_and_wait_verification(
- `eth_rpc_url` - The URL of the Ethereum RPC node.
- `chain` - The chain on which the verification will be done.
- `verification_data` - A verification data array.
- `max_fees` - A max fee array.
- `wallet` - The wallet used to sign the proof. Should be using correct chain id. See `get_chain_id`.
- `nonce` - The nonce of the submitter address. See `get_next_nonce`.

Expand All @@ -172,6 +182,7 @@ pub async fn submit_multiple_and_wait_verification(
- `BatchVerificationTimeout` if there is a timeout waiting for the batch verification.
- `InvalidSignature` if the signature is invalid.
- `InvalidNonce` if the nonce is invalid.
- `InvalidMaxFee` if the max fee is invalid.
- `InvalidProof` if the proof is invalid.
- `ProofTooLarge` if the proof is too large.
- `InsufficientBalance` if the sender balance is not enough or unlocked
Expand Down

0 comments on commit a81a870

Please sign in to comment.