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

Prevent sending coin if the contract is inactive. #394

Closed
zemyblue opened this issue Dec 10, 2021 · 2 comments · Fixed by #400
Closed

Prevent sending coin if the contract is inactive. #394

zemyblue opened this issue Dec 10, 2021 · 2 comments · Fixed by #400
Assignees
Labels

Comments

@zemyblue
Copy link
Member

zemyblue commented Dec 10, 2021

Summary

Even If a contract is inactive, coin transfer is possible. It should not be remitted.

https://github.com/line/lbm-sdk/blob/a58c60d1110239c77616e22b5702f0646ccb3b76/x/wasm/keeper/keeper.go#L1014-L1026

@zemyblue zemyblue self-assigned this Dec 13, 2021
@zemyblue
Copy link
Member Author

To send coin to contract use Send function of Bank module without any other related modules. And the way to restrict the inactive contract recipient is to add to blockedAddrs of bankmodule. But this blockedAddrs is just used to restrict to send some module. So, it is not proper in this case.

Is there any way to add this issue without modify bank module?

@zemyblue
Copy link
Member Author

I'll create bankplus module that is wrapped bank module.

The main feature of bankplus

  • restrict the transfer if recipient is contract and inactive.
  • manage blockedaddr which include inactive contract list.

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