Merge pull request #4472 from AE-0h/master

updated v4-periphery to v4-template in workspaces module
pull/5370/head
yann300 10 months ago committed by GitHub
commit 540831bcc8
  1. 14
      apps/remix-ide-e2e/src/tests/workspace_git.test.ts
  2. 2
      apps/remix-ide/src/app/tabs/locales/en/filePanel.json
  3. 4
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
  4. 2
      libs/remix-ui/workspace/src/lib/types/index.ts
  5. 6
      libs/remix-ui/workspace/src/lib/utils/constants.ts

@ -370,25 +370,23 @@ module.exports = {
// GIT WORKSPACE E2E STARTS // GIT WORKSPACE E2E STARTS
'Should create a git workspace (uniswapV4Periphery) #group4': function (browser: NightwatchBrowser) { 'Should create a git workspace (uniswapV4Template) #group4': function (browser: NightwatchBrowser) {
browser browser
.click('*[data-id="workspacesMenuDropdown"]') .click('*[data-id="workspacesMenuDropdown"]')
.click('*[data-id="workspacecreate"]') .click('*[data-id="workspacecreate"]')
.waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]')
.waitForElementVisible('[data-id="fileSystemModalDialogModalFooter-react"] > button') .waitForElementVisible('[data-id="fileSystemModalDialogModalFooter-react"] > button')
.click('select[id="wstemplate"]') .click('select[id="wstemplate"]')
.click('select[id="wstemplate"] option[value=uniswapV4Periphery]') .click('select[id="wstemplate"] option[value=uniswapV4Template]')
.waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok')
.execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() }) .execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() })
.pause(100) .pause(100)
.waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts"]') .waitForElementVisible('*[data-id="treeViewLitreeViewItemsrc"]')
.openFile('contracts') .openFile('src')
.openFile('contracts/hooks') .openFile('src/Counter.sol')
.openFile('contracts/hooks/examples')
.openFile('contracts/hooks/examples/FullRange.sol')
.pause(1000) .pause(1000)
.getEditorValue((content) => { .getEditorValue((content) => {
browser.assert.ok(content.indexOf(`contract FullRange is BaseHook`) !== -1, browser.assert.ok(content.indexOf(`contract Counter is BaseHook {`) !== -1,
'Incorrect content') 'Incorrect content')
}) })
}, },

@ -113,7 +113,7 @@
"filePanel.hashchecker": "Hash Checker", "filePanel.hashchecker": "Hash Checker",
"filePanel.rln": "Rate-Limiting Nullifier", "filePanel.rln": "Rate-Limiting Nullifier",
"filePanel.breakthroughLabsUniswapv4Hooks": "Breakthrough-Labs Hooks", "filePanel.breakthroughLabsUniswapv4Hooks": "Breakthrough-Labs Hooks",
"filePanel.uniswapV4Periphery": "v4 Periphery", "filePanel.uniswapV4Template": "v4 Template",
"filePanel.uniswapV4HookBookMultiSigSwapHook": "HookBook MultiSigSwapHook", "filePanel.uniswapV4HookBookMultiSigSwapHook": "HookBook MultiSigSwapHook",
"filePanel.transparent": "Transparent", "filePanel.transparent": "Transparent",
"filePanel.initGitRepoTitle": "Check option to initialize workspace as a new git repository", "filePanel.initGitRepoTitle": "Check option to initialize workspace as a new git repository",

@ -791,8 +791,8 @@ export function Workspace() {
</option> </option>
</optgroup> </optgroup>
<optgroup style={{fontSize: 'medium'}} label="Uniswap V4"> <optgroup style={{fontSize: 'medium'}} label="Uniswap V4">
<option style={{fontSize: 'small'}} value="uniswapV4Periphery"> <option style={{fontSize: 'small'}} value="uniswapV4Template">
{intl.formatMessage({id: 'filePanel.uniswapV4Periphery'})} {intl.formatMessage({id: 'filePanel.uniswapV4Template'})}
</option> </option>
<option style={{fontSize: 'small'}} value="breakthroughLabsUniswapv4Hooks"> <option style={{fontSize: 'small'}} value="breakthroughLabsUniswapv4Hooks">
{intl.formatMessage({id: 'filePanel.breakthroughLabsUniswapv4Hooks'})} {intl.formatMessage({id: 'filePanel.breakthroughLabsUniswapv4Hooks'})}

@ -19,7 +19,7 @@ export interface JSONStandardInput {
} }
} }
export type MenuItems = action[] export type MenuItems = action[]
export type WorkspaceTemplate = 'gist-template' | 'code-template' | 'remixDefault' | 'blank' | 'ozerc20' | 'zeroxErc20' | 'ozerc721' | 'playground' | 'semaphore' | 'hashchecker' | 'rln' | 'breakthroughLabsUniswapv4Hooks' | 'uniswapV4Periphery' | 'uniswapV4HookBookMultiSigSwapHook' export type WorkspaceTemplate = 'gist-template' | 'code-template' | 'remixDefault' | 'blank' | 'ozerc20' | 'zeroxErc20' | 'ozerc721' | 'playground' | 'semaphore' | 'hashchecker' | 'rln' | 'breakthroughLabsUniswapv4Hooks' | 'uniswapV4Template' | 'uniswapV4HookBookMultiSigSwapHook'
export interface WorkspaceProps { export interface WorkspaceProps {
plugin: FilePanelType plugin: FilePanelType
} }

@ -87,7 +87,7 @@ export const TEMPLATE_NAMES = {
'hashchecker': 'Hash Checker', 'hashchecker': 'Hash Checker',
'rln': 'Rate-Limiting Nullifier', 'rln': 'Rate-Limiting Nullifier',
'breakthroughLabsUniswapv4Hooks': 'Breakthrough-Labs Uniswapv4Hooks', 'breakthroughLabsUniswapv4Hooks': 'Breakthrough-Labs Uniswapv4Hooks',
'uniswapV4Periphery': 'Uniswap v4 Periphery', 'uniswapV4Template': 'Uniswap v4 Template',
'uniswapV4HookBookMultiSigSwapHook': 'Uniswap V4 HookBook MultiSigSwapHook', 'uniswapV4HookBookMultiSigSwapHook': 'Uniswap V4 HookBook MultiSigSwapHook',
} }
@ -97,9 +97,9 @@ export const TEMPLATE_METADATA: Record<string, TemplateType> = {
url: 'https://github.com/Breakthrough-Labs/Uniswapv4Hooks', url: 'https://github.com/Breakthrough-Labs/Uniswapv4Hooks',
branch: 'foundry_pure' branch: 'foundry_pure'
}, },
'uniswapV4Periphery': { 'uniswapV4Template': {
type: 'git', type: 'git',
url: 'https://github.com/Uniswap/v4-periphery', url: 'https://github.com/Breakthrough-Labs/v4-template',
branch: 'main' branch: 'main'
}, },
'uniswapV4HookBookMultiSigSwapHook': { 'uniswapV4HookBookMultiSigSwapHook': {

Loading…
Cancel
Save