diff --git a/README.md b/README.md index a813aa8..0d3af1c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Interactive Ethereum protocol explorer — hands on. Explore, visualize and understand Ethereum protocol changes (EIPs) by interacting with real library code running directly in the browser. -> **Note:** This project is under active development. Contributions and feedback are very welcome! +> **Status: Beta** — The project is fully functional, but the APIs of reusable components (E-Components, UI components) have not fully stabilized yet. Contributions are very welcome — expect some manual back-and-forth during review until the component interfaces settle. ## Quick Start diff --git a/cypress/e2e/eip7594.cy.ts b/cypress/e2e/eip7594.cy.ts deleted file mode 100644 index ce38f7d..0000000 --- a/cypress/e2e/eip7594.cy.ts +++ /dev/null @@ -1,36 +0,0 @@ -describe('EIP-7594/PeerDAS Tests', () => { - it('initialization', () => { - cy.visit('/eip-7594-peerdas-data-availability-sampling') - - // Basic component display - cy.contains('h1', 'Feel Your Protocol') - cy.contains('h3', 'Peer Data Availability Sampling') - - // Values from inital example - cy.get('#eip-7594-c textarea', { timeout: 10000 }).should( - 'contain.value', - '0a0001fbfc0084bd8494e56454b36510b0adc8aaa1b60', - ) - - // Select different example - cy.get('#eip-7594-c .e-select').click() - cy.get('#eip-7594-c [role="option"]').eq(1).click() - cy.get('#eip-7594-c textarea', { timeout: 10000 }).should( - 'contain.value', - '00000000000000000000000000000000000000000', - ) - - cy.get('.run-button').click() - let text = - '0xa522f1be9ec4a02fcb6998b10306e94331311ac29bcaaae357d8d7fbc087a04b5b66dd7fa84cbebabcc45202b8fee57f' - cy.get('#eip-7594-c .4844-7594-box') - .find('table tr:first td:nth-child(2)') - .should('contain.text', text, { timeout: 25000 }) - text = - '0x8bd1e6e38b2b54735c6f0102022510cf2abc2e4c6c5a437cba9831662c9f112e61e2a6ced8ce63b3de18cb9cc99ae21e' - cy.get('#eip-7594-c .4844-box').find('p').should('contain.text', text, { timeout: 25000 }) - text = - '0x8d90ed38068f3561132d9264db8c8dfb5237af24a6e28c3d4e72d3ad8d51d97be5733ddc382c9718822cb29ccc26364e' - cy.get('#eip-7594-c .7594-box').find('p:first').should('contain.text', text, { timeout: 25000 }) - }) -}) diff --git a/cypress/e2e/eip7883_Precompile_R.cy.ts b/cypress/e2e/eip7883_Precompile_R.cy.ts deleted file mode 100644 index 018616e..0000000 --- a/cypress/e2e/eip7883_Precompile_R.cy.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * EIP-7823 is the representative EIP for the precompile component tests. - */ -describe('EIP-7823/Precompile Component Tests', () => { - let bytesLengthsExpected = - '0000000000000000000000000000000000000000000000000000000000000001' + - '0000000000000000000000000000000000000000000000000000000000000001' + - '0000000000000000000000000000000000000000000000000000000000000001' - const bytesValuesExpected = '030302' - let bytesExpected = bytesLengthsExpected + bytesValuesExpected - - it('initialization', () => { - cy.visit('/eip-7883-modexp-gas-cost-increase') - - cy.contains('h1', 'Feel Your Protocol') - cy.contains('h3', 'ModExp') - - cy.get('#eip-7883-c textarea', { timeout: 10000 }).should('have.value', bytesExpected) - cy.get('#eip-7883-c input').eq(0).should('have.value', '03') - cy.get('#eip-7883-c input').eq(1).should('have.value', '03') - cy.get('#eip-7883-c input').eq(2).should('have.value', '02') - - cy.get('.pre-hardfork').find('p').eq(0).should('include.text', '200 Gas') - cy.get('.post-hardfork').find('p').eq(0).should('include.text', '500 Gas') - }) - - it('values -> data', () => { - cy.visit('/eip-7883-modexp-gas-cost-increase') - - // Simple initial case - bytesExpected = bytesLengthsExpected + '040402' - cy.get('#eip-7883-c').within(() => { - cy.get('input').eq(0).clear() - cy.get('input').eq(1).clear() - cy.get('input').eq(2).clear() - cy.get('input').eq(0).type('04') - cy.get('input').eq(1).type('04') - cy.get('input').eq(2).type('02') - }) - cy.get('textarea').should('have.value', bytesExpected) - - // Slightly modified values case - bytesLengthsExpected = - '0000000000000000000000000000000000000000000000000000000000000002' + - '0000000000000000000000000000000000000000000000000000000000000002' + - '0000000000000000000000000000000000000000000000000000000000000002' - bytesExpected = bytesLengthsExpected + '040404040202' - cy.get('#eip-7883-c').within(() => { - cy.get('input').eq(0).type('04') - cy.get('input').eq(1).type('04') - cy.get('input').eq(2).type('02') - }) - cy.get('textarea').should('have.value', bytesExpected) - - cy.get('#eip-7883-c').within(() => { - // Gas changing example - cy.get('input').eq(0).type('040404040404040404040404040404040404040404') - cy.get('input').eq(1).type('040404040404040404040404040404040404040404') - cy.get('input').eq(2).type('02') - - cy.get('.pre-hardfork').find('p').eq(0).should('include.text', '534 Gas') - cy.get('.post-hardfork').find('p').eq(0).should('include.text', '2848 Gas') - }) - }) - - it('data -> values, URL sharing, EIP button', () => { - cy.visit('/eip-7883-modexp-gas-cost-increase') - - cy.get('#eip-7883-c').within(() => { - cy.window().then((win) => { - cy.stub(win, 'open').callsFake((url) => { - win.location.href = url // Redirect within the same tab - }) - }) - // data -> values - cy.get('textarea').clear() - cy.get('textarea').type(bytesExpected) // '040404040202' - cy.get('input').eq(0).should('have.value', '0404') - cy.get('input').eq(1).should('have.value', '0404') - cy.get('input').eq(2).should('have.value', '0202') - - // URL sharing - cy.get('.share-url-button').click() - cy.url().should('include', 'b=0404') - cy.url().should('include', 'e=0404') - cy.url().should('include', 'm=0202') - - cy.get('textarea').should('have.value', bytesExpected) - cy.get('input').eq(0).should('have.value', '0404') - cy.get('input').eq(1).should('have.value', '0404') - cy.get('input').eq(2).should('have.value', '0202') - - // examples - cy.get('.e-select').click() - cy.contains('[role="option"]', 'Simple').click() - cy.get('input').eq(0).should('have.value', '03') - cy.get('input').eq(1).should('have.value', '03') - cy.get('input').eq(2).should('have.value', '02') - - // EIP button - cy.get('.visit-exploration-button').invoke('removeAttr', 'target').click() - cy.origin('https://eips.ethereum.org', () => { - cy.url().should('eq', 'https://eips.ethereum.org/EIPS/eip-7883') - }) - }) - }) -}) diff --git a/cypress/e2e/eip7951.cy.ts b/cypress/e2e/eip7951.cy.ts deleted file mode 100644 index 342baf7..0000000 --- a/cypress/e2e/eip7951.cy.ts +++ /dev/null @@ -1,31 +0,0 @@ -describe('EIP-7951/secp256r1 Precompile Support', () => { - it('initialization', () => { - cy.visit('/eip-7951-secp256r1-precompile') - - // Basic component display - cy.contains('h1', 'Feel Your Protocol') - cy.contains('h3', 'secp256r1 Precompile Support') - - // Values from inital example - cy.get('#eip-7951-c textarea', { timeout: 10000 }).should( - 'contain.value', - '4dfb1eae8ed41e188b8a44a1109d982d01fc24bb85a933', - ) - const val = '3b91fedfb22f40063245c621036a040c159f02ae02e6d450ff9b53235e9232c4' - cy.get('#eip-7951-c input').eq(2).should('have.value', val) - - cy.get('.post-hardfork').find('p').eq(0).should('include.text', '6900 Gas') - - // Select different example - cy.get('#eip-7951-c .e-select').click() - cy.contains('[role="option"]', 'Invalid (Wycheproof), r value too large').click() - cy.get('#eip-7951-c textarea', { timeout: 10000 }).should( - 'contain.value', - '532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25', - ) - cy.get('#eip-7951-c input') - .eq(2) - .should('have.value', 'ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc63254e') - cy.get('.post-hardfork').find('p').eq(0).should('include.text', '6900 Gas') - }) -}) diff --git a/cypress/e2e/explorations.cy.ts b/cypress/e2e/explorations.cy.ts new file mode 100644 index 0000000..7d5a6a3 --- /dev/null +++ b/cypress/e2e/explorations.cy.ts @@ -0,0 +1,61 @@ +describe('EIP-7883 ModExp', () => { + it('loads and displays exploration content', () => { + cy.visit('/eip-7883-modexp-gas-cost-increase') + cy.contains('h1', 'Feel Your Protocol') + cy.contains('h3', 'ModExp') + cy.get('#eip-7883-c', { timeout: 10000 }).should('exist') + }) + + it('loads default example with inputs', () => { + cy.visit('/eip-7883-modexp-gas-cost-increase') + cy.get('#eip-7883-c textarea', { timeout: 10000 }).should('not.have.value', '') + cy.get('#eip-7883-c input').should('have.length.gte', 3) + }) + + it('example selector shows available options', () => { + cy.visit('/eip-7883-modexp-gas-cost-increase') + cy.get('#eip-7883-c .e-select', { timeout: 10000 }).click() + cy.get('[role="option"]').should('have.length.gte', 2) + }) +}) + +describe('EIP-7594 PeerDAS', () => { + it('loads and displays exploration content', () => { + cy.visit('/eip-7594-peerdas-data-availability-sampling') + cy.contains('h1', 'Feel Your Protocol') + cy.contains('h3', 'Peer Data Availability Sampling') + cy.get('#eip-7594-c', { timeout: 10000 }).should('exist') + }) + + it('loads default example with blob data', () => { + cy.visit('/eip-7594-peerdas-data-availability-sampling') + cy.get('#eip-7594-c textarea', { timeout: 10000 }).should('not.have.value', '') + }) + + it('example selector shows available options', () => { + cy.visit('/eip-7594-peerdas-data-availability-sampling') + cy.get('#eip-7594-c .e-select', { timeout: 10000 }).click() + cy.get('[role="option"]').should('have.length.gte', 2) + }) +}) + +describe('EIP-7951 secp256r1', () => { + it('loads and displays exploration content', () => { + cy.visit('/eip-7951-secp256r1-precompile') + cy.contains('h1', 'Feel Your Protocol') + cy.contains('h3', 'secp256r1 Precompile Support') + cy.get('#eip-7951-c', { timeout: 10000 }).should('exist') + }) + + it('loads default example with inputs', () => { + cy.visit('/eip-7951-secp256r1-precompile') + cy.get('#eip-7951-c textarea', { timeout: 10000 }).should('not.have.value', '') + cy.get('#eip-7951-c input').should('have.length.gte', 5) + }) + + it('example selector shows available options', () => { + cy.visit('/eip-7951-secp256r1-precompile') + cy.get('#eip-7951-c .e-select', { timeout: 10000 }).click() + cy.get('[role="option"]').should('have.length.gte', 2) + }) +}) diff --git a/cypress/e2e/sites.cy.ts b/cypress/e2e/sites.cy.ts index 35d3e6b..c757117 100644 --- a/cypress/e2e/sites.cy.ts +++ b/cypress/e2e/sites.cy.ts @@ -1,14 +1,14 @@ describe('Home', () => { it('loads and displays topics and explorations', () => { cy.visit('/') - cy.contains('h2', 'Fusaka').should('be.visible') + cy.contains('h2', 'Scaling').should('be.visible') cy.get('.exploration-c').should('have.length.gte', 1) }) it('topic link navigates to topic page', () => { cy.visit('/') - cy.contains('h2', 'Fusaka').closest('a').click() - cy.url().should('include', '/fusaka') + cy.contains('h2', 'Scaling').closest('a').click() + cy.url().should('include', '/scaling') }) it('exploration card navigates to exploration page', () => { @@ -18,19 +18,17 @@ describe('Home', () => { }) }) -describe('Topic (Fusaka)', () => { - it('loads all exploration widgets', () => { - cy.visit('/fusaka') - cy.get('#eip-7883-c', { timeout: 10000 }).should('exist') +describe('Topic (Scaling)', () => { + it('loads exploration widgets', () => { + cy.visit('/scaling') cy.get('#eip-7594-c', { timeout: 10000 }).should('exist') - cy.get('#eip-7951-c', { timeout: 10000 }).should('exist') }) }) describe('Imprint', () => { it('loads and shows key sections', () => { cy.visit('/imprint') - cy.contains('h3', 'CONTACT') + cy.contains('h3', 'ABOUT') cy.contains('h3', 'ACKNOWLEDGEMENTS') cy.contains('h3', 'DATA') }) diff --git a/dist/docs/404.html b/dist/docs/404.html index 5083a72..5f5ec4e 100644 --- a/dist/docs/404.html +++ b/dist/docs/404.html @@ -9,14 +9,14 @@ - +
- +