ink
ink copied to clipboard
Add documentation for testing cross-contract calls
I'm trying to test a cross-contract system implementation. A few things are unclear:
- How should the contracts be created in tests if
ContractRef's are created in constructors. - How to get the contract code hash from
Contract::new()result. - Whether these contracts need initial balance and how to send balance on
Contract::new()
Any help here is appreciated. Even links to the internals to help me investigate are appreciated as it's heavily nested within macros. Is there documentation on exposed contract methods?
I don't think this is possible at the moment. See https://github.com/paritytech/ink/issues/788 for some more info.
Someone in the comments mentions Redspot. You'll have to write the tests in JS and they will be more integration type tests than unit tests, so keep that in mind.
Any progress on this issue?
Try this: https://github.com/paritytech/ink/issues/1234#issuecomment-1283754747