-
Notifications
You must be signed in to change notification settings - Fork 370
feat(api-contract): add support for ink! v6 and pallet-revive compatibility #6158
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
Merged
valentinfernandez1
merged 11 commits into
polkadot-js:master
from
use-ink:chore/add-revive
Jun 9, 2025
Merged
feat(api-contract): add support for ink! v6 and pallet-revive compatibility #6158
valentinfernandez1
merged 11 commits into
polkadot-js:master
from
use-ink:chore/add-revive
Jun 9, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Jun 2, 2025
valentinfernandez1
previously approved these changes
Jun 9, 2025
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.
Just needs a yarn lint
valentinfernandez1
approved these changes
Jun 9, 2025
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ink! has released the alpha version of ink! v6, which introduces major changes to how smart contracts are deployed and executed.
The biggest shift is the migration from
pallet-contracts
+ WebAssembly (executed in wasmi) to pallet-revive + RISC-V (executed in PolkaVM).I previously opened an issue asking for guidance on the best approach. The recommendation was to preserve backwards compatibility while supporting v6 — this PR follows that approach.
How to test it locally
Toolchain Setup
For ink! v6
Creating and deploying ink! v6 contracts requires a different version of the CLI tool (whether you use
pop-cli
orcargo-contracts
) than ink! v5.For ink! v6, install
pop-cli
with the polkavm-contracts feature enabled:Steps to deploy and interact:
See Getting Started with ink! v6 for more.
For ink! v5
Install the CLI without the
polkavm-contracts
feature:Then follow the same flow as above.
Node to deploy your contracts
For ink! v5, you can use the substrate-contracts-node, which includes the traditional pallet-contracts runtime. For ink! v6, the recommended node is ink-node, which runs pallet-revive and is RISC-V + PolkaVM based.
If you want to test both versions in the same chain, you can use a local instance of pop-node, or the public testnet RPC endpoint at:
https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc2.paseo.popnetwork.xyz#/explorer
To interact on Pop Network Testnet, you’ll need tokens. You can follow this guide to get some:
Bridge tokens to Pop Network
Project that integrates these changes
I've been working on adapting the Contracts UI to support both ink! v6 and ink! v5 (and earlier) smart contracts. This integration relies on the changes introduced in the
api-contract
library in this PR.If you'd like to experiment with it, you can try it out by checking out the related PR use-ink/contracts-ui#571