Add testing for is_contract and is_caller_origin#22
Conversation
|
CI fails due to https://github.com/paritytech/ci_cd/issues/343. It runs locally though. |
| # Create a link to ink! in the local examples of the `ink-waterfall`. | ||
| ln -s /path/to/ink/ ./examples/ink |
There was a problem hiding this comment.
Why not just use a released version of ink? The CI will replace it with current master anyways.
There was a problem hiding this comment.
The CI will replace it with current master anyways.
Huh, how so?
There was a problem hiding this comment.
This line:
find ./examples/ -name 'Cargo.toml' -exec sed -i "s|../ink|../$INK_EXAMPLES_PATH|g" {} \;
But I see why now. We want to run it against a custom version locally, too.
agryaznov
left a comment
There was a problem hiding this comment.
Nice contract and test! LGTM
| * `UI_URL` ‒ URL of the UI to use. Defaults to the live interface for the chosen UI. | ||
| * `WATERFALL_CLOSE_BROWSER` ‒ Do not close browser window at the end of a test run. | ||
| Defaults to `true`. Set it to `false` to prevent closing . | ||
| * `WATERFALL_CLOSE_BROWSER` ‒ Close browser window at the end of a test run. |
There was a problem hiding this comment.
Thanks! No biggie, but going forward please avoid pushing to someone else's PR without talking to them first.
|
|
||
| # Remove Cargo.lock when creating an executable, leave it for libraries | ||
| # More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock | ||
| Cargo.lock No newline at end of file |
There was a problem hiding this comment.
Yeah that's a GitHub thing, we can safely ignore it.
@athei @agryaznov I've added an example contract to the
ink-waterfallwhich will run as part of the CI ‒ thus demonstrating thatis_contractandis_caller_originwork as intended. Do you think we can now stabilize those two methods inpallet-contracts?