-
Notifications
You must be signed in to change notification settings - Fork 346
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
Add optional ibc entry point #692
Comments
Why is this needed? Can't we just try to call the function and fail if it doesn't (it's better to ask forgiveness than permission)? |
When we create a contract, if it supports IBC, we bind a port for it an allow others to connect. It would be good to know if this contract will accept connections first, so we don't bind 100s of ports for contracts that will just refuse everything |
Okay, thanks. At which point does this happen exactly? Store code? Instantiate? |
This IBC port bind happens in instantiate. I know the rust side of We could return it on |
Yes, we can have a getter funtion on Instance that loops over the export functions and checks if all requirements are met. This is super fast, easy to implement, can be accessed at any time and does not require storing data. |
Sounds like you have a plan. If you could make a PR of that method, I'd appreciate it. |
Good. This is a nobrainer (Monday). |
Okay, opening one last PR for the documentation / CHANGELOG items left to close this. Will finish that up once CosmWasm/wasmvm#167 is finalized (and wasmd work can proceed). |
IBC-enabled contracts will have an extra entry point (like how migrate is optional) called
ibc
.Related to #147
** This is a placeholder issue that needs some clarification before starting **
This entry point will accept a fixed set of life-cycle callbacks from the IBC module. The exact format of the message is still to be defined (we will spec before starting the issue), but the general entry point would look like:
This entry point should be exported through
cosmwasm-vm
andwasmvm
intowasmd
.This ticket is broken down into multiple PRs:
packages/vm/src/calls.rs
) (Add ibc stargate to vm #716)packages/vm/src/testing/calls.rs
) (Add ibc stargate to vm #716)The text was updated successfully, but these errors were encountered: