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

Dry-run balance fixes #1882

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft

Dry-run balance fixes #1882

wants to merge 3 commits into from

Commits on Sep 11, 2023

  1. refactor!: don't export DRY_RUN_ACCOUNT

    BREAKING CHANGE: DRY_RUN_ACCOUNT not exported anymore
    Use `ak_11111111111111111111111111111111273Yts` or define an own address.
    davidyuk committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    120cdcc View commit details
    Browse the repository at this point in the history
  2. fix(chain)!: use on-chain balance in dry-run

    BREAKING CHANGE: On-chain balance used for accounts in dry-run
    Before it was an on-chain balance plus 1e+35.
    davidyuk committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    337090c View commit details
    Browse the repository at this point in the history
  3. feat(chain)!: add addAccounts option instead address in txDryRun

    BREAKING CHANGE: `txDryRun` accepts account balances in options
    Apply a change
    ```diff
    -txDryRun(tx, address)
    +txDryRun(tx, { addAccounts: [{ address, amount: n }] })
    ```
    Where `amount` is a value in aettos to add to the on-chain balance of that account.
    Alternatively, `addAccounts` can be omitted to use the on-chain balance
    ```js
    txDryRun(tx)
    ```
    Where `amount` is a value in aettos to add to the on-chain balance of that account.
    davidyuk committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    20874e0 View commit details
    Browse the repository at this point in the history