Skip to content

feat: include support for ink v6 contracts #571

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

Open
wants to merge 33 commits into
base: master
Choose a base branch
from

Conversation

AlexD10S
Copy link
Contributor

@AlexD10S AlexD10S commented Jun 2, 2025

This PR adds support for ink! v6 contracts in the Contracts UI, while preserving full compatibility with ink! v5. It continues the work started in #569

Users can now select between v5 and v6 via a version switcher dropdown, similar to the approach used in the ink!-docs https://use.ink/docs/v6/

Version 5 remains the default for now, as version 6 is still in alpha. Once v6 is released, we can switch the default—just make sure to update the contracts in both the test and node environments.

Closes #566

How to test

polkadot-js/apilatest releases already supports the changes (polkadot-js/api#6158), can be run locally or test it using https://deploy-preview-571--ui-use-ink.netlify.app/

> Note: ink! v6 support relies on pending changes in the polkadot-js/api repo: https://github.com/polkadot-js/api/pull/6158

You must test this with local builds of the API packages:

"@polkadot/api-contract": "file:../polkadot-js-api/packages/api-contract/build",
"@polkadot/types": "file:../polkadot-js-api/packages/types/build"

Clone and build the following PR from our the Polkadot JS fork: https://github.com/use-ink/polkadot-js-api/tree/chore/add-revive

Copy link

netlify bot commented Jun 2, 2025

Deploy Preview for ui-use-ink ready!

Name Link
🔨 Latest commit 44dae50
🔍 Latest deploy log https://app.netlify.com/projects/ui-use-ink/deploys/684979943ebd9700083a9f4a
😎 Deploy Preview https://deploy-preview-571--ui-use-ink.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@@ -30,7 +30,7 @@ export const ApiContextProvider = ({ children }: React.PropsWithChildren<Partial
const rpcUrl = searchParams.get('rpc');
const [preferredEndpoint, setPreferredEndpoint] = useLocalStorage<string>(
LOCAL_STORAGE_KEY.PREFERRED_ENDPOINT,
ROCOCO_CONTRACTS.rpc,
POP_NETWORK_TESTNET.rpc,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use another, the only reason to pick Pop Network is because it support both ink! v6 and ink! v5

@AlexD10S AlexD10S force-pushed the feat/support-ink-v6 branch from 7b2dc52 to 6218c46 Compare June 11, 2025 10:46
Copy link
Collaborator

@cmichi cmichi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, Alex!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate Contracts UI to pallet-revive + ink! v6
3 participants