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

Provide try_register test utility #1422

Open
dmkozh opened this issue Jan 4, 2025 · 0 comments
Open

Provide try_register test utility #1422

dmkozh opened this issue Jan 4, 2025 · 0 comments

Comments

@dmkozh
Copy link
Contributor

dmkozh commented Jan 4, 2025

What problem does your feature solve?

Currently the register function unwraps the return value for the contract instantiation, which makes testing the constructor errors impossible.

What would you like to see?

Add a try_register function that returns a Result and thus allows testing the constructor error conditions. Env already returns a Result from the respective functions.

What alternatives are there?

It's possible to cover constructor errors using a test-only deployer contract, but that is more cumbersome and only works with Wasm contracts.

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

No branches or pull requests

1 participant