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

Expose deposit amounts in AbstractDepositorContract #791

Merged
merged 4 commits into from
Feb 28, 2024

Commits on Feb 27, 2024

  1. Expose minimum deposit amount in AbstractDepositorContract

    Integrators may need minimum deposit amount to introduce validation if
    the amount user wants to deposit meets Bridge requirement of a deposit
    to exceed the dust threshold.
    nkuba committed Feb 27, 2024
    Configuration menu
    Copy the full SHA
    3e3fc11 View commit details
    Browse the repository at this point in the history
  2. Remove unused import in test

    nkuba committed Feb 27, 2024
    Configuration menu
    Copy the full SHA
    c2d2591 View commit details
    Browse the repository at this point in the history
  3. Retrun initial deposit amount from _initializeDeposit function

    The amount may be useful for integrators for validations of the deposit
    amount. See example use case in thesis/acre#253 (comment)
    
    It turns out that this version where we read from the storage costs
    `117 366` gas. Which is less than an alternative approach:
    ```
            initialDepositAmount =
                fundingTx
                    .outputVector
                    .extractOutputAtIndex(reveal.fundingOutputIndex)
                    .extractValue() *
                SATOSHI_MULTIPLIER;
    ```
    which costs `117 601` gas.
    nkuba committed Feb 27, 2024
    Configuration menu
    Copy the full SHA
    ec3e81e View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2024

  1. Update example usage in docs for _initializeDeposit

    _initializeDeposit now returns additional property:
    initialDepositAmount.
    We need to update the usage example.
    nkuba committed Feb 28, 2024
    Configuration menu
    Copy the full SHA
    a3a7cf6 View commit details
    Browse the repository at this point in the history