-
Notifications
You must be signed in to change notification settings - Fork 49
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
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. |
@@ -6,13 +6,13 @@ runs: | |||
- name: Download node artifact | |||
uses: actions/download-artifact@v4 | |||
with: | |||
name: substrate-contracts-node | |||
name: ink-node |
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.
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') |
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.
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 = [ |
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.
Updated in the contract mother
https://github.com/use-ink/ink/blob/master/integration-tests/internal/mother/lib.rs
const timeout = 25000; | ||
|
||
export function beforeAllContracts() { | ||
export async function beforeAllContracts() { |
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.
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>', |
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.
@@ -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>", |
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.
As we did in
cargo-contracts
and theink-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.