Skip to content

chore: switch default from v5 to v6 #577

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 9 commits into
base: master
Choose a base branch
from
Open

Conversation

AlexD10S
Copy link
Contributor

@AlexD10S AlexD10S commented Jul 10, 2025

As we did in cargo-contracts and the ink-docs use-ink/ink-docs#432 it makes sense to have ink! v6 as the default in Contracts UI as well.

This PR includes a large number of file changes because the test contracts had to be updated to ink! v6, and the tests were adjusted accordingly.

Copy link

netlify bot commented Jul 10, 2025

Deploy Preview for ui-use-ink ready!

Name Link
🔨 Latest commit aa18d81
🔍 Latest deploy log https://app.netlify.com/projects/ui-use-ink/deploys/6880eabaa0d0b90008988396
😎 Deploy Preview https://deploy-preview-577--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.

@AlexD10S AlexD10S marked this pull request as draft July 10, 2025 14:23
@AlexD10S AlexD10S marked this pull request as ready for review July 22, 2025 08:54
@@ -6,13 +6,13 @@ runs:
- name: Download node artifact
uses: actions/download-artifact@v4
with:
name: substrate-contracts-node
name: ink-node
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The CI needs to run the ink-node for testing ink! v6 contracts

@@ -53,31 +53,67 @@ describe('ERC20 Contract ', () => {

it(`transfers ${transferValue} Units to another account`, () => {
selectMessage('transfer', 3);
cy.get('.form-field.to').find('.dropdown').click().find('.dropdown__option').eq(3).click();
cy.get('.form-field.value').find('input[type="number"]').eq(0).type(`${transferValue}`);
cy.get('.form-field.to')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In all unit tests the main update was the way to select an address, before it was a dropdown to pick Alice/Bob, now we need to type the H160 address

@@ -4,7 +4,14 @@
import { beforeAllContracts, deploy } from '../support/util';

describe('Update contract metadata', () => {
const messages1 = ['new', 'newDefault', 'failedNew', 'echoAuction', 'revertOrTrap', 'debugLog'];
const messages1 = [
Copy link
Contributor Author

Choose a reason for hiding this comment

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

const timeout = 25000;

export function beforeAllContracts() {
export async function beforeAllContracts() {
Copy link
Contributor Author

@AlexD10S AlexD10S Jul 22, 2025

Choose a reason for hiding this comment

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

We need to map the accounts Alice and Bob

},
'DryRun getOptionNone': {
1: '<code>null</code>',
},
'DryRun getResultError': {
1: "<code>{\n ErrorWithMessage: 'This is the Error Message.',\n }</code>",
1: '<code>EmptyError</code>',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -17,13 +14,13 @@ module.exports = {
1: "<code>{\n accountIdValue: '5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM',\n balanceValueMax: '340,282,366,920,938,463,463,374,607,431,768,211,455',\n balanceValueMin: '0',\n hashValue:\n '0x0000000000000000000000000000000000000000000000000000000000000000',\n }</code>",
},
'DryRun getPrimitiveTypes': {
1: "<code>{\n boolValue: true,\n enumWithoutValues: 'A',\n enumWithValues: {\n ThreeValues: [\n '1',\n '2',\n '3',\n ],\n },\n arrayValue: [\n '3',\n '2',\n '1',\n ],\n tupleValue: [\n '7',\n '8',\n ],\n }</code>",
1: "<code>{\n boolValue: true,\n enumWithoutValues: 'A',\n enumWithValues: {\n ThreeValues: [\n '1',\n '2',\n '3',\n ],\n },\n arrayValue: [\n '3',\n '2',\n '1',\n ],\n tupleValue: [\n '7',\n '8',\n ],\n tupleTripletValue: [\n '-123',\n '0',\n '123',\n ],\n }</code>",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

1 participant