Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(svm): N-01 Incomplete or Misleading Comments #843

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions programs/svm-spoke/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,12 @@ pub mod svm_spoke {
)
}

/// 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].
/// 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].
pub fn unsafe_deposit_v3(
ctx: Context<DepositV3>,
depositor: Pubkey,
Expand Down Expand Up @@ -486,15 +489,16 @@ pub mod svm_spoke {
/// BUNDLE FUNCTIONS *
/// *************************************

/// Executes relayer refund leaf. Only callable by owner.
/// Executes relayer refund leaf.
///
/// 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 UMIP.
/// 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>.
///
/// instruction_params Parameters:
/// - root_bundle_id: The ID of the root bundle containing the relayer refund root.
Expand Down
Loading