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

multitest: Ensure Warm sent funds visible to querier #347

Closed
ethanfrey opened this issue Jul 26, 2021 · 2 comments · Fixed by #363
Closed

multitest: Ensure Warm sent funds visible to querier #347

ethanfrey opened this issue Jul 26, 2021 · 2 comments · Fixed by #363
Assignees

Comments

@ethanfrey
Copy link
Member

When we execute/instantiate Wasm message, we:

  1. (optionally) move funds from sender to contract
  2. execute contract
  3. (optionally) dispatch sub messages that were returned (recursive)

Currently, if we move funds (1), those are not visible to the querier in (2). We need to ensure we use the proper setup for that.

@ethanfrey
Copy link
Member Author

I reviewed the code again and think this was fixed (not working in 0.7) after the major storage refactor.

However, we need a test case showing that. You can add another test contract that accepts funds and queries it's balance and does some action that shows it queried properly (including the funds just sent)

@ethanfrey
Copy link
Member Author

My idea of how to use this:

  1. Make a contract in test_helpers that looks more or less like the original Hackatom - init with arbiter, beneficiary and ExecuteMsg with a release all method (nothing else). Release will query the current balance and send it all (return BankMsg::Send)
  2. Instantiate it, sending 20coin
  3. arbiter releases tokens, sending an additional 10coin with that message
  4. Check balance of recipient is 30coin

This will show that the querier is returning the balance after the additional 10coin send, not the outdated balance

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

Successfully merging a pull request may close this issue.

2 participants