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

desktopoffline
filip mertens 1 year ago
commit 3dfc414173
  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 Registry from './app/state/registry'
import {Registry} from '@remix-project/remix-lib'
import {ConfigPlugin} from './app/plugins/config'
import {StoragePlugin} from './app/plugins/storage'
import {Layout} from './app/panels/layout'

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

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

@ -3,7 +3,7 @@ import { ViewPlugin } from '@remixproject/engine-web'
import * as packageJson from '../../../../../package.json'
import React from 'react' // 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'
const { HardhatHandle } = require('../files/hardhat-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 { Plugin } from '@remixproject/engine'
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 vm from 'vm'
const EventManager = require('../../lib/events')

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

@ -4,7 +4,7 @@ import { AstNode } from "@remix-project/remix-solidity"
import { CodeParser } from "../code-parser"
import { antlr } from '../types'
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 || []

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

@ -6,7 +6,7 @@ import * as packageJson from '../../../../../package.json'
import {version as remixdVersion} from '../../../../../libs/remixd/package.json'
import {PluginManager} from '@remixproject/engine'
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 - '
@ -112,7 +112,7 @@ export class RemixdHandle extends WebsocketPlugin {
}
if (this.localhostProvider.isConnected()) {
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
const mod: AppModal = {
id: 'remixdConnect',

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

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

@ -3,7 +3,7 @@ import React from 'react' // eslint-disable-line
import {ViewPlugin} from '@remixproject/engine-web'
import * as packageJson from '../../../../../package.json'
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'
const profile = {

@ -2,7 +2,7 @@ import { Plugin } from '@remixproject/engine'
import { EventEmitter } from 'events'
import { QueryParams } from '@remix-project/remix-lib'
import * as packageJson from '../../../../../package.json'
import Registry from '../state/registry'
import {Registry} from '@remix-project/remix-lib'
const isElectron = require('is-electron')
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 EventsDecoder = remixLib.execution.EventsDecoder

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

@ -2,7 +2,7 @@ import {PluginManager} from '@remixproject/engine'
import {EventEmitter} from 'events'
import {QueryParams} from '@remix-project/remix-lib'
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 || [])

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

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

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

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

@ -1,6 +1,6 @@
import { EOL } from 'os'
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) => {

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

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

@ -20,23 +20,23 @@ export function HamburgerMenuItem(props: HamburgerMenuItemProps) {
return (
<>
{props.platforms.includes(platform)?(
<Dropdown.Item>
<CustomTooltip placement="right" tooltipId={uid + 'Tooltip'} tooltipClasses="text-nowrap" tooltipText={<FormattedMessage id={'filePanel.workspace.' + props.kind} />}>
<div
data-id={uid}
key={uid + '-fe-ws'}
onClick={() => {
props.actionOnClick()
_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 className="px-2">
<FormattedMessage id={'filePanel.' + props.kind} />
</span>
</div>
</CustomTooltip>
</Dropdown.Item>):null}
<Dropdown.Item>
<CustomTooltip placement="right" tooltipId={uid + 'Tooltip'} tooltipClasses="text-nowrap" tooltipText={<FormattedMessage id={'filePanel.workspace.' + props.kind} />}>
<div
data-id={uid}
key={uid + '-fe-ws'}
onClick={() => {
props.actionOnClick()
_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 className="px-2">
<FormattedMessage id={'filePanel.' + props.kind} />
</span>
</div>
</CustomTooltip>
</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 {Dropdown} from 'react-bootstrap'
import {HamburgerMenuItem, HamburgerSubMenuItem} from './workspace-hamburger-item'

Loading…
Cancel
Save