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 28 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/

How to test

Note: ink! v6 support relies on pending changes in the polkadot-js/api repo: polkadot-js/api#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

Closes #566

Copy link

netlify bot commented Jun 2, 2025

Deploy Preview for ui-use-ink failed. Why did it fail? →

Name Link
🔨 Latest commit 0cb7d75
🔍 Latest deploy log https://app.netlify.com/projects/ui-use-ink/deploys/683dc328f5c9fa0008b36ba8

"@polkadot/api": "15.8.1",
"@polkadot/api-contract": "15.8.1",
"@polkadot/api": "file:../polkadot-js-api/packages/api/build",
"@polkadot/api-contract": "file:../polkadot-js-api/packages/api-contract/build",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To update once this polkadot-js/api#6158 gets merged and released

@@ -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

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
2 participants