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

[ink_e2e] method to generate and fund unique accounts #1615

Merged
merged 215 commits into from
Jan 24, 2023
Merged

Conversation

ascjones
Copy link
Collaborator

@ascjones ascjones commented Jan 24, 2023

Allows individual tests to generate their own unique accounts to avoid the problem of race conditions between tests using the same account, causing failures in #1591.

Can consider integrating this into the environment somehow, but for now providing the method is a good start.

⚠️ The commit history and file diff in this PR view is messed up, due to it being originally based off #1512 and #1591, and my failing to rebase onto master. So this PR view shows commits and changes from those PRs.
For the clean diff see the commit view 8321e6f ⚠️

HCastano and others added 30 commits November 25, 2022 09:52
This commit lets us grab what's in the output buffer after our call to
`instantiate`, however we are unable to succesfully decode the
`AccountId` from the success case.
I accidently introduced this not knowing that the generic `C` was for
the return type
Is supposed to help give better error messages if somebody uses a wrong
type with the builder
Co-authored-by: Andrew Jones <ascjones@gmail.com>
crates/e2e/src/xts.rs Outdated Show resolved Hide resolved
crates/e2e/src/xts.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@cmichi cmichi left a comment

Choose a reason for hiding this comment

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

Nice! Would love to see this as part of the environment eventually. Could you create a follow-up so we don't forget about it?

ascjones and others added 2 commits January 24, 2023 18:57
Co-authored-by: Michael Müller <mich@elmueller.net>
@ascjones
Copy link
Collaborator Author

I suggest to merge #1591 first, then we can merge this into master so it has it's own commit for the CHANGELOG

@codecov-commenter
Copy link

codecov-commenter commented Jan 24, 2023

Codecov Report

Merging #1615 (1159ab6) into master (78f70db) will decrease coverage by 0.16%.
The diff coverage is 29.87%.

@@            Coverage Diff             @@
##           master    #1615      +/-   ##
==========================================
- Coverage   64.84%   64.68%   -0.16%     
==========================================
  Files         205      207       +2     
  Lines        6286     6417     +131     
==========================================
+ Hits         4076     4151      +75     
- Misses       2210     2266      +56     
Impacted Files Coverage Δ
crates/e2e/src/client.rs 36.36% <ø> (ø)
crates/e2e/src/xts.rs 0.00% <ø> (ø)
crates/env/src/api.rs 34.78% <0.00%> (-2.15%) ⬇️
crates/env/src/backend.rs 78.12% <ø> (ø)
crates/env/src/call/call_builder.rs 0.00% <ø> (ø)
crates/env/src/call/execution_input.rs 76.31% <ø> (ø)
crates/env/src/engine/off_chain/impls.rs 45.76% <0.00%> (-1.89%) ⬇️
...odegen/src/generator/as_dependency/call_builder.rs 100.00% <ø> (ø)
crates/ink/codegen/src/generator/dispatch.rs 94.19% <ø> (ø)
crates/ink/codegen/src/generator/env.rs 100.00% <ø> (ø)
... and 25 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Base automatically changed from aj/get-lang-error-from-create-builder to master January 24, 2023 19:24
@ascjones ascjones merged commit 8321e6f into master Jan 24, 2023
@ascjones ascjones deleted the aj/e2e-accounts branch January 24, 2023 19:24
ascjones added a commit that referenced this pull request Jan 25, 2023
@ascjones
Copy link
Collaborator Author

Nice! Would love to see this as part of the environment eventually. Could you create a follow-up so we don't forget about it?

#1618

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

Successfully merging this pull request may close these issues.

4 participants