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

[Feature]: Make Account Creation Within #[motsu::test] Deterministic #28

Open
1 task done
0xNeshi opened this issue Jan 23, 2025 · 0 comments
Open
1 task done
Labels
blocked Waiting for an external dependency to resolve enhancement New feature or request

Comments

@0xNeshi
Copy link
Collaborator

0xNeshi commented Jan 23, 2025

What is the feature you would like to see?

Blocked by #27


We can make account instantiation more ergonomic by taking advantage of instantiating Account from private key str slices.

This test case signature:

#[motsu::test]
fn some_test(erc20: Contract<Erc20>, alice: Account, bob: Account) {
    ...
}

Can be desugared to:

#[test]
fn some_test() {
    let test = |erc20: Contract<Erc20>, alice: Account, bob: Account| {
          ... 
    };
    test(Contract::<Erc20>::from_str("erc20"), Account::from_str("alice"), Account::from_str("bob"));
}

Original idea: #14 (comment)

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines
@0xNeshi 0xNeshi added blocked Waiting for an external dependency to resolve enhancement New feature or request labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Waiting for an external dependency to resolve enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant