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: implement generateFakeResources on Account class #2351

Open
wants to merge 33 commits into
base: master
Choose a base branch
from

Conversation

Torres-ssf
Copy link
Contributor

@Torres-ssf Torres-ssf commented May 20, 2024

After the changes made in this PR we can work on: #2362

@Torres-ssf Torres-ssf self-assigned this May 20, 2024
Copy link
Member

@maschad maschad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job on this, we should definitely document as this is useful for a few scenarios.

packages/account/src/account.ts Show resolved Hide resolved
packages/account/src/predicate/predicate.ts Show resolved Hide resolved
packages/account/src/account.test.ts Outdated Show resolved Hide resolved
maschad
maschad previously approved these changes May 28, 2024
Copy link
Member

@maschad maschad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

nedsalk
nedsalk previously approved these changes May 30, 2024
@Torres-ssf Torres-ssf dismissed stale reviews from nedsalk and petertonysmith94 via 8955f97 May 30, 2024 15:28
Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
46.35%(-0.01%) 39.61%(+0%) 43.41%(-0.1%) 46.15%(-0.03%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 packages/account/src/account.ts 42.42%
(-0.26%)
26.86%
(+0%)
45.45%
(-2.93%)
42.26%
(-0.51%)
🔴 packages/account/src/predicate/predicate.ts 23.8%
(-0.39%)
31.25%
(+0%)
11.76%
(-1.57%)
22.38%
(-0.69%)

@Torres-ssf Torres-ssf enabled auto-merge (squash) May 30, 2024 15:45

<<< @/../../docs-snippets/test/fixtures/forc-projects/return-script/src/main.sw#generate-fake-resources-1{rust:line-numbers}

To execute a dry-run, use the `Provider.call` method. Ensure you set the `utxo_validation` flag to true, as this script uses fake UTXOs:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To execute a dry-run, use the `Provider.call` method. Ensure you set the `utxo_validation` flag to true, as this script uses fake UTXOs:
To execute a dry-run, use the `Provider.dryRun` method. Ensure you set the `utxo_validation` flag to `true`, as this script uses fake UTXOs:

This sounds counter intuitive, should we be calling or dry running here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Generate Fake Resources Into Account Class
5 participants