-
Notifications
You must be signed in to change notification settings - Fork 40
feat: using ink! v6.0.0-beta
#645
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
Conversation
* feat: metadata flag to build contracts * chore: format * fix: polkavm-contracts tests * fix(wip): conflicts * fix: dependencies from common * fix: KeyPair dependency * fix: weights * fix: dependencies issues * refactor: cleanup * refactor: clean up warning * chore: format
v6.0.0 alpha.4v6.0.0-beta
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.
Pull Request Overview
This PR consolidates ink! contract support by removing the v5/v6 feature flags and standardizing on ink! v6.0.0-beta. The changes update dependencies, remove conditional compilation, and simplify the codebase by eliminating version-specific code paths.
Key changes:
- Consolidates from separate
v5andv6features to a singlecontractfeature - Updates all dependencies to newer versions (subxt 0.44.0, ink 6.0.0-beta, sp-core 38.0.0, etc.)
- Removes conditional compilation with
#[cfg(feature = "v5/v6")]throughout the codebase
Reviewed Changes
Copilot reviewed 46 out of 48 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Updates dependencies to newer versions, consolidates contract-related dependencies |
| crates/pop-cli/Cargo.toml | Simplifies features by removing v5/v6 distinctions, consolidates to single contract feature |
| crates/pop-contracts/Cargo.toml | Removes optional dependencies, makes contract dependencies required |
| crates/pop-contracts/src/*.rs | Removes conditional compilation and version-specific code paths |
| crates/pop-cli/src/commands/*.rs | Updates feature flags from polkavm-contracts/wasm-contracts to contract |
| Testing files | Updates test contract artifacts to v6 format |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tsenovilla
left a comment
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.
This is great!
Too many changes but mostly related to the flags removal :)
moliholy
left a comment
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.
All good! Thanks a lot for getting rid of so many feature flags and greatly simplifying the codebase! 🙏
This PR upgrades pop-cli to use the latest ink! v6.0.0-beta.
To install it:
Remove the feature flag
polkavm-contractsandwasm-contractsto provides support for a single contract type v6 which closes Make polkavm the default #607While updating to the latest ink! version, I also had to update the Polkadot SDK dependencies to resolve compatibility issues and fix several Clippy warnings introduced by these updates, which adds some noise to the PR.
This PR allow introduces a new
--metadataflag to thepop buildcommand, allowing users to specify the contract metadata: ink! or solidity. (Initially done in feat: add metadata specification flag to pop build for polkavm contracts #567)To test
In the
Cargo.tomlof your contract include:Then, build the contract with the desired metadata format:
Closes #549
cargo-contractdependencies this PR also closes fix(pop call contract): properly parse AccountId values inside Vectors #619