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

[BUG] WASM contract initialization process #399

Closed
yun-yeo opened this issue Sep 16, 2020 · 0 comments · Fixed by #398
Closed

[BUG] WASM contract initialization process #399

yun-yeo opened this issue Sep 16, 2020 · 0 comments · Fixed by #398
Assignees
Labels
bug Something isn't working

Comments

@yun-yeo
Copy link
Contributor

yun-yeo commented Sep 16, 2020

Describe the bug
In current context, the contract initialize step is as follow

  1. Call init function of a contract
  2. Dispatch all response messages from the init of the contract
  3. Store the contract info to store

so the response messages cannot use the initialized contract like post initialization.
Ex)
Let's assume
A contract A is creating a contract B at init function and the contract B is invoking the contract A to register itself at init function.

Then it must be failed in current initialization process, because the initialized contract A is not store until the all response messages(create the contract B and invoke the contract A to register the contract B) are fully finished. The response messages cannot invoke the contract A.

To Reproduce
Try to use the initialized contract at initialization step with response messages.

Context & versions
v0.4.0-rc.4

(if applicable) suggested solution
Store the initialized contact data first before dispatching response messages.

@yun-yeo yun-yeo added the bug Something isn't working label Sep 16, 2020
@yun-yeo yun-yeo self-assigned this Sep 16, 2020
@yun-yeo yun-yeo closed this as completed Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant