-
Notifications
You must be signed in to change notification settings - Fork 49
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
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for ui-use-ink ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
src/ui/contexts/ApiContext.tsx
Outdated
@@ -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, |
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.
Could use another, the only reason to pick Pop Network is because it support both ink! v6 and ink! v5
7b2dc52
to
6218c46
Compare
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, Alex!
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/api
latest 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:
Clone and build the following PR from our the Polkadot JS fork: https://github.com/use-ink/polkadot-js-api/tree/chore/add-revive