Merge branch 'desktopmerge' of https://github.com/ethereum/remix-project into desktopoffline

pull/5370/head
filip mertens 1 year ago
commit 7682dadafb
  1. 2
      apps/remix-ide/src/app.js
  2. 2
      apps/remix-ide/src/app/files/dgitProvider.ts
  3. 2
      apps/remix-ide/src/app/files/fileManager.ts
  4. 2
      apps/remix-ide/src/app/panels/file-panel.js
  5. 2
      apps/remix-ide/src/app/panels/terminal.js
  6. 2
      apps/remix-ide/src/app/plugins/config.ts
  7. 2
      apps/remix-ide/src/app/plugins/parser/services/code-parser-antlr-service.ts
  8. 2
      apps/remix-ide/src/app/plugins/parser/services/code-parser-imports.ts
  9. 4
      apps/remix-ide/src/app/plugins/remixd-handle.tsx
  10. 2
      apps/remix-ide/src/app/tabs/analysis-tab.js
  11. 2
      apps/remix-ide/src/app/tabs/locale-module.js
  12. 2
      apps/remix-ide/src/app/tabs/settings-tab.tsx
  13. 2
      apps/remix-ide/src/app/tabs/theme-module.js
  14. 2
      apps/remix-ide/src/app/udapp/make-udapp.js
  15. 2
      apps/remix-ide/src/index.tsx
  16. 2
      apps/remix-ide/src/remixAppManager.js
  17. 8
      libs/remix-lib/src/execution/txRunnerWeb3.ts
  18. 1
      libs/remix-lib/src/index.ts
  19. 2
      libs/remix-lib/src/registry.ts
  20. 6
      libs/remix-simulator/src/methods/transactions.ts
  21. 2
      libs/remix-ui/search/src/lib/components/results/SearchHelper.ts
  22. 2
      libs/remix-ui/static-analyser/src/staticanalyser.d.ts
  23. 4
      libs/remix-ui/terminal/src/lib/components/Context.tsx
  24. 2
      libs/remix-ui/workspace/src/lib/actions/index.ts
  25. 34
      libs/remix-ui/workspace/src/lib/components/workspace-hamburger-item.tsx
  26. 2
      libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx

@ -22,7 +22,7 @@ import {WalkthroughService} from './walkthroughService'
import {OffsetToLineColumnConverter, CompilerMetadata, CompilerArtefacts, FetchAndCompile, CompilerImports, GistHandler} from '@remix-project/core-plugin' import {OffsetToLineColumnConverter, CompilerMetadata, CompilerArtefacts, FetchAndCompile, CompilerImports, GistHandler} from '@remix-project/core-plugin'
import Registry from './app/state/registry' import {Registry} from '@remix-project/remix-lib'
import {ConfigPlugin} from './app/plugins/config' import {ConfigPlugin} from './app/plugins/config'
import {StoragePlugin} from './app/plugins/storage' import {StoragePlugin} from './app/plugins/storage'
import {Layout} from './app/panels/layout' import {Layout} from './app/panels/layout'

@ -14,7 +14,7 @@ import JSZip from 'jszip'
import path from 'path' import path from 'path'
import FormData from 'form-data' import FormData from 'form-data'
import axios from 'axios' import axios from 'axios'
import Registry from '../state/registry' import {Registry} from '@remix-project/remix-lib'
const profile = { const profile = {
name: 'dGitProvider', name: 'dGitProvider',

@ -4,7 +4,7 @@ import { saveAs } from 'file-saver'
import JSZip from 'jszip' import JSZip from 'jszip'
import { Plugin } from '@remixproject/engine' import { Plugin } from '@remixproject/engine'
import * as packageJson from '../../../../../package.json' import * as packageJson from '../../../../../package.json'
import Registry from '../state/registry' import {Registry} from '@remix-project/remix-lib'
import { EventEmitter } from 'events' import { EventEmitter } from 'events'
import { fileChangedToastMsg, recursivePasteToastMsg, storageFullMessage } from '@remix-ui/helper' import { fileChangedToastMsg, recursivePasteToastMsg, storageFullMessage } from '@remix-ui/helper'
import helper from '../../lib/helper.js' import helper from '../../lib/helper.js'

@ -3,7 +3,7 @@ import { ViewPlugin } from '@remixproject/engine-web'
import * as packageJson from '../../../../../package.json' import * as packageJson from '../../../../../package.json'
import React from 'react' // eslint-disable-line import React from 'react' // eslint-disable-line
import { FileSystemProvider } from '@remix-ui/workspace' // eslint-disable-line import { FileSystemProvider } from '@remix-ui/workspace' // eslint-disable-line
import Registry from '../state/registry' import {Registry} from '@remix-project/remix-lib'
import { RemixdHandle } from '../plugins/remixd-handle' import { RemixdHandle } from '../plugins/remixd-handle'
const { HardhatHandle } = require('../files/hardhat-handle.js') const { HardhatHandle } = require('../files/hardhat-handle.js')
const { FoundryHandle } = require('../files/foundry-handle.js') const { FoundryHandle } = require('../files/foundry-handle.js')

@ -3,7 +3,7 @@ import React from 'react' // eslint-disable-line
import { RemixUiTerminal } from '@remix-ui/terminal' // eslint-disable-line import { RemixUiTerminal } from '@remix-ui/terminal' // eslint-disable-line
import { Plugin } from '@remixproject/engine' import { Plugin } from '@remixproject/engine'
import * as packageJson from '../../../../../package.json' import * as packageJson from '../../../../../package.json'
import Registry from '../state/registry' import {Registry} from '@remix-project/remix-lib'
import { PluginViewWrapper } from '@remix-ui/helper' import { PluginViewWrapper } from '@remix-ui/helper'
import vm from 'vm' import vm from 'vm'
const EventManager = require('../../lib/events') const EventManager = require('../../lib/events')

@ -1,6 +1,6 @@
import { Plugin } from '@remixproject/engine' import { Plugin } from '@remixproject/engine'
import { QueryParams } from '@remix-project/remix-lib' import { QueryParams } from '@remix-project/remix-lib'
import Registry from '../state/registry' import {Registry} from '@remix-project/remix-lib'
const profile = { const profile = {
name: 'config', name: 'config',

@ -4,7 +4,7 @@ import { AstNode } from "@remix-project/remix-solidity"
import { CodeParser } from "../code-parser" import { CodeParser } from "../code-parser"
import { antlr } from '../types' import { antlr } from '../types'
import { pathToFileURL } from 'url' import { pathToFileURL } from 'url'
import Registry from "../../../state/registry" import {Registry} from '@remix-project/remix-lib'
const SolidityParser = (window as any).SolidityParser = (window as any).SolidityParser || [] const SolidityParser = (window as any).SolidityParser = (window as any).SolidityParser || []

@ -1,5 +1,5 @@
'use strict' 'use strict'
import Registry from "../../../state/registry"; import {Registry} from '@remix-project/remix-lib'
import { CodeParser } from "../code-parser"; import { CodeParser } from "../code-parser";
export type CodeParserImportsData = { export type CodeParserImportsData = {

@ -6,7 +6,7 @@ import * as packageJson from '../../../../../package.json'
import {version as remixdVersion} from '../../../../../libs/remixd/package.json' import {version as remixdVersion} from '../../../../../libs/remixd/package.json'
import {PluginManager} from '@remixproject/engine' import {PluginManager} from '@remixproject/engine'
import {AppModal, AlertModal, appPlatformTypes} from '@remix-ui/app' import {AppModal, AlertModal, appPlatformTypes} from '@remix-ui/app'
import Registry from '../state/registry' import {Registry} from '@remix-project/remix-lib'
const LOCALHOST = ' - connect to localhost - ' const LOCALHOST = ' - connect to localhost - '
@ -112,7 +112,7 @@ export class RemixdHandle extends WebsocketPlugin {
} }
if (this.localhostProvider.isConnected()) { if (this.localhostProvider.isConnected()) {
this.deactivate() this.deactivate()
} else if (!(Registry.getInstance().get('platform').api.isDektop())) { } else if (!(Registry.getInstance().get('platform').api.isDesktop())) {
// warn the user only if he/she is in the browser context // warn the user only if he/she is in the browser context
const mod: AppModal = { const mod: AppModal = {
id: 'remixdConnect', id: 'remixdConnect',

@ -3,7 +3,7 @@ import { ViewPlugin } from '@remixproject/engine-web'
import { EventEmitter } from 'events' import { EventEmitter } from 'events'
import {RemixUiStaticAnalyser} from '@remix-ui/static-analyser' // eslint-disable-line import {RemixUiStaticAnalyser} from '@remix-ui/static-analyser' // eslint-disable-line
import * as packageJson from '../../../../../package.json' import * as packageJson from '../../../../../package.json'
import Registry from '../state/registry' import {Registry} from '@remix-project/remix-lib'
import { PluginViewWrapper } from '@remix-ui/helper' import { PluginViewWrapper } from '@remix-ui/helper'
var EventManager = require('../../lib/events') var EventManager = require('../../lib/events')

@ -2,7 +2,7 @@ import { Plugin } from '@remixproject/engine'
import { EventEmitter } from 'events' import { EventEmitter } from 'events'
import { QueryParams } from '@remix-project/remix-lib' import { QueryParams } from '@remix-project/remix-lib'
import * as packageJson from '../../../../../package.json' import * as packageJson from '../../../../../package.json'
import Registry from '../state/registry' import {Registry} from '@remix-project/remix-lib'
import enJson from './locales/en' import enJson from './locales/en'
import zhJson from './locales/zh' import zhJson from './locales/zh'
import esJson from './locales/es' import esJson from './locales/es'

@ -3,7 +3,7 @@ import React from 'react' // eslint-disable-line
import {ViewPlugin} from '@remixproject/engine-web' import {ViewPlugin} from '@remixproject/engine-web'
import * as packageJson from '../../../../../package.json' import * as packageJson from '../../../../../package.json'
import {RemixUiSettings} from '@remix-ui/settings' //eslint-disable-line import {RemixUiSettings} from '@remix-ui/settings' //eslint-disable-line
import Registry from '../state/registry' import {Registry} from '@remix-project/remix-lib'
import {PluginViewWrapper} from '@remix-ui/helper' import {PluginViewWrapper} from '@remix-ui/helper'
const profile = { const profile = {

@ -2,7 +2,7 @@ import { Plugin } from '@remixproject/engine'
import { EventEmitter } from 'events' import { EventEmitter } from 'events'
import { QueryParams } from '@remix-project/remix-lib' import { QueryParams } from '@remix-project/remix-lib'
import * as packageJson from '../../../../../package.json' import * as packageJson from '../../../../../package.json'
import Registry from '../state/registry' import {Registry} from '@remix-project/remix-lib'
const isElectron = require('is-electron') const isElectron = require('is-electron')
const _paq = window._paq = window._paq || [] const _paq = window._paq = window._paq || []

@ -1,4 +1,4 @@
import Registry from '../state/registry' import {Registry} from '@remix-project/remix-lib'
var remixLib = require('@remix-project/remix-lib') var remixLib = require('@remix-project/remix-lib')
var EventsDecoder = remixLib.execution.EventsDecoder var EventsDecoder = remixLib.execution.EventsDecoder

@ -5,7 +5,7 @@ import './index.css'
import {ThemeModule} from './app/tabs/theme-module' import {ThemeModule} from './app/tabs/theme-module'
import {Preload} from './app/components/preload' import {Preload} from './app/components/preload'
import Config from './config' import Config from './config'
import Registry from './app/state/registry' import {Registry} from '@remix-project/remix-lib'
import {Storage} from '@remix-project/remix-lib' import {Storage} from '@remix-project/remix-lib'
;(async function () { ;(async function () {
try { try {

@ -2,7 +2,7 @@ import {PluginManager} from '@remixproject/engine'
import {EventEmitter} from 'events' import {EventEmitter} from 'events'
import {QueryParams} from '@remix-project/remix-lib' import {QueryParams} from '@remix-project/remix-lib'
import {IframePlugin} from '@remixproject/engine-web' import {IframePlugin} from '@remixproject/engine-web'
import Registry from './app/state/registry' import {Registry} from '@remix-project/remix-lib'
const _paq = (window._paq = window._paq || []) const _paq = (window._paq = window._paq || [])

@ -2,7 +2,7 @@
import { EventManager } from '../eventManager' import { EventManager } from '../eventManager'
import type { Transaction as InternalTransaction } from './txRunner' import type { Transaction as InternalTransaction } from './txRunner'
import Web3 from 'web3' import Web3 from 'web3'
import {toBigInt} from 'web3-utils' import {toBigInt, toHex} from 'web3-utils'
export class TxRunnerWeb3 { export class TxRunnerWeb3 {
event event
@ -27,11 +27,11 @@ export class TxRunnerWeb3 {
} }
if (txFee) { if (txFee) {
if (txFee.baseFeePerGas) { if (txFee.baseFeePerGas) {
tx.maxPriorityFeePerGas = this.getWeb3().utils.toHex(this.getWeb3().utils.toWei(txFee.maxPriorityFee, 'gwei')) tx.maxPriorityFeePerGas = toHex(BigInt(this.getWeb3().utils.toWei(txFee.maxPriorityFee, 'gwei')))
tx.maxFeePerGas = this.getWeb3().utils.toHex(this.getWeb3().utils.toWei(txFee.maxFee, 'gwei')) tx.maxFeePerGas = toHex(BigInt(this.getWeb3().utils.toWei(txFee.maxFee, 'gwei')))
tx.type = '0x2' tx.type = '0x2'
} else { } else {
tx.gasPrice = this.getWeb3().utils.toHex(this.getWeb3().utils.toWei(txFee.gasPrice, 'gwei')) tx.gasPrice = toHex(BigInt(this.getWeb3().utils.toWei(txFee.gasPrice, 'gwei')))
tx.type = '0x1' tx.type = '0x1'
} }
} }

@ -20,6 +20,7 @@ export { ConsoleLogs } from './helpers/hhconsoleSigs'
export { ICompilerApi, ConfigurationSettings } from './types/ICompilerApi' export { ICompilerApi, ConfigurationSettings } from './types/ICompilerApi'
export { QueryParams } from './query-params' export { QueryParams } from './query-params'
export { VMexecutionResult } from './execution/txRunnerVM' export { VMexecutionResult } from './execution/txRunnerVM'
export { Registry } from './registry'
const helpers = { const helpers = {
ui: uiHelper, ui: uiHelper,

@ -3,7 +3,7 @@ type registryEntry = {
name: string name: string
} }
export default class Registry { export class Registry {
private static instance: Registry; private static instance: Registry;
private state: any private state: any

@ -268,7 +268,7 @@ export class Transactions {
blockHash: '0x' + txBlock.hash().toString('hex'), blockHash: '0x' + txBlock.hash().toString('hex'),
blockNumber: bigIntToHex(txBlock.header.number), blockNumber: bigIntToHex(txBlock.header.number),
from: receipt.from, from: receipt.from,
gas: toHex(receipt.gas), gas: toHex(BigInt(receipt.gas)),
chainId: '0xd05', chainId: '0xd05',
// 'gasPrice': '2000000000000', // 0x123 // 'gasPrice': '2000000000000', // 0x123
gasPrice: '0x4a817c800', // 20000000000 gasPrice: '0x4a817c800', // 20000000000
@ -317,7 +317,7 @@ export class Transactions {
blockHash: '0x' + txBlock.hash().toString('hex'), blockHash: '0x' + txBlock.hash().toString('hex'),
blockNumber: bigIntToHex(txBlock.header.number), blockNumber: bigIntToHex(txBlock.header.number),
from: receipt.from, from: receipt.from,
gas: toHex(receipt.gas), gas: toHex(BigInt(receipt.gas)),
chainId: '0xd05', chainId: '0xd05',
// 'gasPrice': '2000000000000', // 0x123 // 'gasPrice': '2000000000000', // 0x123
gasPrice: '0x4a817c800', // 20000000000 gasPrice: '0x4a817c800', // 20000000000
@ -362,7 +362,7 @@ export class Transactions {
blockHash: '0x' + txBlock.hash().toString('hex'), blockHash: '0x' + txBlock.hash().toString('hex'),
blockNumber: bigIntToHex(txBlock.header.number), blockNumber: bigIntToHex(txBlock.header.number),
from: receipt.from, from: receipt.from,
gas: toHex(receipt.gas), gas: toHex(BigInt(receipt.gas)),
// 'gasPrice': '2000000000000', // 0x123 // 'gasPrice': '2000000000000', // 0x123
chainId: '0xd05', chainId: '0xd05',
gasPrice: '0x4a817c800', // 20000000000 gasPrice: '0x4a817c800', // 20000000000

@ -1,6 +1,6 @@
import { EOL } from 'os' import { EOL } from 'os'
import { SearchResultLineLine } from '../../types' import { SearchResultLineLine } from '../../types'
import Registry from 'apps/remix-ide/src/app/state/registry' import {Registry} from '@remix-project/remix-lib'
export const getDirectory = async (dir: string, plugin: any) => { export const getDirectory = async (dir: string, plugin: any) => {

@ -2,7 +2,7 @@ import { CompilationResult, SourceWithTarget } from '@remixproject/plugin-api'
import { ViewPlugin } from '@remixproject/engine-web'; import { ViewPlugin } from '@remixproject/engine-web';
import { EventEmitter } from 'events'; import { EventEmitter } from 'events';
import Registry from '../state/registry'; import {Registry} from '@remix-project/remix-lib';
export declare class AnalysisTab extends ViewPlugin { export declare class AnalysisTab extends ViewPlugin {
event: EventManager; event: EventManager;
events: EventEmitter; events: EventEmitter;

@ -47,7 +47,7 @@ const Context = ({opts, provider}: {opts; provider: string}) => {
<div> <div>
<span> <span>
<span className="remix_ui_terminal_tx"> <span className="remix_ui_terminal_tx">
[block:{block.toString()} txIndex:{i.toString()}] [block:{block.toString()} txIndex:{i ? i.toString() : '-'}]
</span> </span>
<div className="remix_ui_terminal_txItem"> <div className="remix_ui_terminal_txItem">
<span className="remix_ui_terminal_txItemTitle">from:</span> {from} <span className="remix_ui_terminal_txItemTitle">from:</span> {from}
@ -76,7 +76,7 @@ const Context = ({opts, provider}: {opts; provider: string}) => {
<div> <div>
<span> <span>
<span className="remix_ui_terminal_tx"> <span className="remix_ui_terminal_tx">
[block:{block.toString()} txIndex:{i.toString()}] [block:{block.toString()} txIndex:{i ? i.toString() : '-'}]
</span> </span>
<div className="remix_ui_terminal_txItem"> <div className="remix_ui_terminal_txItem">
<span className="remix_ui_terminal_txItemTitle">from:</span> {from} <span className="remix_ui_terminal_txItemTitle">from:</span> {from}

@ -9,7 +9,7 @@ import { QueryParams } from '@remix-project/remix-lib'
import { fetchContractFromEtherscan } from '@remix-project/core-plugin' // eslint-disable-line import { fetchContractFromEtherscan } from '@remix-project/core-plugin' // eslint-disable-line
import JSZip from 'jszip' import JSZip from 'jszip'
import { Actions, FileTree } from '../types' import { Actions, FileTree } from '../types'
import Registry from 'apps/remix-ide/src/app/state/registry' import {Registry} from '@remix-project/remix-lib'
export * from './events' export * from './events'
export * from './workspace' export * from './workspace'

@ -20,23 +20,23 @@ export function HamburgerMenuItem(props: HamburgerMenuItemProps) {
return ( return (
<> <>
{props.platforms.includes(platform)?( {props.platforms.includes(platform)?(
<Dropdown.Item> <Dropdown.Item>
<CustomTooltip placement="right" tooltipId={uid + 'Tooltip'} tooltipClasses="text-nowrap" tooltipText={<FormattedMessage id={'filePanel.workspace.' + props.kind} />}> <CustomTooltip placement="right" tooltipId={uid + 'Tooltip'} tooltipClasses="text-nowrap" tooltipText={<FormattedMessage id={'filePanel.workspace.' + props.kind} />}>
<div <div
data-id={uid} data-id={uid}
key={uid + '-fe-ws'} key={uid + '-fe-ws'}
onClick={() => { onClick={() => {
props.actionOnClick() props.actionOnClick()
_paq.push(['trackEvent', 'fileExplorer', 'workspaceMenu', uid]) _paq.push(['trackEvent', 'fileExplorer', 'workspaceMenu', uid])
}} }}
> >
<span hidden={hideOption} id={uid} data-id={uid} className={props.fa + ' pl-2'} style={{width: '1.4rem'}}></span> <span hidden={hideOption} id={uid} data-id={uid} className={props.fa + ' pl-2'} style={{width: '1.4rem'}}></span>
<span className="px-2"> <span className="px-2">
<FormattedMessage id={'filePanel.' + props.kind} /> <FormattedMessage id={'filePanel.' + props.kind} />
</span> </span>
</div> </div>
</CustomTooltip> </CustomTooltip>
</Dropdown.Item>):null} </Dropdown.Item>):null}
</> </>
) )
} }

@ -1,4 +1,4 @@
import { appPlatformTypes } from 'libs/remix-ui/app/src/lib/remix-app/context/context' import { appPlatformTypes } from '@remix-ui/app'
import React from 'react' import React from 'react'
import {Dropdown} from 'react-bootstrap' import {Dropdown} from 'react-bootstrap'
import {HamburgerMenuItem, HamburgerSubMenuItem} from './workspace-hamburger-item' import {HamburgerMenuItem, HamburgerSubMenuItem} from './workspace-hamburger-item'

Loading…
Cancel
Save