-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat(CLI): use aliases to avoid needlessly redeploying contracts #88
Conversation
27ad6c7
to
2beed2d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Love the refactoring. Just one (one and a half?) quick cleanup item(s).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need tests!
Added tests - adds it twice, ensure alias check works. Changes the file, ensures it replaces. Changes again with production, ensures error is thrown. |
Tests are working on moss but when run on github servers its getting this error:
Not sure what is going on |
THis is a flaky test issue that appears in the CLI too. The solution I had was to add sleeps to the failing test. However, this is not the correct solution for sure. One possible reason is that the tests are all trying to install and deploy the same contract. So one solution is to add random/unique data to the wasm's custom section. This will make the wasm have a new hash. So as long as the data that is used in the custom section is the same a test than the hash check you are doing should still work. We can chat about it if you want. I need to do it for the CLI so would be good to figure out an easy way to do it. Maybe we can make a small crate and publish to crates.io. This way we can use it across both projects and it'll be a lesson in publishing crates! |
Tried @willemneal suggestion, didn't seem to work. Very strange, makes me wonder if there is a different underlying issue here. |
This reverts commit 237cdd5.
fix formatting Co-authored-by: Chad Ostrowski <221614+chadoh@users.noreply.github.com>
89f96b7
to
74d8aa2
Compare
Turns out Willem's suggestion worked, problem was I modified the wrong wasm file (the one in the build directory instead of the one copied to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hooray!
Resolves issue #73 (comment)