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

Conversation

davidyuk
Copy link
Member

closes #1881 closes #1860

This PR is supported by the Æternity Crypto Foundation

@davidyuk davidyuk added this to the next milestone Aug 17, 2023
BREAKING CHANGE: DRY_RUN_ACCOUNT not exported anymore
Use `ak_11111111111111111111111111111111273Yts` or define an own address.
BREAKING CHANGE: On-chain balance used for accounts in dry-run
Before it was an on-chain balance plus 1e+35.
@davidyuk davidyuk force-pushed the feature/fix-dry-run branch 2 times, most recently from 92ce62d to 68f7200 Compare September 11, 2023 07:39
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chain.balance works incorrectly in dry-run Allow to specify balance in dry-run
1 participant