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

Improve documentation on cross contract calls with ink! contracts #1379

Open
ltfschoen opened this issue Jun 21, 2023 · 1 comment
Open

Improve documentation on cross contract calls with ink! contracts #1379

ltfschoen opened this issue Jun 21, 2023 · 1 comment
Labels
enhancement New feature or request polkadot Concerns the Polkadot target

Comments

@ltfschoen
Copy link

ltfschoen commented Jun 21, 2023

This is just a suggestion. I was referred in this message https://substrate.stackexchange.com/a/8723/83 to code here https://github.com/hyperledger/solang/blob/main/integration/substrate/ink/caller/lib.rs#LL22C1-L39C10 that uses invoke.

But personally I found that the error messages were not helpful and instead I used try_invoke and got it to work here in my toy project that is based on the basic-contract-caller example https://github.com/ltfschoen/InkTemplate/pull/16/files#diff-ba49fae9563c10308f352432d1f8c64a39b7e30cdf751bf0a3311ab0b3f2aaf7R166

So I'd like to suggest possibly adopting the same in Solang

@xermicus
Copy link
Contributor

xermicus commented Jun 22, 2023

Well, I'd say for this integration test, it is not terribly important. We're only interested in whether the call goes through and works fine.

However, our documentation, for example in docs/targets/substrate.rst, deserves a new section containing concrete examples (possibly slightly more involved than this integration test) showing how to call ink! from Solidity and vice versa. If this is something you'd be interested in, we'd definitively welcome a PR!

@xermicus xermicus added the polkadot Concerns the Polkadot target label Jul 7, 2023
@xermicus xermicus changed the title try_invoke instead of invoke Improve documentation on cross contract calls with ink! contracts Jul 7, 2023
@xermicus xermicus added the enhancement New feature or request label Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request polkadot Concerns the Polkadot target
Projects
None yet
Development

No branches or pull requests

2 participants