Skip to content

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.

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!

@AlexD10S AlexD10S merged commit 3c32df8 into master Jun 17, 2025
13 checks passed
@AlexD10S AlexD10S deleted the feat/support-ink-v6 branch June 17, 2025 15:38
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