Skip to content

Commit

Permalink
feat(svm): N-05 Ambiguous Parameter Usage for fill_deadline
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Maldonado <[email protected]>
  • Loading branch information
md0x committed Jan 7, 2025
1 parent 966bd55 commit 398273d
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions programs/svm-spoke/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ pub mod svm_spoke {
output_amount: u64,
destination_chain_id: u64,
exclusive_relayer: Pubkey,
fill_deadline: u32,
fill_deadline_offset: u32,
exclusivity_parameter: u32,
message: Vec<u8>,
) -> Result<()> {
Expand All @@ -304,18 +304,15 @@ pub mod svm_spoke {
output_amount,
destination_chain_id,
exclusive_relayer,
fill_deadline,
fill_deadline_offset,
exclusivity_parameter,
message,
)
}

/// Equivalent to deposit_v3, except that it doesn't use the global `number_of_deposits` counter as the deposit
/// nonce. Instead, it allows the caller to pass a `deposit_nonce`. This function is designed for anyone who
/// wants to pre-compute their resultant deposit ID, which can be useful for filling a deposit faster and
/// avoiding the risk of a deposit ID unexpectedly changing due to another deposit front-running this one and
/// incrementing the global deposit ID counter. This enables the caller to influence the deposit ID, making it
/// deterministic for the depositor. The computed `depositID` is the keccak256 hash of [signer, depositor, deposit_nonce].
/// Equivalent to deposit_v3 except the deposit_nonce is not used to derive the deposit_id for the depositor. This
/// Lets the caller influence the deposit ID to make it deterministic for the depositor. The computed depositID is
/// the keccak256 hash of [signer, depositor, deposit_nonce].
pub fn unsafe_deposit_v3(
ctx: Context<DepositV3>,
depositor: Pubkey,
Expand Down Expand Up @@ -489,16 +486,15 @@ pub mod svm_spoke {
/// BUNDLE FUNCTIONS *
/// *************************************
/// Executes relayer refund leaf.
/// Executes relayer refund leaf. Only callable by owner.
///
/// Processes a relayer refund leaf, verifying its inclusion in a previous Merkle root and that it was not
/// previously executed. Function has two modes of operation: a) transfers all relayer refunds directly to
/// relayers ATA or b) credits relayers with claimable claim_account PDA that they can use later to claim their
/// refund. In the happy path, (a) should be used. (b) should only be used if there is a relayer within the bundle
/// who can't receive the transfer for some reason, such as failed token transfers due to blacklisting. Executing
/// relayer refunds requires the caller to create a LUT and load the execution params into it. This is needed to
/// fit the data in a single instruction. The exact structure and validation of the leaf is defined in the Accross
/// UMIP: <https://github.com/UMAprotocol/UMIPs/blob/master/UMIPs/umip-179.md>.
/// fit the data in a single instruction. The exact structure and validation of the leaf is defined in the UMIP.
///
/// instruction_params Parameters:
/// - root_bundle_id: The ID of the root bundle containing the relayer refund root.
Expand Down

0 comments on commit 398273d

Please sign in to comment.