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

Simplify getting the contract admin and mocking it. #105

Open
4 tasks
Taztingo opened this issue Mar 8, 2023 · 0 comments
Open
4 tasks

Simplify getting the contract admin and mocking it. #105

Taztingo opened this issue Mar 8, 2023 · 0 comments
Assignees

Comments

@Taztingo
Copy link
Collaborator

Taztingo commented Mar 8, 2023

Summary

Allow the user to easily query for the contract admin, and provide an easier way for a user to set the admin for mock dependencies.

Problem Definition

It is possible for a contract to use the admin within it's logic. There is currently a way to obtain the admin by querying the ContractInfo, but it's a bit clumsy. It is also very work intensive in setting up the test mock admin because the user must know how to work with the handlers.

Proposal

Create a command get_admin() that allows the user to obtain an Optional for the admin.
Create a set_admin(Option) command, update provwasm's mock_dependencies(&[Coin], Option), or create an additional mock_dependencies_with_admin(&[Coin], Option) that allows users to configure the admin while testing.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@kwtalley kwtalley self-assigned this Mar 20, 2023
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

2 participants