Merge branch 'master' into pluginupdate

pull/5370/head
bunsenstraat 2 years ago committed by GitHub
commit f1dc7ac9ff
  1. 49
      apps/remix-ide-e2e/src/tests/transactionExecution.test.ts
  2. 1
      apps/remix-ide/src/app/providers/injected-provider.tsx
  3. 4
      apps/remix-ide/src/app/tabs/debugger-tab.js
  4. 6
      apps/remix-ide/src/app/tabs/locales/en/filePanel.json
  5. 7
      apps/remix-ide/src/app/tabs/locales/zh/filePanel.json
  6. 12
      apps/remix-ide/src/assets/css/themes/bootstrap-cyborg.min.css
  7. 2
      apps/remix-ide/src/assets/css/themes/remix-dark_tvx1s2.css
  8. 4
      apps/remix-ide/src/assets/css/themes/remix-hacker_owl.css
  9. 13
      apps/remix-ide/src/blockchain/providers/vm.js
  10. 13
      apps/remix-ide/src/blockchain/providers/worker-vm.ts
  11. 12
      libs/ghaction-helper/package.json
  12. 8
      libs/remix-analyzer/package.json
  13. 6
      libs/remix-astwalker/package.json
  14. 3
      libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts
  15. 12
      libs/remix-debug/package.json
  16. 6
      libs/remix-lib/package.json
  17. 6
      libs/remix-simulator/package.json
  18. 1
      libs/remix-simulator/src/vm-context.ts
  19. 6
      libs/remix-solidity/package.json
  20. 10
      libs/remix-tests/package.json
  21. 12
      libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx
  22. 1
      libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx
  23. 3
      libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx
  24. 1
      libs/remix-ui/run-tab/src/lib/run-tab.tsx
  25. 1
      libs/remix-ui/run-tab/src/lib/types/index.ts
  26. 11
      libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx
  27. 33
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
  28. 4
      libs/remix-url-resolver/package.json
  29. 4
      libs/remix-ws-templates/package.json
  30. 2
      libs/remixd/package.json
  31. 2
      package.json

@ -213,7 +213,28 @@ module.exports = {
'uint256 num': '24'
}
})
.end()
},
'Should switch to the mainnet VM fork and execute a tx to query ENS #group5': function (browser: NightwatchBrowser) {
let addressRef
browser
.addFile('mainnet_ens.sol', sources[7]['mainnet_ens.sol'])
.clickLaunchIcon('solidity')
.setSolidityCompilerVersion('soljson-v0.8.17+commit.8df45f5f.js')
.clickLaunchIcon('udapp')
.switchEnvironment('vm-mainnet-fork')
.waitForElementPresent('select[data-id="runTabSelectAccount"] option[value="0xdD870fA1b7C4700F2BD7f44238821C26f7392148"]') // wait for the udapp to load the list of accounts
.selectContract('MyResolver')
.createContract('')
.clickInstance(0)
.getAddressAtPosition(0, (address) => {
addressRef = address
})
.clickFunction('resolve - call')
.perform((done) => {
browser.verifyCallReturnValue(addressRef, ['0:address: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'])
.perform(() => done())
})
}
}
@ -431,5 +452,31 @@ contract C {
}
}`
}
}, {
'mainnet_ens.sol': {
content:
`
import "https://github.com/ensdomains/ens-contracts/blob/master/contracts/utils/NameEncoder.sol";
abstract contract ENS {
function resolver(bytes32 node) public virtual view returns (Resolver);
}
abstract contract Resolver {
function addr(bytes32 node) public virtual view returns (address);
}
contract MyResolver {
// Same address for Mainet, Ropsten, Rinkerby, Gorli and other networks;
ENS ens = ENS(0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e);
function resolve() public view returns(address) {
(,bytes32 node) = NameEncoder.dnsEncodeName("vitalik.eth");
Resolver resolver = ens.resolver(node);
return resolver.addr(node);
}
}
`
}
}
]

@ -61,7 +61,6 @@ export class InjectedProvider extends Plugin implements IProvider {
}
try {
if ((window as any) && typeof (window as any).ethereum.request === "function") (window as any).ethereum.request({ method: "eth_requestAccounts" });
if (!await (window as any).ethereum._metamask.isUnlocked()) this.call('notification', 'toast', 'Please make sure the injected provider is unlocked (e.g Metamask).')
const resultData = await this.provider.currentProvider.send(data.method, data.params)
resolve({ jsonrpc: '2.0', result: resultData.result, id: data.id })
} catch (error) {

@ -45,10 +45,6 @@ export class DebuggerTab extends DebuggerApiMixin(ViewPlugin) {
this.call('notification', 'toast', notFoundToastMsg(contractAddress))
})
this.on('fetchAndCompile', 'usingLocalCompilation', (contractAddress) => {
this.call('notification', 'toast', localCompilationToastMsg())
})
this.on('fetchAndCompile', 'sourceVerificationNotAvailable', () => {
this.call('notification', 'toast', sourceVerificationNotAvailableToastMsg())
})

@ -10,7 +10,8 @@
"filePanel.workspace.delete": "Delete Workspace",
"filePanel.workspace.deleteConfirm": "Are you sure to delete the current workspace?",
"filePanel.workspace.deleteAll": "Delete All Workspaces",
"filePanel.workspace.deleteAllConfirm": "Are you absolutely sure you want to delete all your workspaces? Deleted workspaces can not be restored in any manner.",
"filePanel.workspace.deleteAllConfirm1": "Are you absolutely sure you want to delete all your workspaces?",
"filePanel.workspace.deleteAllConfirm2": "Deleted workspaces can not be restored in any manner.",
"filePanel.workspace.name": "Workspace name",
"filePanel.workspace.chooseTemplate": "Choose a template",
"filePanel.workspace.download": "Backup Workspaces",
@ -54,5 +55,6 @@
"filePanel.customizeTemplate": "Customize template",
"filePanel.features": "Features",
"filePanel.upgradeability": "Upgradeability",
"filePanel.ok": "OK"
"filePanel.ok": "OK",
"filePanel.cancel": "Cancel"
}

@ -10,8 +10,8 @@
"filePanel.workspace.delete": "删除工作空间",
"filePanel.workspace.deleteConfirm": "确定要删除当前工作空间?",
"filePanel.workspace.deleteAll": "Delete All Workspaces",
"filePanel.workspace.deleteAllConfirm": "Are you absolutely sure you want to delete all your workspaces? Deleted workspaces can not be restored in any manner.",
"filePanel.workspace.name": "工作空间名称",
"filePanel.workspace.deleteAllConfirm1": "Are you absolutely sure you want to delete all your workspaces?",
"filePanel.workspace.deleteAllConfirm2": "Deleted workspaces can not be restored in any manner.", "filePanel.workspace.name": "工作空间名称",
"filePanel.workspace.chooseTemplate": "选择一个工作空间模板",
"filePanel.workspace.download": "下载工作空间",
"filePanel.workspace.restore": "恢复工作空间",
@ -54,5 +54,6 @@
"filePanel.customizeTemplate": "自定义模板",
"filePanel.features": "特点",
"filePanel.upgradeability": "可升级性",
"filePanel.ok": "确认"
"filePanel.ok": "确认",
"filePanel.cancel": "Cancel"
}

@ -8611,28 +8611,28 @@ legend {
text-decoration:underline
}
.alert-primary {
background-color:#2a9fd6
background-color:#2a9fd685
}
.alert-secondary {
background-color:#555
}
.alert-success {
background-color:#77b300
background-color:#77b3007a
}
.alert-info {
background-color:#93c
background-color:#9933cc91
}
.alert-warning {
background-color:#f80
background-color:#ff8800a1
}
.alert-danger {
background-color:#c00
background-color:#cc00009c
}
.alert-light {
background-color:#222
}
.alert-dark {
background-color:#adafae
background-color:#adafae99
}
.badge-warning {
color:#fff

@ -4481,7 +4481,7 @@ a.badge-dark:focus {
}
.alert-primary {
color: #fff;
background-color: #5CBDEE;
background-color: #5cbdee94;
border-color: #5CBDEE;
}
.alert-primary hr {

@ -13,7 +13,7 @@
--cyan: #355f7d;
--white: #fff;
--gray: #8B99A6;
--gray-dark: #343a40;
--gray-dark: #8694a1;
--primary: #007aa6;
--secondary: #0E2A3E;
--success: #C4E07F;
@ -4491,7 +4491,7 @@ a.badge-dark:focus {
}
.alert-primary {
color: #fff;
background-color: #5CBDEE;
background-color: #5cbdee94;
border-color: #5CBDEE;
}
.alert-primary hr {

@ -24,15 +24,13 @@ class VMProvider {
this.worker = new Worker(new URL('./worker-vm', import.meta.url))
const provider = this.executionContext.getProviderObject()
this.worker.postMessage({ cmd: 'init', fork: this.executionContext.getCurrentFork(), nodeUrl: provider?.options['nodeUrl'], blockNumber: provider?.options['blockNumber']})
let incr = 0
const stamps = {}
this.worker.addEventListener('message', (msg) => {
if (stamps[msg.data.stamp]) {
if (msg.data.cmd === 'sendAsyncResult' && stamps[msg.data.stamp]) {
stamps[msg.data.stamp](msg.data.error, msg.data.result)
}
})
} else if (msg.data.cmd === 'initiateResult') {
if (!msg.data.error) {
this.provider = {
sendAsync: (query, callback) => {
const stamp = Date.now() + incr
@ -46,6 +44,11 @@ class VMProvider {
this.accounts = {}
this.executionContext.setWeb3(this.executionContext.getProvider(), this.web3)
}
}
})
this.worker.postMessage({ cmd: 'init', fork: this.executionContext.getCurrentFork(), nodeUrl: provider?.options['nodeUrl'], blockNumber: provider?.options['blockNumber']})
}
// TODO: is still here because of the plugin API
// can be removed later when we update the API

@ -7,7 +7,18 @@ self.onmessage = (e: MessageEvent) => {
case 'init':
{
provider = new Provider({ fork: data.fork, nodeUrl: data.nodeUrl, blockNumber: data.blockNumber })
if (provider) provider.init()
provider.init().then(() => {
self.postMessage({
cmd: 'initiateResult',
stamp: data.stamp
})
}).catch((error) => {
self.postMessage({
cmd: 'initiateResult',
error,
stamp: data.stamp
})
})
break
}
case 'sendAsync':

@ -1,6 +1,6 @@
{
"name": "@remix-project/ghaction-helper",
"version": "0.1.5",
"version": "0.1.6",
"description": "Solidity Tests GitHub Action Helper",
"main": "src/index.js",
"scripts": {
@ -19,14 +19,16 @@
},
"homepage": "https://github.com/ethereum/remix-project#readme",
"devDependencies": {
"@remix-project/remix-solidity": "^0.5.9",
"@remix-project/remix-solidity": "^0.5.10",
"@types/chai": "^4.3.4",
"typescript": "^4.9.3"
},
"dependencies": {
"@ethereum-waffle/chai": "^3.4.4",
"@remix-project/remix-simulator": "^0.2.24",
"chai": "^4.3.7",
"ethers": "^5.7.2",
"@remix-project/remix-simulator": "^0.2.21"
}
"ethers": "^5.7.2"
},
"types": "./src/index.d.ts",
"gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23"
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-analyzer",
"version": "0.5.32",
"version": "0.5.33",
"description": "Tool to perform static analysis on Solidity smart contracts",
"scripts": {
"test": "./../../node_modules/.bin/ts-node --project ../../tsconfig.base.json --require tsconfig-paths/register ./../../node_modules/.bin/tape ./test/tests.ts"
@ -25,8 +25,8 @@
"@ethereumjs/tx": "^4.0.2",
"@ethereumjs/util": "^8.0.3",
"@ethereumjs/vm": "^6.3.0",
"@remix-project/remix-astwalker": "^0.0.53",
"@remix-project/remix-lib": "^0.5.23",
"@remix-project/remix-astwalker": "^0.0.54",
"@remix-project/remix-lib": "^0.5.24",
"async": "^2.6.2",
"ethers": "^5.4.2",
"ethjs-util": "^0.1.6",
@ -50,6 +50,6 @@
"typescript": "^3.7.5"
},
"typings": "src/index.d.ts",
"gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0",
"gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23",
"main": "./src/index.js"
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-astwalker",
"version": "0.0.53",
"version": "0.0.54",
"description": "Tool to walk through Solidity AST",
"main": "src/index.js",
"scripts": {
@ -37,7 +37,7 @@
"@ethereumjs/tx": "^4.0.2",
"@ethereumjs/util": "^8.0.3",
"@ethereumjs/vm": "^6.3.0",
"@remix-project/remix-lib": "^0.5.23",
"@remix-project/remix-lib": "^0.5.24",
"@types/tape": "^4.2.33",
"async": "^2.6.2",
"ethers": "^5.4.2",
@ -53,6 +53,6 @@
"tap-spec": "^5.0.0"
},
"typings": "src/index.d.ts",
"gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0",
"gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23",
"types": "./src/index.d.ts"
}

@ -100,12 +100,11 @@ export class FetchAndCompile extends Plugin {
if (compilation) {
let found = false
compilation.visitContracts((contract) => {
found = util.compareByteCode('0x' + contract.object.evm.deployedBytecode.object, codeAtAddress)
found = util.compareByteCode(codeAtAddress, '0x' + contract.object.evm.deployedBytecode.object)
return found
})
if (found) {
await this.call('compilerArtefacts', 'addResolvedContract', contractAddress, compilation)
setTimeout(_ => this.emit('usingLocalCompilation', contractAddress), 0)
return compilation
}
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-debug",
"version": "0.5.23",
"version": "0.5.24",
"description": "Tool to debug Ethereum transactions",
"contributors": [
{
@ -26,10 +26,10 @@
"@ethereumjs/tx": "^4.0.2",
"@ethereumjs/util": "^8.0.3",
"@ethereumjs/vm": "^6.3.0",
"@remix-project/remix-astwalker": "^0.0.53",
"@remix-project/remix-lib": "^0.5.23",
"@remix-project/remix-simulator": "^0.2.23",
"@remix-project/remix-solidity": "^0.5.9",
"@remix-project/remix-astwalker": "^0.0.54",
"@remix-project/remix-lib": "^0.5.24",
"@remix-project/remix-simulator": "^0.2.24",
"@remix-project/remix-solidity": "^0.5.10",
"ansi-gray": "^0.1.1",
"async": "^2.6.2",
"color-support": "^1.1.3",
@ -69,6 +69,6 @@
},
"homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-debug#readme",
"typings": "src/index.d.ts",
"gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0",
"gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23",
"types": "./src/index.d.ts"
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-lib",
"version": "0.5.23",
"version": "0.5.24",
"description": "Library to various Remix tools",
"contributors": [
{
@ -17,8 +17,8 @@
"test": "./../../node_modules/.bin/ts-node --require tsconfig-paths/register ./../../node_modules/.bin/tape ./test/tests.ts"
},
"dependencies": {
"async": "^2.1.2",
"@ethereumjs/util": "^8.0.3",
"async": "^2.1.2",
"ethers": "^4.0.40",
"ethjs-util": "^0.1.6",
"events": "^3.0.0",
@ -51,6 +51,6 @@
},
"homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-lib#readme",
"typings": "src/index.d.ts",
"gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0",
"gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23",
"types": "./src/index.d.ts"
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-simulator",
"version": "0.2.23",
"version": "0.2.24",
"description": "Ethereum IDE and tools for the web",
"contributors": [
{
@ -22,7 +22,7 @@
"@ethereumjs/tx": "^4.0.2",
"@ethereumjs/util": "^8.0.3",
"@ethereumjs/vm": "^6.3.0",
"@remix-project/remix-lib": "^0.5.23",
"@remix-project/remix-lib": "^0.5.24",
"ansi-gray": "^0.1.1",
"async": "^3.1.0",
"body-parser": "^1.18.2",
@ -67,6 +67,6 @@
},
"homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-simulator#readme",
"typings": "src/index.d.ts",
"gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0",
"gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23",
"types": "./src/index.d.ts"
}

@ -168,7 +168,6 @@ export class VMContext {
async createVm (hardfork) {
let stateManager: StateManager
console.log('creating a new VM', hardfork, this.nodeUrl, this.blockNumber)
if (this.nodeUrl) {
let block = this.blockNumber
if (this.blockNumber === 'latest') {

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-solidity",
"version": "0.5.9",
"version": "0.5.10",
"description": "Tool to load and run Solidity compiler",
"main": "src/index.js",
"types": "src/index.d.ts",
@ -19,7 +19,7 @@
"@ethereumjs/tx": "^4.0.2",
"@ethereumjs/util": "^8.0.3",
"@ethereumjs/vm": "^6.3.0",
"@remix-project/remix-lib": "^0.5.23",
"@remix-project/remix-lib": "^0.5.24",
"async": "^2.6.2",
"eslint-scope": "^5.0.0",
"ethers": "^5.4.2",
@ -57,5 +57,5 @@
},
"homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-solidity#readme",
"typings": "src/index.d.ts",
"gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0"
"gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23"
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-tests",
"version": "0.2.23",
"version": "0.2.24",
"description": "Tool to test Solidity smart contracts",
"main": "src/index.js",
"types": "./src/index.d.ts",
@ -41,9 +41,9 @@
"@ethereumjs/tx": "^4.0.2",
"@ethereumjs/util": "^8.0.3",
"@ethereumjs/vm": "^6.3.0",
"@remix-project/remix-lib": "^0.5.23",
"@remix-project/remix-simulator": "^0.2.23",
"@remix-project/remix-solidity": "^0.5.9",
"@remix-project/remix-lib": "^0.5.24",
"@remix-project/remix-simulator": "^0.2.24",
"@remix-project/remix-solidity": "^0.5.10",
"@remix-project/remix-url-resolver": "^0.0.42",
"ansi-gray": "^0.1.1",
"async": "^2.6.0",
@ -78,5 +78,5 @@
"typescript": "^3.3.1"
},
"typings": "src/index.d.ts",
"gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0"
"gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23"
}

@ -68,7 +68,7 @@ function HomeTabTitle() {
></audio>
</div>
</div>
<span>
<span className="d-flex flex-nowrap">
<CustomTooltip
placement={'top'}
tooltipId="overlay-tooltip"
@ -81,7 +81,7 @@ function HomeTabTitle() {
openLink("https://www.youtube.com/channel/UCjTUPyFEr2xDGN6Cg8nKDaA")
_paq.push(['trackEvent', 'hometab', 'socialMedia', 'youtube'])
}}
className="border-0 h-100 btn fab fa-youtube">
className="border-0 h-100 btn fab fa-youtube p-1 pl-2">
</button>
</CustomTooltip>
@ -97,7 +97,7 @@ function HomeTabTitle() {
openLink("https://twitter.com/EthereumRemix")
_paq.push(['trackEvent', 'hometab', 'socialMedia', 'twitter'])
}}
className="border-0 p-2 h-100 pl-2 btn fab fa-twitter">
className="border-0 p-1 h-100 pl-2 btn fab fa-twitter">
</button>
</CustomTooltip>
@ -113,7 +113,7 @@ function HomeTabTitle() {
openLink("https://www.linkedin.com/company/ethereum-remix/")
_paq.push(['trackEvent', 'hometab', 'socialmedia', 'linkedin'])
}}
className="border-0 p-2 h-100 pl-2 btn fa fa-linkedin">
className="border-0 p-1 h-100 pl-2 btn fa fa-linkedin">
</button>
</CustomTooltip>
@ -129,7 +129,7 @@ function HomeTabTitle() {
openLink("https://medium.com/remix-ide")
_paq.push(['trackEvent', 'hometab', 'socialmedia', 'medium'])
}}
className="border-0 p-2 h-100 pl-2 btn fab fa-medium">
className="border-0 p-1 h-100 pl-2 btn fab fa-medium">
</button>
</CustomTooltip>
@ -145,7 +145,7 @@ function HomeTabTitle() {
openLink("https://discord.gg/mh9hFCKkEq")
_paq.push(['trackEvent', 'hometab', 'socialmedia', 'discord'])
}}
className="border-0 h-100 p-2 btn fab fa-discord">
className="border-0 h-100 p-1 pr-2 btn fab fa-discord">
</button>
</CustomTooltip>
</span>

@ -319,6 +319,7 @@ export function ContractDropdownUI (props: ContractDropdownProps) {
isValidProxyAddress={props.isValidProxyAddress}
isValidProxyUpgrade={isValidProxyUpgrade}
modal={props.modal}
disabled={props.selectedAccount === ''}
/>
<div className="d-flex py-1 align-items-center custom-control custom-checkbox">
<input

@ -280,7 +280,7 @@ export function ContractGUI (props: ContractGUIProps) {
className={`udapp_instanceButton ${props.widthClass} btn btn-sm ${buttonOptions.classList}`}
data-id={buttonOptions.dataId}
data-title={buttonOptions.title}
disabled={toggleUpgradeImp && !proxyAddress}
disabled={(toggleUpgradeImp && !proxyAddress) || props.disabled}
>
<CustomTooltip
placement={"right-start"}
@ -415,6 +415,7 @@ export function ContractGUI (props: ContractGUIProps) {
onClick={handleExpandMultiClick}
data-id={buttonOptions.dataId}
className={`udapp_instanceButton ${buttonOptions.classList}`}
disabled={props.disabled}
>
{buttonOptions.content}
</button>

@ -223,6 +223,7 @@ export function RunTabUI (props: RunTabProps) {
passphrase={runTab.passphrase}
/>
<ContractDropdownUI
selectedAccount={runTab.accounts.selectedAccount}
syncContracts={syncContracts}
exEnvironment={runTab.selectExEnv}
contracts={runTab.contracts}

@ -224,6 +224,7 @@ export type MainnetPrompt = (
) => JSX.Element
export interface ContractDropdownProps {
selectedAccount: string,
exEnvironment: string,
contracts: {
contractList: ContractList,

@ -188,7 +188,8 @@ export const ContractSelection = (props: ContractSelectionProps) => {
}
const copyBytecode = () => {
return copyContractProperty('bytecode')
const bytecodeObj = JSON.parse(copyContractProperty('bytecode'))
return bytecodeObj.object
}
return (
@ -244,14 +245,14 @@ export const ContractSelection = (props: ContractSelectionProps) => {
<div className="remixui_contractHelperButtons">
<div className="input-group">
<div className="btn-group" role="group" aria-label="Copy to Clipboard">
<CopyToClipboard title="Copy ABI to clipboard" getContent={copyABI} direction='top'>
<button className="btn remixui_copyButton" title="Copy ABI to clipboard">
<CopyToClipboard tip="Copy ABI to clipboard" getContent={copyABI} direction='top'>
<button className="btn remixui_copyButton" >
<i className="remixui_copyIcon far fa-copy" aria-hidden="true"></i>
<span>ABI</span>
</button>
</CopyToClipboard>
<CopyToClipboard title="Copy ABI to clipboard" getContent={copyBytecode} direction='top'>
<button className="btn remixui_copyButton" title="Copy Bytecode to clipboard">
<CopyToClipboard tip="Copy Bytecode to clipboard" getContent={copyBytecode} direction='top'>
<button className="btn remixui_copyButton">
<i className="remixui_copyIcon far fa-copy" aria-hidden="true"></i>
<span>Bytecode</span>
</button>

@ -73,11 +73,11 @@ export function Workspace () {
}, [currentWorkspace])
const renameCurrentWorkspace = () => {
global.modal(intl.formatMessage({ id: 'filePanel.workspace.rename' }), renameModalMessage(), intl.formatMessage({ id: 'filePanel.ok' }), onFinishRenameWorkspace, '')
global.modal(intl.formatMessage({ id: 'filePanel.workspace.rename' }), renameModalMessage(), intl.formatMessage({ id: 'filePanel.ok' }), onFinishRenameWorkspace, intl.formatMessage({ id: 'filePanel.cancel' }))
}
const createWorkspace = () => {
global.modal(intl.formatMessage({ id: 'filePanel.workspace.create' }), createModalMessage(), intl.formatMessage({ id: 'filePanel.ok' }), onFinishCreateWorkspace, '')
global.modal(intl.formatMessage({ id: 'filePanel.workspace.create' }), createModalMessage(), intl.formatMessage({ id: 'filePanel.ok' }), onFinishCreateWorkspace, intl.formatMessage({ id: 'filePanel.cancel' }))
}
const deleteCurrentWorkspace = () => {
@ -86,17 +86,22 @@ export function Workspace () {
intl.formatMessage({ id: 'filePanel.workspace.deleteConfirm' }),
intl.formatMessage({ id: 'filePanel.ok' }),
onFinishDeleteWorkspace,
''
intl.formatMessage({ id: 'filePanel.cancel' })
)
}
const deleteAllWorkspaces = () => {
global.modal(
intl.formatMessage({ id: 'filePanel.workspace.deleteAll' }),
intl.formatMessage({ id: 'filePanel.workspace.deleteAllConfirm' }),
<>
<div className="d-flex flex-column">
<span className='pb-1'>{intl.formatMessage({ id: 'filePanel.workspace.deleteAllConfirm1' })}</span>
<span>{intl.formatMessage({ id: 'filePanel.workspace.deleteAllConfirm2' })}</span>
</div>
</>,
intl.formatMessage({ id: 'filePanel.ok' }),
onFinishDeleteAllWorkspaces,
''
intl.formatMessage({ id: 'filePanel.cancel' })
)
}
@ -106,7 +111,7 @@ export function Workspace () {
cloneModalMessage(),
intl.formatMessage({ id: 'filePanel.ok' }),
handleTypingUrl,
''
intl.formatMessage({ id: 'filePanel.cancel' })
)
}
@ -146,7 +151,7 @@ export function Workspace () {
try {
await global.dispatchRenameWorkspace(currentWorkspace, workspaceName)
} catch (e) {
global.modal(intl.formatMessage({ id: 'filePanel.workspace.rename' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, '')
global.modal(intl.formatMessage({ id: 'filePanel.workspace.rename' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, intl.formatMessage({ id: 'filePanel.cancel' }))
console.error(e)
}
}
@ -172,7 +177,7 @@ export function Workspace () {
try {
await global.dispatchCreateWorkspace(workspaceName, workspaceTemplateName, opts, initGitRepo)
} catch (e) {
global.modal(intl.formatMessage({ id: 'filePanel.workspace.create' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, '')
global.modal(intl.formatMessage({ id: 'filePanel.workspace.create' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, intl.formatMessage({ id: 'filePanel.cancel' }))
console.error(e)
}
}
@ -181,7 +186,7 @@ export function Workspace () {
try {
await global.dispatchDeleteWorkspace(global.fs.browser.currentWorkspace)
} catch (e) {
global.modal(intl.formatMessage({ id: 'filePanel.workspace.delete' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, '')
global.modal(intl.formatMessage({ id: 'filePanel.workspace.delete' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, intl.formatMessage({ id: 'filePanel.cancel' }))
console.error(e)
}
}
@ -190,7 +195,7 @@ export function Workspace () {
try {
await global.dispatchDeleteAllWorkspaces()
} catch (e) {
global.modal(intl.formatMessage({ id: 'filePanel.workspace.deleteAll' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, '')
global.modal(intl.formatMessage({ id: 'filePanel.workspace.deleteAll' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, intl.formatMessage({ id: 'filePanel.cancel' }))
console.error(e)
}
}
@ -204,7 +209,7 @@ export function Workspace () {
await global.dispatchSwitchToWorkspace(name)
global.dispatchHandleExpandPath([])
} catch (e) {
global.modal(intl.formatMessage({ id: 'filePanel.workspace.switch' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, '')
global.modal(intl.formatMessage({ id: 'filePanel.workspace.switch' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, intl.formatMessage({ id: 'filePanel.cancel' }))
console.error(e)
}
}
@ -240,7 +245,7 @@ export function Workspace () {
intl.formatMessage({ id: 'filePanel.workspace.cloneMessage' }),
intl.formatMessage({ id: 'filePanel.ok' }),
() => {},
''
intl.formatMessage({ id: 'filePanel.cancel' })
)
}
}
@ -279,7 +284,7 @@ export function Workspace () {
}
} catch (e) {
console.error(e)
global.modal(intl.formatMessage({ id: 'filePanel.checkoutGitBranch' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {})
global.modal(intl.formatMessage({ id: 'filePanel.checkoutGitBranch' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, intl.formatMessage({ id: 'filePanel.cancel' }))
}
}
@ -288,7 +293,7 @@ export function Workspace () {
await global.dispatchCreateNewBranch(branchFilter)
_paq.push(['trackEvent', 'Workspace', 'GIT', 'switch_to_new_branch'])
} catch (e) {
global.modal(intl.formatMessage({ id: 'filePanel.checkoutGitBranch' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {})
global.modal(intl.formatMessage({ id: 'filePanel.checkoutGitBranch' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, intl.formatMessage({ id: 'filePanel.cancel' }))
}
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-url-resolver",
"version": "0.0.45",
"version": "0.0.46",
"description": "Solidity import url resolver engine",
"main": "src/index.js",
"types": "src/index.d.ts",
@ -40,5 +40,5 @@
"typescript": "^3.1.6"
},
"typings": "src/index.d.ts",
"gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0"
"gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23"
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-ws-templates",
"version": "1.0.10",
"version": "1.0.11",
"description": "Create a Remix IDE workspace using different templates",
"main": "src/index.js",
"types": "src/index.d.ts",
@ -25,5 +25,5 @@
"ethers": "^5.4.2",
"web3": "^1.5.1"
},
"gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0"
"gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23"
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remixd",
"version": "0.6.11",
"version": "0.6.12",
"description": "remix server: allow accessing file system from remix.ethereum.org and start a dev environment (see help section)",
"main": "index.js",
"types": "./index.d.ts",

@ -1,6 +1,6 @@
{
"name": "remix-project",
"version": "0.31.0-dev",
"version": "0.32.0-dev",
"license": "MIT",
"description": "Ethereum Remix Monorepo",
"keywords": [

Loading…
Cancel
Save